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
 

 

Copy part of Trailer into Header

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Wed Apr 09, 2008 8:58 pm    Post subject: Copy part of Trailer into Header
Reply with quote

Experts:

I have an output file from my program which looks like

Code:

Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 00001HEADER 20080409                                                   
000002      0000000000000000038762924 0     0 20080409  000003499642813800 DEBI
000003      0000000000000000038762975 0054790 20080409  000000948910953600 DEBI
000004      0000000000000000038762983 0556001 20080409  000000116843296600 DEBI
000005      0000000000000000038762991 0556004 20080409  000000122202339400 DEBI
000006      0000000000000000038763089 0     0 20080409  000000003372714900 DEBI
000007      0000000000000000038756364 0     0 20080409  000000185440641600 DEBI
000008 00001       200804090755110000487641275990000000000000000000           
****** **************************** Bottom of Data ****************************



It is a 255 byte file. The final requirement is , I need to copy part of the trailer record,(identified by 00001) onto the Header Record .


Please let me know if you need any clarification . Thank you in Advance.
Back to top
View user's profile Send private message

kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Wed Apr 09, 2008 8:59 pm    Post subject: After copying the trailer record:
Reply with quote

Header record should look like :

00001HEADER 200804090755110000487641275990000000000000000000
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Apr 09, 2008 9:38 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/255)
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  INCLUDE COND=(1,5,CH,EQ,C'00001',AND,6,6,CH,NE,C'HEADER')
  OUTREC BUILD=(C'TCON,''',21,40,C'''',80:X)
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input file (FB/255)
//SORTOUT DD DSN=...  output file (FB/255)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(1,11,CH,EQ,C'00001HEADER'),
    OVERLAY=(21:TCON))
/*
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Wed Apr 09, 2008 9:59 pm    Post subject: Thank you Frank
Reply with quote

That worked. Thanks a bunch.
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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts RMM: scratching a volume that RMM thi... Hervey Martinez IBM Tools 0 Mon May 15, 2017 8:51 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am


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