Add one record at the top



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

Add one record at the top

Postby Sushmita V » Wed Mar 14, 2012 2:53 pm

Hi,

Can you please suggets how to add one record at the top in a file.

Input File:


123|456|78900
123|456|78901
123|456|78902
123|456|78903
123|456|78904


My output should be:

ABC|DEF|XYZ
123|456|78900
123|456|78901
123|456|78902
123|456|78903
123|456|78904


Please help.

Thanks!
Sushmita V
 
Posts: 12
Joined: Thu Jan 19, 2012 9:26 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: Add one record at the top

Postby bodatrinadh » Wed Mar 14, 2012 3:56 pm

Use Header concept.
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: Add one record at the top

Postby skolusu » Wed Mar 14, 2012 10:02 pm

Sushmita V,

The following DFSORT JCL will give you the desired results

//STEP0100 EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD *                             
123|456|78900                               
123|456|78901                               
123|456|78902                               
123|456|78903                               
123|456|78904                               
//SORTOUT  DD SYSOUT=*                       
//SYSIN    DD *                             
  OPTION COPY                               
  OUTFIL REMOVECC,HEADER1=('ABC|DEF|XYZ')   
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post