Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
SELECT FROM(IN1) TO(F1) ON(1,10,CH) FIRST
SELECT FROM(IN2) TO(F1) ON(1,10,CH) FIRST
SELECT FROM(F1) TO(T1) ON(1,10,CH) FIRSTDUP USING(CTL1)
SELECT FROM(F1) TO(T1) ON(1,10,CH) NODUPS USING(CTL2)
COPY FROM(IN1) TO(T1) USING(CTL3)
COPY FROM(IN2) TO(T1) USING(CTL4)
SPLICE FROM(T1) TO(OUT1) ON(1,10,CH) -
WITHALL WITH(1,21) USING(CTL5)
//CTL1CNTL DD *
OUTFIL FNAMES=T1,OUTREC=(1,20,21:C'DD')
/*
//CTL2CNTL DD *
OUTFIL FNAMES=T1,OUTREC=(1,20,21:C'UU')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=T1,OUTREC=(1,20,21:C'11')
/*
//CTL4CNTL DD *
OUTFIL FNAMES=T1,OUTREC=(1,20,21:C'22')
/*
//CTL5CNTL DD *
OUTFIL FNAMES=OUT1,INCLUDE=(21,2,CH,EQ,C'1U'),
OUTREC=(1,20)
OUTFIL FNAMES=OUT2,INCLUDE=(21,2,CH,EQ,C'2U'),
OUTREC=(1,20)
/*
The first step copies the entire records from IN1 to F1
The Second step copies the entire records from IN2 to F1
the third step adds an identifier of 'DD' to one record for each name found in File1 and File2 (FIRSTDUP) using CTL1
The fourth step add an identifier of 'UU' to one record for each name found only in File1 or only in File2 (NODUPS), using CTL2
the fifth step and Sixth step add an identifier of '11' to the File1 records and add an identifier of '22' to the File2 records using CTL3 and CTL4
Then we splice the second id byte for matching records so we get '1U' for names only in File1, '2U' for names only in File2, and an id other than '1U' or '2U' for names in both File and File2.
Can any one explain how the DD UU and 11and 22 are added and how the splice exactly works.I am very much comfused with splice step and how the DD and UU are added to records and also how 1U and 2U are added to the records and finally how the Splice takes the 2 byte records ie to get 1U and 2U
Can anyone please explain this
Hope this is clear
Thanks in advance |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Can any one explain how the DD UU and 11and 22 are added |
They are added by the OUTREC parameter of the OUTFIL statements. For example:
SELECT FROM(F1) TO(T1) ON(1,10,CH) FIRSTDUP USING(CTL1)
uses the following DFSORT control statement in CTL1CNTL:
Code: |
OUTFIL FNAMES=T1,OUTREC=(1,20,21:C'DD')
|
This OUTFIL statement uses the SELECTed records as input and produces T1 output records that contain input positions 1-20 followed by 'DD' in positions 21-22.
Quote: |
Can any one explain how ...the splice exactly works |
"z/OS DFSORT Application Programming Guide" Chapter 6 explains exactly how SPLICE works in great detail with lots of examples. You can access all of the DFSORT books from:
Use [URL] BBCode for External Links
If you need more specific help, you need to explain what you're trying to do exactly. Where did you get this job? What is it trying to accomplish? What do the records in IN1 and IN2 look like, and what is the expected output? |
|