I have an ICETOOL process I cannot seem to get right.

I have two datasets:

1.     A BASE dataset

2.     A dataset with data to insert into a BASE record IF the key data match
I'd like to outputs.

1.     With the BASE records that were NOT updated

2.     With the BASE records that WERE updated

I'm able to get an output of the BASE records that were 'updated' but I also 
would like a separate dataset of those records that were not 'updated'.

Below are my TOOLIN cards.

NOTES:
DD IN1 is the BASE dataset and has an INREC to insert (not overlay) 40 spaces 
in position 151 and shift the data after it to the right.
This is where some data from IN2 will be overlayed.
DD IN2 is the dataset with data to overly in the matching BASE records.
IN2 has an LRECL of 100 so an INREC is used to change its length to match the 
BASE dataset's 520 LRECL
The data to copy from IN2 is in position 32 for a length of 20 and is to be 
inserted into position 151 of the BASE record.
DD OUT1 - is to contain those BASE records that were NOT updated.  THESE FILE 
COMES UP EMPTY 8-(
DD OUT2 - is to contain the updated records and this seems to work.

//TOOLIN  DD *
  COPY FROM(IN1) TO(T1) USING(CTL1)
  COPY FROM(IN2) TO(T1) USING(CTL2)
  SPLICE FROM(T1) TO(OUT2) ON(1,21,CH) WITH(151,20) USING(CTL3)
/*
//CTL1CNTL DD *
 INREC BUILD=(1:1,150,40X,151,330)
 OUTREC FIELDS=(1,520)
/*
//CTL2CNTL DD *
 OUTREC FIELDS=(1,100,151:32,20,350X)
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT1,INCLUDE=(151,1,CH,EQ,C' '),OUTREC=(1,520)
  OUTFIL FNAMES=OUT2,INCLUDE=(151,1,CH,NE,C' '),OUTREC=(1,520)

Any insights would be appreciated.

Bill

______________________________________________________________________
CONFIDENTIALITY NOTICE: This email from the State of California is for the sole 
use of the intended recipient and may contain confidential and privileged 
information. Any unauthorized review or use, including disclosure or 
distribution, is prohibited. If you are not the intended recipient, please 
contact the sender and destroy all copies of this email.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to