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

Header and trailer with Record code through DFSORT


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

New User


Joined: 02 Mar 2013
Posts: 1
Location: India

PostPosted: Sun Mar 03, 2013 10:10 pm
Reply with quote

I have requirement where I need to include header with date (mm/yy) and trailer with count. Apart from this need to include record type for all the records, I.e
Header=01
Detail=02
Trailer=09

Below is an example of Input and expected output .
Code:

Input
*&*&*&*&&*&----Record-1
*&8&*******----Record-2
*&&&&******----Record-3

Expected Output
01 03/03/2013------Header
02*&*&*&*&&*&----Record-1
02*&8&*******----Record-2
02*&&&&******----Record-3
0903-----------------Trailer


I would like to achieve this through single DFSORT sort card and format should be FB only.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Mar 04, 2013 2:26 am
Reply with quote

So, have an INREC BUILD to put the "02" on the details records, this is with an 80-byte record, amend accordingly:

Code:
  INREC BUILD=(C'02',1,80)


For the header and trailer, you want to look at OUTFIL reporting functions, specifically HEADER1 and TRAILER1. There are examples in the forum and in the manuals.
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top