View previous topic :: View next topic
|
Author |
Message |
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
Hi
I have CICS online program. My requirement is to covert it into subroutine so that i can be called from my online program as well as the batch program. Can anyone give me any inputs on this? |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
As long as the program doesn't issue CICS-Only commands or Batch-Only commands, it can be called (via a CALL USING), from either CICS or Batch.
For example, if the sub-program is called to perform some sort of in-house interest calculation, then this would be a "shared" module.
By chance, will this "shared" sub-program be statically (not dynamically) calling an Assembler sub-program?
There's a reason I ask....
Regards,
Bill |
|
Back to top |
|
|
Ramya A
Active User
Joined: 26 Jul 2004 Posts: 104
|
|
|
|
I've seen a similar case in my previous shop. There we have 2 different libraries for online and batch copybooks. So, this is what we did:
Place all the CICS-only commands in one set of CICS copybooks. The batch counterpart for those commands should be stored in the BATCH copybooks - with the same names as the CICS copybooks.
Now, this module will act as CICS pgm when called from another CICS pgm and batch when called from another batch pgm.
I'm not sure how far this would work in your shop... |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
Thanx Bill and Ramya..
How can i convert a DELETEQ/WRITEQ CICS calls to normal COBOL code? |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
what does your CICS online program do that you need to call it from batch?
Does it contain any EXEC CICS COMMAND statements ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Only thing that I can add (positive) is to decide if you are a Dynamic or Static Link shop. If you are dynamic, insure the batch generated module is dynamically callable.
The shop I work at presently, generates a statically callable only batch module which is one-pain-in-the-butt when you have many modules that call the sub-program. everytime you change the subprogram you have to relink all the calling modules.
as Earl indicated, you don't want to have CICS API calls in the batch version.
TSQ reads/deletes need to be done in the CICS module that calls the cics version of the submodule.
Obviously, there is some info contained in the que item, which needs to be supplied by the batch module calling the batch subroutine. |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
How can i convert a DELETEQ/WRITEQ CICS calls to normal COBOL code?
You can't convert.
Either write your own EXCI interface from batch or consider using a vendor product to perform the deleteq/writeq from batch cobol code.
try>> Use [URL] BBCode for External Links |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
As soon as the "shared" sub-program is invoked, call a sub-program to determine the run-environment. Upon return, if the run-environment is CICS, call an additional sub-program, which will return the ADDRESS OF DFHEIBLK. Then upon return, call another CICS sub-program, which can issue the TSQ commands.
As long as the "shared" sub-program knows the environment and you've established DFHEIBK addressability, you can call subsequent sub-programs, to issue CICS or non-CICS commands.
HTH....
Regards,
Bill |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Deepthy Jose P,
Is your requirement:
1) isolate application code that can be used in batch or cics, without regard to the environment (batch or cics)
or
2) create a module that will use cics api's both from a batch or cics environment.
?? |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
My requirement is
1) isolate application code that can be used in batch or cics, without regard to the environment (batch or cics) |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
Jose,
as indicated earlier , your common applicaiton code CAN NOT execute
CICS commands in batch environment. However, you can wirte your own
EXCI interface to commmunicate with a CICS program from batch
OR purchase some 3rd party vendor software.
Talk to your CICS systems programmers, they should be able
to tell you best approach for your environment. |
|
Back to top |
|
|
|