ICETOOL and SPLICE Operator



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

ICETOOL and SPLICE Operator

Postby hugol » Thu Dec 04, 2008 7:33 pm

I have 2 input records. in file one i have some account numbers block. in file 2 i have all the accounts numbers and other data. i want to keep the file 2 but with the accounts that are not in file 1...i just want the active accounts...
hugol
 
Posts: 5
Joined: Thu Dec 04, 2008 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ICETOOL and SPLICE Operator

 

Re: icetool- splice

Postby Frank Yaeger » Thu Dec 04, 2008 9:53 pm

Please show an example of the records in each input file and what you expect for output. Explain the "rules" for getting from input to output. If input file1 can have duplicates within it, show that in your example. If input file2 can have duplicates within it, show that in your example. Give the RECFM and LRECL of each input file. Give the starting position, length and format of each relevant field.
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

Re: icetool- splice

Postby hugol » Thu Dec 04, 2008 10:15 pm

sorry i forget to post the code....
the relevent fields i want are the first 20, they start in position 1 and finish in position 20, its alphanumeric.. both files are FB, record lenght of file one 113, but im not interested in all the data just part of it, second file record lenght is 290, the same of file one.
the code i made is this:

<code deleted>
hugol
 
Posts: 5
Joined: Thu Dec 04, 2008 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: icetool- splice

Postby Frank Yaeger » Thu Dec 04, 2008 11:35 pm

You posted your code - I deleted it. I don't want to see YOUR code. I want you to tell me what you want to do in detail with good examples of input and output so I can show you the correct code. Please give me all of the information I asked for in my first post.
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

Re: icetool- splice

Postby hugol » Thu Dec 04, 2008 11:59 pm

sorry all the inconvinients...
i have two input files, file 1 is un unload of accounts and other data, file 2 have accounts number that no longer exists, i want as an output file 1 but without the accounts that are in file two, i have to quit in file 1 the accounts that are in file 2.


There will be no duplicate accounts number in file 1 or in file 2

Account number (1,20,CH)

FILE 1 --RECFM= FB, LRECL=50

0AAA000A111111111111XXXX-XX-XXXXXXXX-XX-XXXXXXXXXX
0AAA000A222222222222XXXX-XX-XXXXXXXX-XX-XXXXXXXXXX
0AAA000A333333333333XXXX-XX-XXXXXXXX-XX-XXXXXXXXXX
0AAB000B444444444444XXXX-XX-XXXXXXXX-XX-XXXXXXXXXX
0AAB000B555555555555XXXX-XX-XXXXXXXX-XX-XXXXXXXXXX

FILE 2 --RECFM= FB, LRECL=20

0AAA000A222222222222
0AAA000A333333333333

OUTPUT FILE
0AAA000A111111111111XXXX-XX-XXXXXXXX-XX-XXXXXXXXXX
0AAB000B444444444444XXXX-XX-XXXXXXXX-XX-XXXXXXXXXX
0AAB000B555555555555XXXX-XX-XXXXXXXX-XX-XXXXXXXXXX
hugol
 
Posts: 5
Joined: Thu Dec 04, 2008 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: icetool- splice

Postby Frank Yaeger » Fri Dec 05, 2008 1:54 am

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

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/50)
//IN2 DD DSN=...  input file2 (FB/20)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/50)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(1,20,CH) NODUPS USING(CTL3)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(51:C'1')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(51:C'2')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(51,1,CH,EQ,C'1'),
    BUILD=(1,50)
/*
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

Re: icetool- splice

Postby hugol » Fri Dec 05, 2008 5:48 pm

thanks!!!
hugol
 
Posts: 5
Joined: Thu Dec 04, 2008 7:24 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post