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
 

 

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 Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm


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