Add the header to the all output file in sort

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Add the header to the all output file in sort

Postby varadhu » Sat Jun 06, 2009 9:32 am

HI all

i need to spilit a file and have to add the header to the all output file as a current timestamp..... can any one help me in that....
Posts: 1
Joined: Sat Jun 06, 2009 9:27 am
Has thanked: 0 time
Been thanked: 0 time

Re: Add the header to the all output file in sort


Re: header in sort

Postby dick scherrer » Sat Jun 06, 2009 9:50 am

Hello and welcome to the forum,

From what you posted, no one can help. . . You have provided no info to work with.

Post some sample input and the output(s) you want from that input.

Explain any rules for getting from the input to the output(s) you want. Explain what you mean by "split".

Mention the recfm and lrecl of each file as well as the relevant data positions.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6308
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 90 times

Re: Add the header to the all output file in sort

Postby Frank Yaeger » Sat Jun 06, 2009 7:51 pm


Dick is right that you haven't given enough information. But the general way to do what you want would be to use an OUTFIL statement with a HEADER1 operand for each output file, e.g.


INCLUDE and SAVE are one way to split a file. There are many others depending on how you want to split it.

For more information, see the "Five ways to split a data set" Smart DFSORT Trick at: ... vs/tricks/

The REMOVECC operand removes the ANSI carriage control characters (e.g. '1' for eject). If you want them, don't use REMOVECC.
Frank Yaeger - DFSORT Development Team (IBM) -
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at
User avatar
Frank Yaeger
Global moderator
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times



  • Related topics
    Last post