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

How to JOIN two datasets like this?


IBM Mainframe Forums -> FAQ & Basics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mindless Tree

New User


Joined: 25 Jun 2022
Posts: 5
Location: India

PostPosted: Sat Jun 25, 2022 8:42 pm
Reply with quote

I am a beginner in JCL.
Using DFSORT/ICETOOL, how do i get the following output?


Input File 1:
Code:

 P_KEY      COLA1      COLA2 
    0A          55           26       
    0B          52           26       



Input File 2:
Code:

 P_KEY      COLB1      COLB2 
    0A          55           26       
    0C          57           22       


Output File:
Code:

 P_KEY       COLA1      COLA2      COLB1      COLB2 
 0A            55            26    55           26       
 0B            52            26                                     
 0C                                57           22 
[/code]
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2141
Location: USA

PostPosted: Sat Jun 25, 2022 10:26 pm
Reply with quote

1) You CANNOT do it using JCL, either you are a beginner, or not.

2) You can do it using JOIN operation provided by any SORT tool.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Sun Jun 26, 2022 8:19 am
Reply with quote

Welcome!
It’s simple.
Please read here and see sample examples and give a try. If you still facing issues then reply back with errors and We will help you.
www.ibm.com/docs/en/zos/2.2.0?topic=files-joinkeys-application-examples
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1335
Location: Bamberg, Germany

PostPosted: Mon Jun 27, 2022 10:53 am
Reply with quote

For beginners there is this partner forum at https://www.ibmmainframeforum.com.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Mon Jun 27, 2022 5:48 pm
Reply with quote

They can still post here and I move them to students section if it’s beginner level post.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1335
Location: Bamberg, Germany

PostPosted: Mon Jun 27, 2022 7:13 pm
Reply with quote

Basically this means everyone can post to the experts forum, the beginners forum (website) is obsolete. If a question here seems to be at students/beginners level, it's being moved to a subsection.
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 -> FAQ & Basics

 


Similar Topics
Topic Forum Replies
No new posts JES datasets IO Error ABENDS & Debugging 3
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts Join multiple records using splice DFSORT/ICETOOL 7
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
Search our Forums:

Back to Top