how to write sort condition to output file using cobol
Posted: Fri Aug 26, 2016 4:59 pm
Hi Everyone,
I am new to this forum, so if there is any mistake teach me...
I would like to know how can we able to write a cobol program or logic to read a record from input file and write to a output file of length 80 bytes.
the input file has many records each 4 bytes of data.
input file:
ADAM
BASU
DAVE
JOHN
MARY
NICK
RAJA
SARA
......
.......
the output file should look like below...
INCLUDE COND=(1,4,EQ,C'ADAM,BASU,DAVE',
OR,1,4,EQ,C'JOHN,MARY,NICK',
OR,1,4,EQ,C'RAJA,SARA'),FORMAT=SS
Regards,
Mohamed
I am new to this forum, so if there is any mistake teach me...
I would like to know how can we able to write a cobol program or logic to read a record from input file and write to a output file of length 80 bytes.
the input file has many records each 4 bytes of data.
input file:
ADAM
BASU
DAVE
JOHN
MARY
NICK
RAJA
SARA
......
.......
the output file should look like below...
INCLUDE COND=(1,4,EQ,C'ADAM,BASU,DAVE',
OR,1,4,EQ,C'JOHN,MARY,NICK',
OR,1,4,EQ,C'RAJA,SARA'),FORMAT=SS
Regards,
Mohamed