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 Command with multiple common fields

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

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Nov 14, 2007 2:12 am    Post subject: SPLICE Command with multiple common fields
Reply with quote

I need some assistance on how to SPLICE the following together

Input 1
Code:

ABENDAID                                              TSCICS   ALTER        0002
ABJ                                                   TSPWR    ALTER        0001
ACTP                                                  CICSSTC  ALTER        0001
ACTP                                                  CR9999   ALTER        0001
ADT0                                                  AD       ALTER        0001
ADT0                                                  CR9999   ALTER        0001
ADT0                                                  CSS      ALTER        0001
ADT0                                                  IS       ALTER        0001


Input 2
Code:

ABENDAID ABENDAID.**                                  TSCICS   ALTER   0002     
ABENDAID ABENDAID.CICS*.**                            TSCICS   ALTER   0002     
ABJ      ABJ.**                                       TSPWR    ALTER   0001     
ACTP     ACTP.**                                      CICSSTC  ALTER   0001     
ACTP     ACTP.**                                      CR9999   ALTER   0001     
ADT0     ADT0.**                                      AD       ALTER   0002     
ADT0     ADT0.**                                      CR9999   ALTER   0002     
ADT0     ADT0.**                                      CSS      ALTER   0002     
ADT0     ADT0.CIMS.**                                 IS       ALTER   0002     


Output should look like:


Code:

ABENDAID ABENDAID.**                                  TSCICS   ALTER   0002 0002
ABENDAID ABENDAID.CICS*.**                            TSCICS   ALTER   0002 0002
ABJ      ABJ.**                                       TSPWR    ALTER   0001 0001
ACTP     ACTP.**                                      CICSSTC  ALTER   0001 0001
ACTP     ACTP.**                                      CR9999   ALTER   0001 0001
ADT0     ADT0.**                                      AD       ALTER   0002 0001
ADT0     ADT0.**                                      CSS      ALTER   0002 0001
ADT0     ADT0.CIMS.**                                 IS       ALTER   0002 0001


The splicing has to occur by position 1 for 8 and position 55 for 17. There may be multiple records on INPUT2 for a single record on INPUT1 (like the ABENDAID records).
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 Nov 14, 2007 2:48 am    Post subject:
Reply with quote

Just use two ON fields - ON(1,8,CH) ON(55,17,CH) and WITHALL in the SPLICE operator.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Nov 14, 2007 3:00 am    Post subject: Reply to: SPLICE Command with multiple common fields
Reply with quote

I attempted to use your suggestion and received the following error:

Code:

          * Splice the needed data from File1 and File2 together           
          SPLICE FROM(TEMP2) TO(COMBINE) ON(1,8,CH) ON(55,17,CH) WITHALL   
ICE613A 0 REQUIRED KEYWORD MISSING:  WITH                                   
ICE602I 0 OPERATION RETURN CODE:  12                                       
                                                                           
                                                                           
ICE601I 0 DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE:  12
             
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Nov 14, 2007 3:08 am    Post subject: Reply to: SPLICE Command with multiple common fields
Reply with quote

I used the following and was successful. Thank you for your time and input.

Code:

SPLICE FROM(TEMP2) TO(COMBINE) ON(1,8,CH) ON(55,17,CH) WITHALL -       
       WITH(10,44) WITH(72,4)                                         
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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am


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