JCL - SORT Joinkeys on 2 Variable length files

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
mailsenin
Member
Posts: 1
Joined: Fri Sep 19, 2014 11:03 am

JCL - SORT Joinkeys on 2 Variable length files

Post by mailsenin » Fri Sep 19, 2014 11:12 am

I want to join 2 variable length files.
Scenario : Need to pick the col1 and col2 from file1 and then compare with col4,col5 of 2nd file. After match need to update file1's colum3 with value pulled from col6 of 2nd file.

Eg: I/p File 1

col1 col2 col3
aaa us ......................
bbb ind ......................
ccc JP ......................
ddd au ......................
bbb ind ......................
aaa us ......................

I/p File 2

col4 col5 col6
aaa us apple
bbb ind grapes

Expected o/p

col1 col2 col3
aaa us apple
bbb ind grapes
ccc JP ......................
ddd au ......................
bbb ind grapes
aaa us apple


Please ping me the pseudo code for this scenario

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Fri Sep 19, 2014 7:43 pm

I cannot answer that because this is the JCL part of the forum not the SORT part. (See forum section below JCL - and read descriptions of both of them).
Regards
Nic

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Fri Sep 19, 2014 9:24 pm

And what problem are you having in doing this? It looks straightforward enough.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others