Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Question regarding Splicing in DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Jul 18, 2006 11:33 pm    Post subject: Question regarding Splicing in DFSORT
Reply with quote

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
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jul 19, 2006 12:54 am    Post subject:
Reply with quote

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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

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?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us