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
 

 

Header and trailer with Record code through DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Header and trailer with Record code through DFSORT
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Mon Mar 04, 2013 2:26 am    Post subject: Reply to: Header and trailer with Record code through DFSORT
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    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 How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


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