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
 

 

Adding a Trailer Record

 
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: Mon Mar 31, 2008 10:56 pm    Post subject: Adding a Trailer Record
Reply with quote

I have a INPUT FILE of FB, 200 bytes LRECL.

Data would be :


Code:
EDIT       CCSDLTQX.TRANS.FBDP3550.G0001V00                Colum
Command ===>                                                  Sc
=COLS> ----+----1----+----2----+----3----+----4----+----5----+--
****** ***************************** Top of Data ***************
000001 20944510035799135300000014264031608000000               
000002 20944510035799135400000048704031808000000               
000003 20944510035799135500000058738031808000000               
000004 20944510035799135600000015973031808000000               
000005 20944510035799135700000003616031808000000               
000006 20944510035799135800000015092031808000000               
000007 20944510035799135900000111293031808000000               
.
.
.
.


Amount is in position 19 for a length of 11 .


In the output file, (200 bytes LRECL), I should add a Trailer Record with the count in position 10 for 11 and Total Amount in position 25 for 11.


Could you please guide me with Control card. We are using DFSORT in our shop
Back to top
View user's profile Send private message

Skolusu

Senior Member


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

PostPosted: Mon Mar 31, 2008 11:02 pm    Post subject: Reply to: Trailer Record
Reply with quote

Try the following control cards

Code:

//SYSIN    DD *                                                       
  SORT FIELDS=COPY                                                   
  OUTFIL REMOVECC,
  TRAILER1=(10:COUNT=(M11,LENGTH=11),25:TOT=(19,11,ZD,M11,LENGTH=11))
//*                         
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Mon Mar 31, 2008 11:17 pm    Post subject: It works
Reply with quote

I could get what i wanted from this control card. Thanks a bunch.

If you dont mind , one more follow up on this. The input file has data only till 41 columns. So, the jcl is forcing me to have the output file also as 41.

Cant i have it as 200 ?
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Mon Mar 31, 2008 11:36 pm    Post subject: sort card I have
Reply with quote

Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 SORT FIELDS=COPY
000002 OMIT COND=(1,1,CH,EQ,C'0',OR,1,1,CH,EQ,C'6')
000003 OUTFIL REMOVECC,
000004 TRAILER1=(1:'T',10:COUNT=(M11,LENGTH=11),
000005 25:TOT=(09,11,ZD,M11,LENGTH=10))
000006 OUTREC FIELDS=(1:C'38774212',09:19,11,20:C'0',21:10,09,30:30,06,
000007 36:02,6)
****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Mon Mar 31, 2008 11:41 pm    Post subject: Reply to: Trailer Record
Reply with quote

try the following control cards to have the output file as 200 bytes

Code:

//SYSIN   DD *
  OMIT COND=(1,1,SS,EQ,C'0,6')
  SORT FIELDS=COPY
  OUTREC BUILD=(01:C'38774212',
                09:19,11,
                20:C'0',
                21:10,09,
                30:30,06,
                36:02,6,
                200:X)
  OUTFIL REMOVECC,
  TRAILER1=(01:'T',10:COUNT=(M11,LENGTH=11),
            25:TOT=(09,11,ZD,M11,LENGTH=10))
/*
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Tue Apr 01, 2008 12:26 am    Post subject: thank you
Reply with quote

It worked like a charm. Thanks for your time and effort.
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 Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
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 Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am


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