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
 

 

Splice - only comparison, no sorting

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

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Tue Oct 16, 2007 11:09 am    Post subject: Splice - only comparison, no sorting
Reply with quote

Hi,
I am comparing 2 files and changing certain values in the master file. For this I am using the below mentioned splice statement.
SPLICE FROM(T1) TO(OUT) ON(13,11,CH) ON(30,4,CH) -
WITH(48,5) KEEPNODUPS

I really want only to compare the records, nut not to sort all the records based on (13,11,CH) and (30,4,CH). But this splice statement does a sort also, which I really don't want. Any solution for this.
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Oct 16, 2007 11:33 am    Post subject:
Reply with quote

pjnithin
This ICETOOL JOB retains the original order of the i/p records, and note that the preference is to the record in the first input file and can be changed as per your requirement.
Code:
//*******************************************************               
//STEP001  EXEC PGM=ICETOOL                                             
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN1      DD *                                                         
VICKY                                                                   
FRANK                                                                   
CARRIE                                                                 
HOLLY                                                                   
PAUL                                                                   
/*                                                                     
//IN2      DD *                                                         
KAREN                                                                   
HOLLY                                                                   
CARRIE                                                                 
VICKY                                                                   
MARY                                                                   
/*                                                                     
//TMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA 
//TMP2     DD DSN=&&TEMP2,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA 
//BOTH     DD SYSOUT=*                                                 
//TOOLIN   DD *                                                         
 COPY FROM(IN1)  TO(TMP1) USING(CP01)                                   
 COPY FROM(IN2)  TO(TMP1) USING(CP02)                                   
 SPLICE FROM(TMP1) TO(TMP2) ON(1,10,CH) WITH(1,10) KEEPNODUPS           
 SORT FROM(TMP2) TO(BOTH) USING(CP03)                                   
/*                                                                     
//CP01CNTL DD   *                                                       
  OUTREC BUILD=(1,10,12:SEQNUM,8,ZD,20:C'11')                           
/*                                                                     
//CP02CNTL DD   *                                                       
  OUTREC BUILD=(1,10,12:SEQNUM,8,ZD,20:C'22')                           
/*                                                                     
//CP03CNTL DD   *                                                       
  SORT FIELDS=(12,8,ZD,A,20,2,CH,A)                                     
  OUTFIL FNAMES=BOTH,BUILD=(1,10)                                       
/*                                                                     


BOTH contains matched records in the following order.
Code:
VICKY   
KAREN   
FRANK   
CARRIE 
HOLLY   
PAUL   
MARY   
Back to top
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Tue Oct 16, 2007 4:28 pm    Post subject: Reply to: Splice - only comparison, no sorting
Reply with quote

other than by giving the rec count and sorting it again, is there any other method to rtain the order of the record after splicing it.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 4:35 pm    Post subject:
Reply with quote

Nithin.

Quote:
other than by giving the rec count and sorting it again

No.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Oct 16, 2007 4:41 pm    Post subject:
Reply with quote

pjnithin
You have to take up extra step of sorting to retain the original order, since the SPLICE operator will sort the i/p records based on the positions specified in ON(p,m,f).
There is no other go. icon_redface.gif
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: Tue Oct 16, 2007 9:09 pm    Post subject:
Reply with quote

Quote:
other than by giving the rec count and sorting it again, is there any other method to rtain the order of the record after splicing it.


That's difficult to say since we don't know what your input records or output records look like.

Show an example of the records (relevant fields) in each input file and what you want for output. Give the RECFM and LRECL of the input files. Give the starting position, length and format of the relevant fields.
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 CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am
No new posts Stripping and Sorting of VB file G SRINIVASA RAO SYNCSORT 5 Wed Sep 14, 2016 1:34 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am
No new posts VB file sorting V S Amarendra Reddy DFSORT/ICETOOL 2 Fri Feb 26, 2016 8:29 pm


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