View previous topic :: View next topic
|
Author |
Message |
Vineet
New User
Joined: 14 Sep 2005 Posts: 20
|
|
|
|
Hi All,
I have a sequential file. I want to repalce char. appearing at 5th, 20th & 30th position by 'N', 'Y', 'A'. I DONT want to do this by writing COBOL Pgm. want to do by JCL only. Please suggest how to go for it.
Thanx
Rgds
Vineet |
|
Back to top |
|
|
Dariusz Warnings : 1 New User
Joined: 11 Aug 2005 Posts: 27 Location: POLAND
|
|
|
|
Hi.
The simple solution it is change command,but I don't know very many questions:
How this file is big ?
Is it FB or VB file ?
Depend on above we can use ISPF EDITOR or CLIST or IEBUPDATE program.
Regards. |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
Will this do it? (assuming 80 char file here)
Code: |
//S1ASORT EXEC PGM=SORT
//SYSOUT DD SYSOUT=X
//SORTIN DD DSN=MYFILE.SORT1,DISP=SHR
//SORTOUT DD DSN=MYFILE.SORT1,DISP=SHR
//SYSIN DD *
SORT FIELDS=(COPY)
OUTREC FIELDS=(1,4,C'Y',6,14,C'N',21,9,C'A',31,50)
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Vineet,
If you want to replace position 5 with 'N', position 20 with 'Y' and position 30 with 'A', you can use the following DFSORT job:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(5:C'N',20:C'Y',30:C'A')
/*
|
|
|
Back to top |
|
|
|