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

Adding header and trailer to data


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

New User


Joined: 19 Oct 2006
Posts: 4

PostPosted: Thu Nov 20, 2008 9:05 pm
Reply with quote

Hi,

Could you please give direction to solve below stated problem?

Input file (FB/LRECL=500) with 200 records, expected output file is (FB/LRECL=500) with header “headerxxxxxxx” and trailer as number of records i.e 202

Ex:

Input

aaaaaaaaaaaaa….
bbbbbbbbbbbb….
ccccccccccccc….
dddddddddddd…


Output

headerxxxxxxxxxxxx
aaaaaaaaaaaaa……
bbbbbbbbbbbb…..
ccccccccccccc……
dddddddddddd……
Trailer:00006



Thanks in advance

Regards,
Venu.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Nov 20, 2008 10:29 pm
Reply with quote

venugopala,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                     
//SYSOUT   DD SYSOUT=*                         
//SORTIN   DD DSN=your 500 byte input file,disp=shr
//SORTOUT  DD SYSOUT=*                         
//SYSIN    DD *                               
  SORT FIELDS=COPY                             
  OUTFIL REMOVECC,                             
  HEADER1=('HEADERXXXXXXX'),                   
  TRAILER1=('TRAILER:',COUNT+2=(M11,LENGTH=8))
//*
Back to top
View user's profile Send private message
venugopala

New User


Joined: 19 Oct 2006
Posts: 4

PostPosted: Wed Nov 26, 2008 5:15 pm
Reply with quote

Sorry for late reply

Thanks a lot Skolusu

It’s working fine icon_smile.gif
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 Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top