MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is it possible to call same cobol pgm frm CICS and Batch?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Jamylady
Beginner


Joined: 04 Nov 2004
Posts: 68
Topics: 22

PostPosted: Fri Apr 15, 2005 10:20 am    Post subject: Is it possible to call same cobol pgm frm CICS and Batch? Reply with quote

Hi,
Just a quick question to know if it is possible to call a cobol program (lets say a subroutine) from a CICS program and Batch Cobol program?

Thanks
Jimmy
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Apr 15, 2005 10:36 am    Post subject: Reply with quote

JamyLady,

yes you can call a Subroutine from CICS as well as Batch program.

Check this link which explains in detail about calling subprograms from COBOL in CICS

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFHP3A04/1.4.5?DT=20050112153951

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
powerhawk
Beginner


Joined: 08 Nov 2004
Posts: 28
Topics: 4
Location: Stockholm

PostPosted: Wed Apr 20, 2005 6:36 am    Post subject: Reply with quote

You can also call a CICS program from a batch program. Like this:

Code:
EXEC CICS LINK PROGRAM    ('LK0200')                       
                          TRANSID     ('EXCI')                         
                          APPLID      (TARGET-SYSTEM)                   
                          COMMAREA    (LOCOMM01)                       
                          LENGTH      (LENGTH OF LOCOMM01)             
                          DATALENGTH  (LENGTH OF LOCOMM01)             
                          RETCODE     (EXCI-EXEC-RETURN-CODE)         
                          SYNCONRETURN                                 
END-EXEC
Back to top
View user's profile Send private message Send e-mail
Jamylady
Beginner


Joined: 04 Nov 2004
Posts: 68
Topics: 22

PostPosted: Thu Apr 21, 2005 3:28 am    Post subject: Reply with quote

powerhawk, ,
I am just wondering whether the Batch cobol compiler will be able to understand the CICS statements such as EXEC CICS LINK PROGRAM ...??
Could you please explain?
Thanks

JA
Back to top
View user's profile Send private message
powerhawk
Beginner


Joined: 08 Nov 2004
Posts: 28
Topics: 4
Location: Stockholm

PostPosted: Fri Apr 22, 2005 7:20 am    Post subject: Reply with quote

Yes, you need a step in the compile job to translate EXEC CICS till Call 'DFHXCIE' using...

In our installation:
//TRN EXEC PGM=DFHECP1
Back to top
View user's profile Send private message Send e-mail
Jamylady
Beginner


Joined: 04 Nov 2004
Posts: 68
Topics: 22

PostPosted: Fri Apr 22, 2005 8:17 am    Post subject: Reply with quote

powerhawk,
Thanks, But i dont think I will be able to use that facility as we wont be able to change the compile jcl (We are using CHANGEMAN, and I am not sure whether we able to update the compile JCL in ChangeMan

Thanks a million
JA
Back to top
View user's profile Send private message
neilxt
Beginner


Joined: 01 Mar 2004
Posts: 23
Topics: 1

PostPosted: Wed Sep 20, 2006 8:36 am    Post subject: Re: Is it possible to call same cobol pgm frm CICS and Batch Reply with quote

Jamylady wrote:
Hi,
Just a quick question to know if it is possible to call a cobol program (lets say a subroutine) from a CICS program and Batch Cobol program?

Thanks
Jimmy


I think that so long as

a) The called subroutine has no file access or other routine that would have to be handled by CICS.

b) There are no AMODE discrepancies.

c) The calling program uses "CALL" instead of an EXEC CICS LINK.

You should be OK.

I'm pretty sure I remember doing this although it should be noted that it was a long time ago and I was using static linking, not dynamic so there's a wrinkle there I'm not so sure about.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group