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

Updating Header


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Tue Mar 15, 2011 11:52 pm
Reply with quote

Hi All,

I have a report which has 5 header line.2nd and 3rd line are blank.

Is there any way I can write the current date and time on 2nd and 3rd line respectively.

Thanks
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Mar 16, 2011 12:51 am
Reply with quote

rgupta71,

Assuming your input is FB recfm and LRECL of 80, the following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD *                                                 
HADER1                                                           
                                                                 
                                                                 
HEADER2                                                         
HEADER3                                                         
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD *                                                 
  SORT FIELDS=COPY                                               
  INREC IFOUTLEN=80,IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
  IFTHEN=(WHEN=(81,8,ZD,EQ,2),OVERLAY=(DATE1)),                 
  IFTHEN=(WHEN=(81,8,ZD,EQ,3),OVERLAY=(TIME))                   
//*


The output from this job is

Code:

HADER1     
20110315   
12:19:40   
HEADER2   
HEADER3   
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Comparing Header and Trailer. DFSORT/ICETOOL 7
No new posts Updating a 1 byte thats in occurs mul... DFSORT/ICETOOL 6
No new posts Adding a header when change data DFSORT/ICETOOL 6
No new posts Updating endevor JCLs CA Products 5
Search our Forums:

Back to Top