Mainframe Software

How can I tell if a batch program is running in CV or Local mode?

By Gary Cherlet posted 05-14-2015 07:38 AM

  

Another post from the "IDMS Help Desk" series. As with previous posts on this blog - the question is in the post and in the attachment along with the reply. As a result of Chuck Hardee's contribution, below, the attachment has been updated to reflect the use of IDMSIN01 to determine if a program is running under Local or CV mode, as well as access other potentially useful run-time environment variables. Obviously the original solution was very old, and I believe predated IDMSIN01. Regardless of the history - we would always recommend using published CA-IDMS API's which provide the desired functionality. Thanks Chuck!

 

Enjoy - cheers - GaryC

 

-----Original Message-----

 

From:          IDMS User

To:              IDMS Help Desk

Subject:      How can I tell if a batch program is running in CV or Local mode?

 

We have a situation where, after the BIND RUN UNIT, if the program is running in Local Mode we will want to READY … RETRIEVAL and only issue retrieval DML verbs. But if we are running in CV Mode we will READY … UPDATE and we may issue update DML verbs.

 

How can we determine this programmatically, at run-time?

   

Thank you

IDMS User – Application Developer / Application Support

 

 

 

 

 

 

 

4 comments
0 views

Comments

05-20-2015 10:27 AM

Not a bad method, I use the same concept in several REXXs to see whether or not they should access a CV or not. But, the mechanism relies on an interface that could change in time since it is technically not an approved method and IDMSIN01 is.Hopefully, soon, I will try calling IDMSIN01 directly in my REXX. I'll have to let everyone know if it works. 

05-20-2015 10:08 AM

We wrote a batch program to read the SYSCTL file to determine is CV is up or down and is the step before the step that runs in CV mode.

05-19-2015 02:01 PM

Thanks for the "tech tip" Chuck! This post and its attachment have been updated, appropriately I hope, to reflect this new information. Cheers - Gary

05-14-2015 07:57 AM

And this all falls apart when CA changes the internal workings of IDMS for some reason or the other!

You shouldn’t be doing that!

Remember, the field being used is an IDMS INTERNAL field, not a field that is documented for the function described.

 

You should use the IDMSIN01 routine, documented in the Callable Services Manual, and make an ENVINFO call.

 

This call returns the following information:

 

Mode:                  What mode the program is executing in:

                                L ::== BATCH LOCAL

                                B ::== BATCH TO CV

                                C ::== CICS

                                D ::== IDMS/DC

TAPE#:                  Tape VolSer of the current release of IDMS

REL#:                     Current Release number of IDMS

SPACK:                 Current service pack within the IDMS release

DMCL:                   DMCL name being used

NODE:                   Node name where rununit is being executed

 

This information needed to call IDMSIN01 is documented for calling from Assembler, COBOL, PL/1 and ADS.

 

Chuck

 

 

Charles (Chuck) Hardee

Senior Systems Engineer/Database Administration

EAS Information Technology

 

Thermo Fisher Scientific

300 Industry Drive | Pittsburgh, PA 15275

Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230

Chuck.Hardee@ThermoFisher.com | www.thermofisher.com

 

WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent of a system responsible for delivering the message to the intended recipient, is prohibited. If you are not the intended recipient, please inform the sender and delete all copies.