Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Updating multiple counts in trailer!! Vignesh Sid SYNCSORT 4 Mon Nov 06, 2017 1:04 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Copying part of the report using SARBCH Aedulla CA Products 1 Tue Oct 24, 2017 9:24 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us