extract detail record using DFSORT



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

extract detail record using DFSORT

Postby vidhya gokulkumar » Mon May 24, 2010 1:56 pm

Hi,
I have a file containing header, detail and trailer record. I want to extract header in one file, detail in one file and trailer in one file.
I have extracted header and trailer. But i'm nt sure how to extract detail record alone. We dont use ICETOOL utlity. Pls help with SORT.
my file is like this.

000000hdr data000
12345678
56990000
8899900
000000trl data


Note:
For extracting header and trailer, sort card that i used is:
OPTION COPY
OUTFIL REMOVECC,NODETAIL,HEADER1=(1,80),
FNAMES=SORTOF1
OUTFIL REMOVECC,NODETAIL,TRAILER1=(1,80),
FNAMES=SORTOF2
vidhya gokulkumar
 
Posts: 2
Joined: Wed May 12, 2010 10:09 am
Has thanked: 0 time
Been thanked: 0 time

Re: extract detail record using DFSORT

Postby skolusu » Mon May 24, 2010 9:13 pm

Vidhya Gokulkumar,

Use the following DFSORT JCL

//STEP0100 EXEC PGM=SORT                             
//SYSOUT   DD SYSOUT=*                               
//SORTIN   DD *                                     
000000HDR DATA000                                   
12345678                                             
56990000                                             
8899900                                             
000000TRL DATA                                       
//HDR      DD SYSOUT=*                               
//DTL      DD SYSOUT=*                               
//TRL      DD SYSOUT=*                               
//SYSIN    DD *                                     
  SORT FIELDS=COPY                                   
  OUTFIL FNAMES=HDR,REMOVECC,NODETAIL,HEADER1=(1,80)
  OUTFIL FNAMES=DTL,OMIT=(1,6,ZD,EQ,0)               
  OUTFIL FNAMES=TRL,REMOVECC,NODETAIL,TRAILER1=(1,80)
//*
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