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
how to write sort condition to output file using cobol
Moderators: dbzTHEdinosauer, Moderator Group
-
- Member
- Posts: 1
- Joined: Fri Aug 26, 2016 3:56 pm
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
why not look at other sort statements, such as JOIN,
where instead of the risk of creating a control card which would exceed the allowable length (or number of) control cards
JOIN would allow you to use the complete file of 4 char as a file and use it to match against another imput file.
where instead of the risk of creating a control card which would exceed the allowable length (or number of) control cards
JOIN would allow you to use the complete file of 4 char as a file and use it to match against another imput file.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page