Joined: 09 Jan 2006 Posts: 45 Topics: 14 Location: Bangalore
Posted: Tue Jan 10, 2006 5:18 am Post subject:
Hi Frank Yaeger,
I used the following jcl.
Code:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... file1
//IN2 DD DSN=... file2
//TMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//OUT DD DSN=... output file
//TOOLIN DD *
* Reformat the IN1 data set so it can be spliced
COPY FROM(IN1) TO(TMP1) USING(CTL1)
* Reformat the IN2 data set so it can be spliced
COPY FROM(IN2) TO(TMP1) USING(CTL2)
* Splice records with matching sequence numbers.
SPLICE FROM(TMP1) TO(OUT) ON(11,8,PD) WITH(6,5) USING(CTL3)
/*
//CTL1CNTL DD *
* Use OUTREC to create: |f1fld|blank|seqnum|
OUTREC FIELDS=(1:1,5,11:SEQNUM,8,PD)
/*
//CTL2CNTL DD *
* Use OUTREC to create: |blank|f2fld|seqnum|
OUTREC FIELDS=(6:1,5,11:SEQNUM,8,PD)
/*
//CTL3CNTL DD *
* Use OUTFIL OUTREC to remove the sequence number
OUTFIL FNAMES=OUT,OUTREC=(1,10)
/*
I wanted to know that how this line will work.
" SPLICE FROM(TMP1) TO(OUT) ON(11,8,PD) WITH(6,5) USING(CTL3)"
I tryed with diff i/p combinations by changing the "ON(11,8,PD) WITH(6,5)" to some other numbers, but I could not understand how this works.
This JCL takes whole record from the i/p files but I need to take only some part of the record only.
Ex:
If FILE1 contains:
ABCDE
FGHIJ
and FILE2 contains:
01234
56789
Then my output file should contain:
(2nd and 4th byte from file1 and 3rd and 5th byte from file2)
BD24
GI79
Thanks
Madhu. _________________ Self confidence is something that says U will do it, when the rest of the world has exactly opposite view.
The doc uses lots of examples. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum