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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm


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