MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Adding headers to the detail file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
apiyan
Beginner


Joined: 16 May 2009
Posts: 9
Topics: 5

PostPosted: Thu May 21, 2009 5:07 am    Post subject: Adding headers to the detail file Reply with quote

I want to add headers to the detail file (LRECL = 313). Here the header name for all fields is large when compared to the particular field

Eg..

Emp no length is 6
the header for this is 'Employee Number'

Employee Number
158943

Code:

infile 1:

123456        50000         9876543210
579842        48000         9863254174

Outfile 1:

Employee number          Empl salary        contact number
123456                         50000        9876543210
579842                         48000        9863254174


can anyone help how to this in sort?
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu May 21, 2009 9:43 am    Post subject: Reply with quote

Here's a DFSORT job that will do what you asked for. I assumed you wanted the headers at the top of each page.

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/313)
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,
    HEADER2=(1:'Employee number',26:'Empl salary',
      45:'contact number'),
    BUILD=(1:1,6,31:14,6,45:29,10,313:X)
/*


SORTOUT would have:

Code:

Employee number          Empl salary        contact number   
123456                         50000        9876543210       
579842                         48000        9863254174       

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group