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: 7306

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 Record Not found in AlX but record re... mukun264 COBOL Programming 2 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm


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