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

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 UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm


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