View previous topic :: View next topic
|
Author |
Message |
kranti
New User
Joined: 10 Oct 2005 Posts: 27
|
|
|
|
Hi Guys,
Could you anyone please show me a solution in using DFSORT for my problem.Actual requirement is, I have a file having thousands of records of each 150 bytes length and it is fixed length (FB).In my program on some purpose I am writing some value in the 150 th byte of eachrecord (It can be 1 to 7 ). It will be input to another program.After running the second program I want to remove the 150 th byte value from all records in the file.My actual intention here is to make this field back to space.
It is very very Urgent.....could you any one please suggest on this..
Thanks In advance,
Kran. |
|
Back to top |
|
|
fixdoubts
New User
Joined: 21 Oct 2005 Posts: 54
|
|
|
|
Hi,
This will do i think
Code: |
//STEP EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=infile
//SORTOUT DD DSN=outfile
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,149,C' ')
/*
|
This will copy first 149 bytes from the input file and the 150th byte will be spaces.
Regards, |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use the DFSORT job that fixdoubts showed or you can use this slightly simpler 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=(150:X)
/*
|
|
|
Back to top |
|
|
|