ca.portal.admin

Batch question

Discussion created by ca.portal.admin on Mar 10, 2008
Is it possible to call an IDMS batch program running in CV mode, from a
non-IDMS batch program?

Kay Rozeboom
State of Iowa
Information Technology Enterprise
Department of Administrative Services
Telephone: 515.281.6139 Fax: 515.281.6137
Email: Kay.Rozeboom@Iowa.Gov

"
IDMS Public Discussion Forum
IDMS-L@LISTSERV.IUASSN.COM
SMTP
IDMS-L@LISTSERV.IUASSN.COM
IDMS-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
Batch question
"Is it possible to call an IDMS batch program running in CV mode, from a
non-IDMS batch program?

Kay Rozeboom
State of Iowa
Information Technology Enterprise
Department of Administrative Services
Telephone: 515.281.6139 Fax: 515.281.6137
Email: Kay.Rozeboom@Iowa.Gov
"
IDMS Public Discussion Forum
IDMS-L@LISTSERV.IUASSN.COM
SMTP
IDMS-L@LISTSERV.IUASSN.COM
IDMS-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
Re: [IDMSVENDOR-L] Batch question
"kay - you may also need to insert the idms system and idms
environment-specific loadlibs into the job's steplib or joblib
concatenation


Chris Hoelscher
Senior IDMS & DB2 Database Administrator
Humana Inc
502-476-2538
choelscher@humana.com



The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information.
"
IDMS Public Discussion Forum
IDMS-L@LISTSERV.IUASSN.COM
SMTP
IDMS-L@LISTSERV.IUASSN.COM
IDMS-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
Re: Batch question
"Kay,

We have done this at ObjEx on many occasions. For performance reasons
you usually do not want to use a single subroutine that binds a rununit,
readies areas, binds records, perform DML and finishes. This will
result in substantial unnecessary overhead if your calling batch job has
many calls to make. Our recommendation is to construct a subroutine
service in three pieces.

The first will handle initial setup, primarily BIND RUN-UNIT and area
READYs. The second will primarily handle repetitive access, and the
third will handle termination tasks, such as FINISH. You could do all
this in one routine but it complicates the calling process. The three
program method also makes it easy to code several different access
programs that could be called in the same rununit. Using this approach,
your calling program would begin by making a call the initial routine.
Then it would call as many access routines as it needs. When done it
calls the finish routine. I have attached a few notes provided by Pat
Roehl, our chief technical person.

This can be done easily if you keep a few simple concepts in mind:

1) IDMS won't realize it's being called from different places if you
pass SUBSCHEMA-CTRL around to all of the programs. The calling program
should allocate it. (Have it defined in its working-storage. The
actual layout isn't needed, but be sure there is enough room for it -
PIC X(216) or larger.) Making it larger than needed won't hurt
anything.

2) Record binds tell IDMS where to place the data when retrieval
commands are used and where the data already is on update commands.
Consequently records binds should be performed in your access program
every time it is called. Records binds are very simple, efficient
commands and you will see little or no overhead for doing this. (As an
alternative you could allocate your database records in the calling
program and pass them around. However, for more than a handful of
records this could become a source of errors.)

3) All of the working-storage in the called programs will be
non-persistent. That is, when the program does a GOBACK only LINKAGE
items are sure to survive. If you need persistent items such as
counters, records or status information, they should be defined in a
separate ""01 level"" record and passed along with SUBSCHEMA-CTRL. More
than likely you will want some kind of status record to be able to
report and errors back to the calling program.

CA has provided convenient pre-compiler directives to make developing
this kind of split-program function easy.

Initialization Program:
COPY IDMS ... To Accomplish
SUBSCHEMA-CTRL Copy just the subschema control block.
SUBSCHEMA-SSNAME
SUBSCHEMA-AREANAMES Copy just the items needed for BIND RUN-UNIT and
area READYs. This omits the frequently-large list of records and sets.

Access Program:
COPY IDMS ... To Accomplish
SUBSCHEMA-CONTROL Copy all subschema control items.
SUBSCHEMA-BINDS Generate BIND RUN-UNIT and all record bind commands.
Use this if you don't need to manually bind your run-unit.
SUBSCHEMA-RECORD-BINDS Generate BIND RECORD commands for every IDMS
record in the program. Use this command if you manually code the BIND
RUN-UNIT command. (This command is redundant with SUBSCHEMA-BINDS.)

Termination Program:
COPY IDMS ... To Accomplish
SUBSCHEMA-CTRL Copy just the subschema control block.

Thanks,

Tom Hebert
ObjEx, Inc.
908-813-2866

Outcomes