IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Splicing two input files


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mainframe_techie

New User


Joined: 15 Jul 2007
Posts: 23
Location: India

PostPosted: Wed Jul 18, 2007 8:10 pm
Reply with quote

All,

I am using splice operator in ice to get the desired results, but without any success.Here is the requirement:

Input file 1:

C1 ABC
C2 ABC
C3 ABC

Input file 2:

ABC J1
ABC J2

Expected Output :

C1 ABC J1
C1 ABC J2
C2 ABC J1
C2 ABC J2
C3 ABC J1
C3 ABC J2

Can anybody please help me out here??

Thanks,
mainframe_techie
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Jul 18, 2007 8:20 pm
Reply with quote

That's a Cartesian join. You can't do that directly with SPLICE.

There's a trick posted on another board that might help, but I can't give the URL here due to the Forum rules. If you send me a note offline (yaeger@us.ibm.com) I can give you the URL. Please put "DFSORT" somewhere in your Subject line to catch my attention.
Back to top
View user's profile Send private message
mainframe_techie

New User


Joined: 15 Jul 2007
Posts: 23
Location: India

PostPosted: Wed Jul 18, 2007 8:27 pm
Reply with quote

Frank,

Sent a note to you on the mail.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Sat Nov 21, 2009 12:44 am
Reply with quote

With z/OS DFSORT V1R5 PTF UK51706 or z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009), DFSORT now supports JOINKEYS which can do Cartesian join. Here's the DFSORT job for this example:

Code:
 
//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//IN1 DD *                           
C1 ABC                               
C2 ABC                               
C3 ABC                               
//IN2 DD *                           
     ABC    J1                       
     ABC    J2                       
//SORTOUT DD SYSOUT=*                 
//SYSIN    DD    *                   
  JOINKEYS F1=IN1,FIELDS=(4,3,A)     
  JOINKEYS F2=IN2,FIELDS=(6,3,A)     
  REFORMAT FIELDS=(F1:1,12,F2:13,2)   
  OPTION COPY                         
/*


For complete details on JOINKEYS and the other new functions available with the Nov, 2009 DFSORT PTF, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top