Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7314

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 Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
No new posts Formatting using DFsort Guru Nandu DFSORT/ICETOOL 5 Thu Nov 30, 2017 7:33 am
No new posts Strange Code amitc23 COBOL Programming 6 Tue Nov 28, 2017 11:25 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us