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 

Replace string in the first line using SYNCSORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Pavani Donepudi
Beginner


Joined: 07 Apr 2004
Posts: 13
Topics: 7

PostPosted: Mon Nov 07, 2005 4:35 pm    Post subject: Replace string in the first line using SYNCSORT Reply with quote

Hi,

Here is my requirement. I wanted the solution either in SYNCSORT or FILEAID.

1. My input file is of length 80 bytes of Fixed type. And there will only three records.

2. I need to replace from position 15-21 of only first line irrespective of what the field contains. Rest of the file contents should remain as is.

Can anyone of you help me out in solving this.

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


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

PostPosted: Mon Nov 07, 2005 5:16 pm    Post subject: Reply with quote

Pavani Donepudi,

Here is an untested code . You can change "pawanid" to the string of your choice.



Code:


//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=YOUR INPUT DSN,
//            DISP=SHR
//SORTOUT  DD DSN=YOUR OUTPUT DSN,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CY,(X,Y),RLSE)
//SYSIN    DD *
  SORT FIELDS=COPY
  INREC FIELDS=(1,80,SEQNUM,3,ZD)
  OUTREC FIELDS=(01,14,
                 15:81,3,CHANGE=(7,C'001',C'pawanid'),
                                   NOMATCH=(15,7),
                 22,59)
/*   



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
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities 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