MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Find and replace

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sushma4satya
Beginner


Joined: 04 Nov 2005
Posts: 14
Topics: 4

PostPosted: Wed Feb 28, 2007 5:16 pm    Post subject: Find and replace Reply with quote

File looks like below :

Code:

------------------------------------------------------------------------------
AAAAAAAA          2006-09-01 XXXXXXXXXX 001 000
BBBBBBBB          2006-06-01 XXXXXXXXXX 001 000
CCCCCCC           2006-01-01 2006-05-31 001 000
DDDDDDD           2007-01-01 XXXXXXXXXX 001 000
------------------------------------------------------------------------------

Note : Assume XXXXXXXX =spaces


My requirement : If I find a space in position 63-72 , I need to replace with 9999-99-99.

Output should look like:
Code:

------------------------------------------------------------------------------
AAAAAAAA          2006-09-01 9999-99-99 001 000
BBBBBBBB          2006-06-01 9999-99-99 001 000
CCCCCCC           2006-01-01 2006-05-31 001 000
DDDDDDD           2007-01-01 9999-99-99 001 000
------------------------------------------------------------------------------



Can we do it using sort or icetool without using change all command.

Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Feb 28, 2007 9:21 pm    Post subject: Reply with quote

sushma4satya,

Sushma4satya,

try these sort control cards

Code:
 
//SYSIN    DD *                                 
  SORT FIELDS=COPY                             
  OUTREC IFTHEN=(WHEN=(63,10,CH,EQ,C' '),       
       OVERLAY=(63:C'9999-99-99'))                     
/*                                             



btw 9999-99-99 is not a valid date (assuming that the field is a date field). you should have it as 9999-12-31.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sushma4satya
Beginner


Joined: 04 Nov 2005
Posts: 14
Topics: 4

PostPosted: Wed Feb 28, 2007 10:51 pm    Post subject: Reply with quote

Kolusu,

Thanks so much...it worked . Laughing

Satya
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group