|
|
| Author |
Message |
bhaskar_kanteti
Active User
Joined: 01 Feb 2007 Posts: 85 Location: India
|
|
|
|
Hi,
I had a input file of LRECL=200 and RECFM=FB.
I want to copy the records from this file to another file which is of LRECL=1000 and RECFM=FB moving NULL value from 201 onwards. How it can be done.
I tried this way but it didn't worked.
| Code: |
//STEP010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=INPUT.FILE.LEN200,DISP=SHR
//OUTPUT DD DSN=OUTPUT.FILE.LEN1000,
// DISP=(,CATLG,DELETE),
// RECFM=FB,LRECL=1000,SPACE=(CYL,(500,500),RLSE)
//TOOLIN DD *
COPY FROM(INPUT) TO(OUTPUT) USING(CTL1)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=OUTPUT,REMOVECC
OUTREC FIELDS=(1:1,200,201:X'00',LENGTH=800)
/*
|
If i give 201:x'00000000000000000.....' till 1600 zeroes it will default NULL in 800 bytes. But i want in simpler way.
Is there any other way to move NULL values from 201 to 1000 position of my output file. |
|
| Back to top |
|
 |
References
|
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4579 Location: San Jose, CA
|
|
|
|
Here's a DFSORT job that will do what you asked for:
| Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.FILE.LEN200,DISP=SHR
//SORTOUT DD DSN=OUTPUT.FILE.LEN1000,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(500,500),RLSE)
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,200,800Z)
/*
|
You can use 800X'00' instead of 800Z if you prefer. |
|
| Back to top |
|
 |
bhaskar_kanteti
Active User
Joined: 01 Feb 2007 Posts: 85 Location: India
|
|
|
|
Thanks frank.
It is simple. But i didn't get idea to do this way.
Thank you so much. |
|
| Back to top |
|
 |
|
|
|