IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Importance of IDMS FINSIH


IBM Mainframe Forums -> IDMS/ADSO
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seahawk789

New User


Joined: 22 Feb 2010
Posts: 56
Location: Cochin

PostPosted: Sat Mar 29, 2014 1:18 am
Reply with quote

I have a clarification on the FINISH statement.
I understand that FINISH statement is generally used to end a run unit by releasing database resources and to prevent potential time-outs. My query is even if the program does not specify a FINISH explicitly in the code, when the COBOL program completes successfully, does the run-unit terminate and the resources gets freed up by default even if there is no FINISH ?

Is it similar to the case as in files ? I mean something like we do not specify a CLOSE statement of a FILE towards end of a COBOL program. But when program completes the file is automatically closed.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2772
Location: NYC,USA

PostPosted: Sat Mar 29, 2014 3:22 am
Reply with quote

Code:
DML207

FINISH Not Issued

Reason:

The FINISH statement either has not been coded or has been coded incorrectly. Check the FINISH statement for proper syntax. Note that programming logic for subprograms or for non-IDMS programs may generate this warning automatically; in this case, corrective action is unnecessary.

Severity:

W


A "FINISH" should always be issued before terminating a program. Issue the FINISH as soon as database I/O is completed to free-up resources and to prevent potential time-outs

Also if you are using RETURN-CODE in your program then the value in it would get overriden by FINISH.

All in All it is recomended not to miss FINISH for thr RUN-UNIT to get it ended otherwise get ready for surprises.


Yes file will be closed at then end.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2772
Location: NYC,USA

PostPosted: Sat Mar 29, 2014 4:36 am
Reply with quote

I was just happened to review,

support.ca.com/cadocs/0/CA%20IDMS%2018%205%20User%20Bookshelf-ENU/Bookshelf_Files/PDF/IDMS_Navigational_DML_ENU.pdf

And found that with and without a FINISH would results into different results and that varies per scenario. For e.x. Area Lock ( Local Mode) the locks remian set unless it finds FINISH. FINISH would also update all statistical information as needed for every DB operation

So you might have to read this completely for importance of FINISH and then I am sure you would get answer to all your doubts.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IDMS/ADSO

 


Similar Topics
Topic Forum Replies
No new posts IDMS record copybook IDMS/ADSO 3
No new posts Can records in IMS/DB be related usin... IMS DB/DC 2
No new posts IDMS DC027007 T58 TASK:ADS2 PROG:ADSO... IDMS/ADSO 2
No new posts IDMS/DC-COBOL program - SNAP error wh... IDMS/ADSO 5
No new posts ADS 3270 Batch simulator for IDMS rel... IDMS/ADSO 1
Search our Forums:

Back to Top