ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
I am reading a file through file aid in JCL. I want to write the records to another by adding date to the input file, but i dont want to add the date to the header and trailer records. How to do this?
The file aid code i am using is like this
$$DD01 USER MOVE=(1,80,1),
MOVE=(49,C'20060725'),
WRITE=OUT01
If i use this all the records will be copied with the date in column 49. I dont want date in the header and trailer records.
Can any one help me. I am waiting for your replies. |
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
You need to do a COPYALL:
Code: |
//FILEAID EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=INPUT.FILE,DISP=OLD
//DD01O DD DSN=OUTPUT.DATASET,
// DISP=(NEW,CATLG),
// UNIT=(SYSDA),SPACE=(TRK,(5,5),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920)
//SYSIN DD *
$$DD01 COPYALL IF=(1,NE,C'HEADER'),
IF=(1,NE,C'TRAILER'),
MOVE=(1,80,1),
MOVE=(49,C'20060725')
|
This utility copies all records to DD01O and assumes the word HEADER and TRAILER are in position 1 of the input file. |
|