search cancel

How an IDMS-DC COBOL program can "CALL" another IDMS-DC COBOL program without link-editing the sub-program as part of the calling program

book

Article ID: 21011

calendar_today

Updated On:

Products

IDMS IDMS - Database IDMS - ADS

Issue/Introduction

Description:

The COBOL compile option DYNAM is not supported in IDMS. However, it is still possible to dynamically invoke a subprogram.

Solution:

In your mainline program you can could use a TRANSFER CONTROL statement that specifies a variable. In the code prior to this call, you would move the value of the subroutine name to this variable. This could would look something like this:

 	MOVE <subroutine_name> TO WS-SUB-NAME. 
 	TRANSFER CONTROL TO WS-SUB-NAME USING <parameter-list>. 

This approach will cause the subroutine to be loaded dynamically at run-time, so that it does not need to be included in the link-edit of the mainline COBOL program. This dynamic load of the subroutine is supported even though the compile option DYNAM is not.

Both the calling and called programs must be defined to sysgen.

Environment

Release: IDADSO00100-18.5-ADS-for CA-IDMS
Component: