Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CICS online code to be used for both online and Batch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Fri Aug 29, 2008 11:22 pm    Post subject: CICS online code to be used for both online and Batch
Reply with quote

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
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Aug 29, 2008 11:51 pm    Post subject: Re: CICS online code to be used for both online and Batch
Reply with quote

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
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Sat Aug 30, 2008 12:46 am    Post subject:
Reply with quote

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
View user's profile Send private message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Sat Aug 30, 2008 6:35 am    Post subject:
Reply with quote

Thanx Bill and Ramya..

How can i convert a DELETEQ/WRITEQ CICS calls to normal COBOL code?
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sat Aug 30, 2008 6:36 am    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Sat Aug 30, 2008 6:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sat Aug 30, 2008 9:28 pm    Post subject:
Reply with quote

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>> www.batchcics.com
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sat Aug 30, 2008 9:47 pm    Post subject: Re: CICS online code to be used for both online and Batch
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Sun Aug 31, 2008 1:39 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Tue Sep 02, 2008 3:34 am    Post subject:
Reply with quote

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
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Tue Sep 02, 2008 5:09 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us