Page 1 of 1

Can we write a module which can be used both in batch and..

Posted: Fri May 22, 2015 12:35 pm
by Harshit Desai
Hi,

The subject line could not take the full question so I am repeating it here again: Can we write a module which can be used both in batch and CICS? If yes, can you please guide me on this?

Appreciate any help on this.

Re: Can we write a module which can be used both in batch an

Posted: Fri May 22, 2015 1:33 pm
by enrico-sorichetti
Can we write a module which can be used both in batch and CICS? If yes, can you please guide me on this?
only if the module does not use any cics facility

Re: Can we write a module which can be used both in batch an

Posted: Thu Jun 04, 2015 9:07 pm
by Harshit Desai
Thanks enrico. I was searching for an example of this nature on IBM site but could not find one. Is there some example of this feature available ?

Re: Can we write a module which can be used both in batch an

Posted: Thu Jun 04, 2015 10:22 pm
by nicc
Have you googled or asked your support?

Re: Can we write a module which can be used both in batch an

Posted: Thu Jun 04, 2015 10:30 pm
by enrico-sorichetti
Is there some example of this feature available ?
it is not a feature, just applying some reasonable logic.

1) a CICS program cannot use some BATCH constructs
2) a BATCH program cannot use CICS constructs

at the end You are left with a subroutine/function that satisfies both constraints

Re: Can we write a module which can be used both in batch an

Posted: Thu Jun 04, 2015 11:34 pm
by Robert Sample
If you are writing COBOL, the program cannot use files (no SELECT, no FD, no OPEN / READ / WRITE / CLOSE statements) and expect to work under CICS. The program cannot use EXEC CICS statement and expect to work under batch. As long as you write your code with the restrictions (there are others -- check the manuals for details), the program can run under CICS and batch. Most sites, however, write two separate modules to allow for customization to the environment.