View previous topic :: View next topic
|
Author |
Message |
Eshwar CICS
New User
Joined: 18 May 2011 Posts: 47 Location: India
|
|
|
|
Related to the same post, RUN UNITs are created in CICS ;
1. Whenever CICS executes the program for a transaction
or
2. A module is linked to
or
3. A module is XCTLed to
Is it possible to create RUN-UNITs in COBOL during batch executions?
Please let me know if this has to be started as new POST. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
RUN-UNIT's in CICS are Task's, unless programs within the task are issuing SYNCPOINTS (give me a good reason to override DTB), then the RUN-UNIT can become fractured (UOW coronary).
But still, a TASK is defined as a RUN-UNIT until task termination....
Mr. Bill |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Bill, from the CICS Applicaiton Programming Guide:
Quote: |
| 1.4.4 Mixing languages
| A run unit is a running set of one or more programs that communicate with
| each other by COBOL static or dynamic CALL statements. In a CICS
| environment, a run unit is entered at the start of a CICS task, or invoked
| by a LINK or XCTL command. A run unit can be defined as the execution of a
| program defined by a PROGRAM resource definition, even though for dynamic
| CALL, the subsequent PROGRAM definition is needed for the called program. |
A batch program in COBOL is a run unit -- but based upon the LE definition in the LE Vendor Interface manual, .
Quote: |
Run unit
A statically and/or dynamically bound running set of one or more programs (defined below) that communicate with each other by CALL statement. In a CICS environment, a run unit is called at the start of a CICS task (triggered by entering a transaction ID at the terminal) or by issuing EXEC CICS LINK or EXEC CICS XCTL commands from another run unit. Each run unit has its own Language Environment environment. |
it does not appear you can have mutliple run units in batch -- at least not without using LE runtime calls to set one up. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Eshwar CICS wrote: |
[...]
Is it possible to create RUN-UNITs in COBOL during batch executions?
Please let me know if this has to be started as new POST. |
One of those times to be clear about what you are interested in achieving, rather then floundering around with terminology.
What do you want to do?
Yes, it would have been better as a new post. Perhaps do that with the re-wording, unless a moderator beats you to it. |
|
Back to top |
|
|
Eshwar CICS
New User
Joined: 18 May 2011 Posts: 47 Location: India
|
|
|
|
Bill,
This forum is a great place where i have learned & continue to learn from experts like you. Your initial reply to this post shows the Ocean of knowledge which you have gained with your experience.Thanks for sharing your knowledge.
Robert,
In past we had a unique need in COBOL batch program, where creating RUN-UNITs as in CICS was needed.But we didnt find a way of doing that.Thanks for the confirmation. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Eshwar: from the LE Application Programming Guide:
Quote: |
5.4.1 Understanding the basics
In Language Environment, you can use the following methods to create a child enclave:
Under CICS, the EXEC CICS LINK and EXEC CICS XCTL commands (see CICS Application Programming Guide for more information about these commands).
Under z/OS, the SVC LINK macro
Under z/OS, the C system() function (see z/OS XL C/C++ Programming Guide for more information about system()).
Under z/OS, the PL/I FETCH and CALL to any of the following PL/I routines with PROC OPTIONS(MAIN) specified:
Enterprise PL/I for z/OS
PL/I for MVS & VM
OS PL/I Version 2
OS PL/I Version 1 Release 5.1
Relinked OS PL/I Version 1 Release 3.0 - 5.1
Such a routine, called a fetchable main in this book, can only be introduced by a FETCH and CALL from a PL/I routine. COBOL cannot dynamically call a PL/I main and C cannot issue a fetch() against a PL/I main. In addition, a fetchable main cannot be dynamically loaded using the CEELOAD macro.
The routine performing the FETCH and CALL must be compiled with the Enterprise PL/I for z/OS or the PL/I for MVS & VM compiler, or be a relinked OS PL/I routine.
If the target routine of any of these commands is not written in a Language Environment-conforming HLL or Language Environment-conforming assembler, no nested enclave is created. |
So it appears if you want to do this in COBOL, you have to write an interface to C, PL/I, or Assembler. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Robert,
OK, I stand corrected.
Should have consulted the doc (again)....
Mr. Bill |
|
Back to top |
|
|
Gijz
New User
Joined: 27 Nov 2007 Posts: 9 Location: The Netherlands
|
|
|
|
Eshwar CICS wrote: |
In past we had a unique need in COBOL batch program, where creating RUN-UNITs as in CICS was needed.But we didnt find a way of doing that.Thanks for the confirmation. |
Eshwar,
This you can do by using the External CICS Interface (EXCI). With the help of EXCI you can start CICS transaction(s) from your batch program, creating a separate RUN-UNIT every time. Mind you the processing is synchronous, meaning the batch program will pause processing until the CICS task has ended and given back a reponse. If you want several RUN-UNIT's active simultaneously you would have to issue START TRANSID's from your started transaction/task.
Currently I'm programming a one-off batch program whereby I need to execute an already programmed CICS function several times. |
|
Back to top |
|
|
Eshwar CICS
New User
Joined: 18 May 2011 Posts: 47 Location: India
|
|
|
|
Thanks Gijz. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
glad I did not respond.
had no idea that he wanted to invoke a CICS transaction from Batch. |
|
Back to top |
|
|
Eshwar CICS
New User
Joined: 18 May 2011 Posts: 47 Location: India
|
|
|
|
My requirement of creating RUN-UNITs was purely in Batch, for which Robert Sample has provided the best direction.
Said thanks to Gijz because he explained how this can be accomplished when BATCH - CICS coordinate in processing. |
|
Back to top |
|
|
|