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

How to add a Header in the file thru JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
k_kirru
Currently Banned

New User


Joined: 14 Sep 2005
Posts: 16

PostPosted: Wed Sep 14, 2005 8:04 pm
Reply with quote

Hi,
I want to add a Header in the file that means filed names to be add, could you give some JCL.

Thanks & Regards,
Kiran
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Wed Sep 14, 2005 8:28 pm
Reply with quote

Code:
//aaab5   EXEC PROC=SORT,                                             
//            COND=(0,NE)                                             
//*                                                                   
//SORTIN       DD  DSN=ddname
//            DISP=SHR                                                 
//*  ***  INFILE IS JUST USED AS A DUMMY ***                           
//*                                                                   
//SORTOUT      DD  DSN=ddname,                           
//            DISP=(OLD,CATLG,DELETE),                                 
//            UNIT=SYSDA,SPACE=(CYL,(250,100),RLSE),                   
//            DCB=(RECFM=FB,LRECL=90,BLKSIZE=900)                     
//*  ***  OUTPUT FILE WILL JUST HAVE WHAT EVER IS IN OUTREC FIELD *** 
//*  ***  SINCE STOPAFT (STOP AFTER) OPTION IS = 1 ***                 
//*                                                                   
//SYSIN        DD  * *** CONSTANT CONTROL CARDS ***                   
  OPTION COPY,                                                         
  STOPAFT=1                                                           
   OUTREC FIELDS=(C'TCKT NUM',
                               field names
                         C'ACCUM PLN DRVR')       
 /*    END OF INPUT                         
//


this will create a header file.merge this file with the data file.

hope this helps.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
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
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top