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

Adding a Trailer Record


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
Search our Forums:

Back to Top