icetool and splice option
Moderators: Frank Yaeger, Moderator Group
icetool and splice option
Hi,
Can anyone explain me about the with option in the splice. I have followed a lot of links given by frank.. i was not able to understand it. I have tried using icetool which has satisifed by requirement however i did not exactly understand why the with option is used.
Can someone explain me the below code thanks very much in advance...
I have 2 input files of record length 80 containing first 10 bytes as key in both the files
i want the records which are present in input 1 and not present in input2
here is the splice which i have copied from one of the threads and it worked.
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT1) ON(81,10,CH) WITH(91,1) -
USING(CTL3) KEEPNODUPS
can someone explain me about the use of with option here...what extractly it does
Can anyone explain me about the with option in the splice. I have followed a lot of links given by frank.. i was not able to understand it. I have tried using icetool which has satisifed by requirement however i did not exactly understand why the with option is used.
Can someone explain me the below code thanks very much in advance...
I have 2 input files of record length 80 containing first 10 bytes as key in both the files
i want the records which are present in input 1 and not present in input2
here is the splice which i have copied from one of the threads and it worked.
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT1) ON(81,10,CH) WITH(91,1) -
USING(CTL3) KEEPNODUPS
can someone explain me about the use of with option here...what extractly it does
thanks
Bobby
Bobby
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
That SPLICE statement will overlay position 91 from the last record with each key on to the base record for each key. For example, if you had these input records:
You would get these output records:
Notice that output record 1 has all of the data from the base (first) record for KEY1, with position 91 (Q) from the last overlay record. Output record 2 has all of the data from the base record for KEY2, with position 91 (P) from the last overlay record.
Code: Select all
81 91
| |
AAA ... KEY1 XY <-- base for KEY1
BBB ... KEY1 QR <-- overlay for KEY1
DDD ... KEY2 RS <-- base for KEY2
EEE ... KEY2 MN <-- overlay for KEY2
CCC ... KEY2 PQ <-- overlay for KEY2
Code: Select all
81 91
| |
AAA ... KEY1 QY
DDD ... KEY2 PS
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
icetool and splice option
Hi frank,
here is the complete jcl step.
In the above example, the key in both the fields is 1 to 10,
file 1 format
**********
F2685110|TBA-155400 |0981113|B|
F2685210|TBA-155401 |0981203|B|
7457600|228D5330G0003 |1090309|B|
7145830|211D1137P0001 |1070110|B|
file 2 format
**********
F2685110
F2685210
i have understood that both the records from the input files are copied into 1 to 80 bytes of t1 and after that 81 to 10 bytes of t1 file have the key
why the with option is used here which is checking from (91,1) what is the use of it.. i think we have moved c'11' and c'22' in t1 at that position.
Looks like a layman question. However i did not get why with option.
here is the complete jcl step.
Code: Select all
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=TF9757T.BMPP3.SOHPEXT.OUTPUT,DISP=SHR----input 1
//IN2 DD DSN=TF9757T.SPUFI.OUT,DISP=SHR-----input2
//OUT1 DD DSN=TF9757T.NTFOUND.FILE1,UNIT=SYSDA,-----output 1
// DISP=(NEW,CATLG,CATLG),
// SPACE=(CYL,(20,20)),
// DCB=(RECFM=FB,LRECL=80)
//OUT2 DD DSN=TF9757T.NTFOUND.FILE2,UNIT=SYSDA,------output2
// DISP=(NEW,CATLG,CATLG),
// SPACE=(CYL,(20,20)),
// DCB=(RECFM=FB,LRECL=80)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(20,20)),DISP=(MOD,PASS)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT1) ON(81,10,CH) WITH(91,1) -
USING(CTL3) KEEPNODUPS
/*
//CTL1CNTL DD *
OUTREC FIELDS=(1,80,81:1,10,91:C'11')
/*
//CTL2CNTL DD *
OUTREC FIELDS=(1,80,81:1,10,91:C'22')
/*
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT1,INCLUDE=(91,2,CH,EQ,C'11'),OUTREC=(1,80)
OUTFIL FNAMES=OUT2,INCLUDE=(91,2,CH,EQ,C'22'),OUTREC=(1,80)
/*
file 1 format
**********
F2685110|TBA-155400 |0981113|B|
F2685210|TBA-155401 |0981203|B|
7457600|228D5330G0003 |1090309|B|
7145830|211D1137P0001 |1070110|B|
file 2 format
**********
F2685110
F2685210
i have understood that both the records from the input files are copied into 1 to 80 bytes of t1 and after that 81 to 10 bytes of t1 file have the key
why the with option is used here which is checking from (91,1) what is the use of it.. i think we have moved c'11' and c'22' in t1 at that position.
Looks like a layman question. However i did not get why with option.
thanks
Bobby
Bobby
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
We put '11' at 91-92 for the base (file1) records. We put '22' at 91-92 for the overlay (file2) records. With WITH(91,1), SPLICE gives us an 'id' in 91-92 consisting of '11' for records only in file1, '22' for records only in file2, or '12' for records in file1 and file2. Then we can use a test of what's in 91-92 for OUTFIL INCLUDE to determine where each record goes.
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
icetool and splice option
Frank,
thanks for the quick reply...
So the WITH option is to differentiate the records from the 2 input files it does not matter whether you give (91,1) or 91,2) it would actually depend upon the
//CTL1CNTL DD *
OUTREC FIELDS=(1,80,81:1,10,91:C'11')
Please correct me if am wrong in my case i can use (91,1) or (91,2). both give me the same output...
thanks for the quick reply...
So the WITH option is to differentiate the records from the 2 input files it does not matter whether you give (91,1) or 91,2) it would actually depend upon the
//CTL1CNTL DD *
OUTREC FIELDS=(1,80,81:1,10,91:C'11')
Please correct me if am wrong in my case i can use (91,1) or (91,2). both give me the same output...
thanks
Bobby
Bobby
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
In your case, since you are not checking for '12', you can use WITH(91,1) or WITH(92,1). WITH(91,2) wouldn't be correct - I assume you meant WITH(92,1).Please correct me if am wrong in my case i can use (91,1) or (91,2). both give me the same output...
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
icetool and splice option
hi frank,
I am sorry i am really not able to get on with WITH option. Could you please give me a link where it explains only about the WITH option and if you can provide some example only for the with option.....that would be gr8
I am sorry i am really not able to get on with WITH option. Could you please give me a link where it explains only about the WITH option and if you can provide some example only for the with option.....that would be gr8
thanks
Bobby
Bobby
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
I really don't know how else to help you. The WITH option is explained in the DFSORT books in the context of the SPLICE option, not by itself. Likewise for examples. I don't really understand why you are not able to "get on with WITH option". I thought I did a pretty good job of explaining it in this thread. I don't know how else to explain it that will help you if you don't understand what I've explained already.
Here's a link to the explanation of the SPLICE operand. Perhaps if you read through the entire explanation and try to understand all of the provided examples, you'll get it:
http://publibz.boulder.ibm.com/cgi-bin/ ... 0527161936
Here's a link to the explanation of the SPLICE operand. Perhaps if you read through the entire explanation and try to understand all of the provided examples, you'll get it:
http://publibz.boulder.ibm.com/cgi-bin/ ... 0527161936
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page