Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : Command : SORT CHA / SORT CHANGED If we want to know what are all components modifed recently in a PDS. Go to PDS, type SORT CHA or SORT CHANGED, all members will be sorted on modifed date and time.

Google
 
Web mainframegurukul.com

Job calling cobol running for long time

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL
  View previous topic :: View next topic  
Author Message
nitika
Member


Joined: 15 Feb 2016
Posts: 3

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed May 04, 2016 10:51 am    Post subject: Job calling cobol running for long time Reply with quote

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.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

William Collins
Active Member


Joined: 24 May 2012
Posts: 732

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu May 05, 2016 3:27 pm    Post subject: Reply with quote

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).


Last edited by William Collins on Tue May 10, 2016 10:51 am; edited 1 time in total
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 981

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon May 09, 2016 6:01 pm    Post subject: Reply with quote

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.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB