21.02.2019

Dynamic Call Cobol Program

Dynamic Call Cobol Program Average ratng: 4,8/5 9994 reviews

The following situation occurs with a COBOL program doing a dynamic CALL to a subroutine that is compiled and linkedited to run in 24-bit mode. Jump to Dynamic linking with COBOL programs - Compile these programs as follows: $ cc -c `cob-config --cflags` hello-dynamic.c $ cobc -x -o.

Hoping someone here has more experience with dynamic linking than I do. I'm trying to get something to be dynamically callable from COBOL on z/OS. This is old-style dynamic calling, not DLL stuff. So I've found and have followed that (I believe), but get S806 ABENDs when calling the *second* entry point in the target module.

Dynamic call in cobol program

So either I've missed something, the example is wrong, I'm using some wrong option on the linkedit, or it's gremlins. The callee, with entry points DCALLEE and CALL2222 (yeah, stupid names, but I've been tinkering): ------------------------------------------- Identification Division. Environment Division. Configuration Section. Data Division. Working-Storage Section.

Procedure Division. Display 'DCALLEE got called'.

Entry 'CALL2222'. Display 'CALL2222 got called'.

End Program 'DCALLEE'. Phil, In order for MVS program management to find load module CALL2222, I think you need to add an ALIAS statement in the Binder Control cards: INCLUDE TESTPGMS(DCALLEE) ALIAS CALL2222 NAME DCALLEE(R) =============================================== Wayne Driscoll OMEGAMON DB2 L3 Support/Development wdrisco(AT) =============================================== From: Phil Smith To: Date: 03:05 PM Subject: Dynamic calls from COBOL Sent by: IBM Mainframe Discussion List Dale R. Smith 18/3/2011, 13:27 น. On Fri, 18 Mar 2011 13:03:00 -0700, Phil Smith wrote: >Hoping someone here has more experience with dynamic linking than I do. I'm trying to get something to be dynamically callable from COBOL on z/OS. This is old-style dynamic calling, not DLL stuff.

So I've found and have followed that (I believe), but get S806 ABENDs when calling the *second* entry point in the target module. So either I've missed something, the example is wrong, I'm using some wrong option on the linkedit, or it's gremlins. 2017 rnb mixs in waptrick. > Hi PHSIII!:-)> From the COBOL Programming Guide: Static calls to alternate entry points work without restriction. Dynamic calls to alternate entry points require the following elements:. Either explicitly specified NAME or ALIAS linkage-editor or binder control statements, or use of the NAME compiler option which generates them automatically. An intervening CANCEL for any dynamic call to the same module at a different entry point.

CANCEL causes the program to be invoked in initial state when it is called at a new entry point. Smith ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to with the message: GET IBM-MAIN INFO Search the archives at Frank Swarbrick 18/3/2011, 13:33 น.

Instead of messing with the binder control cards you can specify the COBOL compile option NAME(ALIAS) (which, in fact, adds the relevant binder control cards). 'If you specify NAME(ALIAS), and your program contains ENTRY statements, a link-edit ALIAS card is generated for each ENTRY statement.' -- Frank Swarbrick Applications Architect - Mainframe Applications Development FirstBank Data Corporation - Lakewood, CO USA P: 303-235-1403 On 3/18/2011 at 2:17 PM, in message, Wayne >>> The information contained in this electronic communication and any document attached hereto or transmitted herewith is confidential and intended for the exclusive use of the individual or entity named above. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any examination, use, dissemination, distribution or copying of this communication or any part thereof is strictly prohibited. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this communication. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to with the message: GET IBM-MAIN INFO Search the archives at McKown, John 18/3/2011, 13:36 น.

CALL2222 needs to be an ALIAS to DCALLEE when you do the binding (LKED step). Do you use the NAME(ALIAS) compiler option? You either need that or put in an ALIAS CALL2222 command in your link step.