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

Read Write header detail and Trailer


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Feb 23, 2010 9:31 pm
Reply with quote

Well, you didn't give the starting position or length of the PD count field you want in the ZZ record, so I'll assume it starts in position 3 and has a length of 8 bytes. Here's a DFSORT job that will do what you asked for with those assumptions. Change as needed.

Code:

//S1 EXEC PGM=SORT                                                 
//SYSOUT DD SYSOUT=*                                               
//SORTIN DD *                                                       
AA2007-07-12ABCDE D                                                 
DDDDD 00000000000000111111111MBRBRAHMAN ABC - AXEA VOERL           
DDDDD 00000000000000232131231MALLIKAJUN RED - ABYC EREAD           
DDDDD 000000000000001212161212MIREREEAIA AEA TESTING               
DDDDD 00000000000000121210911LMI REDDO EVW TESTING                 
ZZ                                                                 
//SORTOUT DD ...  output file     
//SYSIN DD *                                                       
  OMIT COND=(1,2,CH,EQ,C'ZZ')                                       
  SORT FIELDS=(1,2,AC,A)                                           
  SUM FIELDS=NONE                                                   
  OUTFIL REMOVECC,                                                 
    TRAILER1=('ZZ',COUNT-1=(TO=PD,LENGTH=8)) 
/*                     
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts Trouble using REXX SDSF interface to ... CLIST & REXX 3
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Identify and write records containing... SYNCSORT 11
No new posts To Populate Trailer cnt in the file w... SYNCSORT 1
No new posts Write record twice based on condition... SYNCSORT 7
Search our Forums:


Back to Top