Breaking down a record into records



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

Breaking down a record into records

Postby katcse » Wed Nov 24, 2010 7:27 pm

Hi,

I have the following data in variable file format

No of insurances (1-8) Insurnace number (10-17) insurance number (18-25) and so on for a max of 20 insurance numbers.

For eg:

1 12345
2 12345 11111
4 11111 22222 33333 44444

I need this data in output record as :

12345
12345
11111
11111
22222
33333
44444

Thanks,
Karthik.
katcse
 
Posts: 1
Joined: Fri Apr 23, 2010 12:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Breaking down a record into records

 

Re: Breaking down a record into records

Postby skolusu » Wed Nov 24, 2010 10:25 pm

Katcse,

With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct,2010), you can now use the new RESIZE operator of DFSORT's ICETOOL to easily create larger records from smaller records, or smaller records from larger records. For example, to create 7 byte records from 150 byte(first 9 bytes counter followed by 20X7 byte records), you would use:

//STEP0100 EXEC PGM=ICETOOL                           
//TOOLMSG  DD SYSOUT=*                                 
//DFSMSG   DD SYSOUT=*                                 
//IN       DD DSN=your FB input 149 byte file,DISP=SHR
//OUT      DD SYSOUT=*                                 
//TOOLIN   DD *                                       
  RESIZE FROM(IN) TO(OUT) TOLEN(7) USING(CTL1)         
//CTL1CNTL DD *                                       
  INREC BUILD=(10,140)                                 
  OUTFIL FNAMES=OUT,OMIT=(1,7,CH,EQ,C' ')             
//*
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

Re: Breaking down a record into records

Postby Frank Yaeger » Wed Nov 24, 2010 11:57 pm

Insurnace number (10-17) insurance number (18-25) and so on for a max of 20 insurance numbers.


The insurance numbers are actually 8 bytes, not 7 bytes, so the correct DFSORT job would be:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file (FB/169)
//OUT DD DSN=...  output file (FB/8)
//TOOLIN   DD *
RESIZE FROM(IN) TO(OUT) TOLEN(8) USING(CTL1)
//CTL1CNTL DD *
  INREC BUILD=(10,160)
  OUTFIL FNAMES=OUT,OMIT=(1,8,CH,EQ,C' ')
//*
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: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post