Page 1 of 1

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

Posted: Thu Mar 22, 2012 2:17 pm
by ickgeek23
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]

Posted: Thu Mar 22, 2012 4:09 pm
by dbzTHEdinosauer
which sort product do you have on site?
dfsort or syncsort or another?

Posted: Thu Mar 22, 2012 10:55 pm
by Frank Yaeger
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?