Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Splicing two input files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Splicing two input files
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 Moderator


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

PostPosted: Wed Jul 18, 2007 8:20 pm    Post subject:
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    Post subject: Re: Splicing two input files
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 Moderator


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

PostPosted: Sat Nov 21, 2009 12:44 am    Post subject:
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:

http://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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us