Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Updating Header

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Updating Header
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    Post subject: Reply to: Updating Header
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am
No new posts Updating online Db2 table kishpra DB2 3 Fri Aug 12, 2016 2:44 pm
This topic is locked: you cannot edit posts or make replies. Updating value of key using rewrite s... ParminderKumar COBOL Programming 4 Thu Aug 04, 2016 12:46 am
No new posts Remove header only knobi SYNCSORT 5 Mon Feb 15, 2016 10:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us