Basically my program logic revolves around 4 KSAM files(Index files) out of which 1 file will act as input and getting write/rewrite based on keys matched/unmatched
from other 3 files, will try to explain more below -
Its reading one file and getting the key which will get match with keys of other three, as i said if it matches with that one particular record will be rewritten in
that file and if not while matching with other file it will a new record write in that file.
Like wise it will happen for other 2 files as well and match with that one file to deicde if its write/rewrite of a record.
Initially, I have coded all the three READ scenario and matching logic in one cobol which never ended when i ran job because everytime while going to next read
scenario I have close the file and open it again as EOF file is set at above read, so I tried splitting cobol in to three separate read.
Anyone have suggestion on it, please share.
Job calling cobol running for long time
Moderators: dbzTHEdinosauer, Moderator Group
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Is the program eventually to run on a Mainframe? KSAM is not a Mainframe dataset-type.
Doing lots of keyed reads will take lots of time. You should test your program with very small files, so that you know the program logic works, before using bigger files.
You should be doing keyed reads, not serially searching files (so EOF not found, no need to CLOSE and re-OPEN).
Doing lots of keyed reads will take lots of time. You should test your program with very small files, so that you know the program logic works, before using bigger files.
You should be doing keyed reads, not serially searching files (so EOF not found, no need to CLOSE and re-OPEN).
Last edited by William Collins on Tue May 10, 2016 10:51 am, edited 1 time in total.
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
if on mainframe aned the keyed files are vsam, why not unload each to a qsam file,
in order of the primary key of the primary file,
and process this stuff as qsam, output qsam and use SORT to reload the qasm to vsam.
in order of the primary key of the primary file,
and process this stuff as qsam, output qsam and use SORT to reload the qasm to vsam.
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