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....
varadhu
 
Posts: 1
Joined: Sat Jun 06, 2009 9:27 am
Has thanked: 0 time
Been thanked: 0 time

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,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

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

varadhu,

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.

   OPTION COPY
   OUTFIL FNAMES=OUT1,REMOVECC,
      INCLUDE=(condition),
      HEADER1=(DATE=(4MD/))
   OUTFIL FNAMES=OUT2,REMOVECC,
      SAVE,
      HEADER1=(DATE=(4MD/))


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:

http://www.ibm.com/systems/support/stor ... 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) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post