SPLICE



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

SPLICE

Postby sheepskinjacket » Tue Feb 03, 2009 3:13 am

I'm trying to do the following in SORT/ICETOOL with SPLICE but I'm not sure if its possible:

Input File:
AAAAAAAA111
AAAAAAAA222
BBBBBBBB111
BBBBBBBB222
BBBBBBBB333

Desired Output File:
AAAAAAAA111222
BBBBBBBB111222333

Would be grateful for any help.
sheepskinjacket
 
Posts: 2
Joined: Tue Feb 03, 2009 3:05 am
Has thanked: 0 time
Been thanked: 0 time

Re: SPLICE

Postby Frank Yaeger » Tue Feb 03, 2009 4:15 am

For each "key" in positions 1-8, you want to build one record with positions 9-11 from each record with that key? Is that correct?

What is the maximum number of records for a key?

What is the RECFM and LRECL of the input file and output file?
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

Re: SPLICE

Postby sheepskinjacket » Tue Feb 03, 2009 1:00 pm

Yes, thats correct. For each key(position 1 to 8) I want to build one record with positions 9 to 11 from each record with that key.
The maximum number of records for a key is ten.
The RECFM of the input and output file is VB and the LRECL is 100. However I can change both these parameters easily if need be.
sheepskinjacket
 
Posts: 2
Joined: Tue Feb 03, 2009 3:05 am
Has thanked: 0 time
Been thanked: 0 time

Re: SPLICE

Postby Frank Yaeger » Wed Feb 04, 2009 12:32 am

Here's a DFSORT/ICETOOL job that will do what you asked for:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file (VB/100)
//OUT DD DSN=...  output file (VB/100)
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(7,8,CH) WITHEACH VLENMAX USING(CTL1) -
  WITH(18,3) WITH(21,3) WITH(24,3) WITH(27,3) WITH(30,3) -
  WITH(33,3) WITH(36,3) WITH(39,3) WITH(42,3)
/*
//CTL1CNTL DD *
  INREC IFTHEN=(WHEN=INIT,
    BUILD=(1,4,5:SEQNUM,2,ZD,RESTART=(5,8),7:5)),
   IFTHEN=(WHEN=(5,2,ZD,EQ,2),OVERLAY=(18:15,3)),
   IFTHEN=(WHEN=(5,2,ZD,EQ,3),OVERLAY=(21:15,3)),
   IFTHEN=(WHEN=(5,2,ZD,EQ,4),OVERLAY=(24:15,3)),
   IFTHEN=(WHEN=(5,2,ZD,EQ,5),OVERLAY=(27:15,3)),
   IFTHEN=(WHEN=(5,2,ZD,EQ,6),OVERLAY=(30:15,3)),
   IFTHEN=(WHEN=(5,2,ZD,EQ,7),OVERLAY=(33:15,3)),
   IFTHEN=(WHEN=(5,2,ZD,EQ,8),OVERLAY=(36:15,3)),
   IFTHEN=(WHEN=(5,2,ZD,EQ,9),OVERLAY=(39:15,3)),
   IFTHEN=(WHEN=(5,2,ZD,EQ,10),OVERLAY=(42:15,3))
  OUTFIL FNAMES=OUT,BUILD=(1,4,5:7)
/*
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