IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to omit records in file aid


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 68

PostPosted: Tue Jul 25, 2006 4:05 pm
Reply with quote

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.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Tue Jul 25, 2006 6:23 pm
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top