Can we use any utility to resolve this apart from Cobol pgm

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
ickgeek23
Member
Posts: 17
Joined: Tue Sep 13, 2011 7:57 am

Can we use any utility to resolve this apart from Cobol pgm

Post by ickgeek23 » Thu Mar 22, 2012 2:17 pm

Hi All,
I have 3 input files. These files will be having the student and the courses details

Input file1:-
Student Course1 Course2 Course3 Course4
S1 C1
S1 C2 C3
S1 C4
S2 C1


Input file2:-
Student Course1 Course2 Course3 Course4
S1 C3
S1 C4
S2 C3 C2

Input file3:-
Student Course1 Course2 Course3 Course4
S2 C5
S3 C6 C7

Maximum courses in the input file will be up to 4
ex:-
Student Course1 Course2 Course3 Course4
S1 C1 C2 C3 C4

Output file should contain all the records (duplicates should not be present)
Output file1:-
Student Course
S1 C1
S1 C2
S1 C3
S1 C4
S2 C1
S2 C2
S2 C3
S2 C5
S3 C6
S3 C7

Apart from writing the cobol program , do we use any utility like Sort or any other for this...

Thanks in Advance
:)[/size][/size]

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Thu Mar 22, 2012 4:09 pm

which sort product do you have on site?
dfsort or syncsort or another?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Thu Mar 22, 2012 10:55 pm

ickgeek23,

What is the RECFM and LRECL of each input file? What do you want for the RECFM and LRECL of the output file?

What is the starting position, length and format of each relevant field in each input file?
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

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