Can a subroutine of the COBOL program be generated by Dynamic call?
book
Article ID: 123518
calendar_today
Updated On:
Products
Telon Application Generator
Issue/Introduction
For TELON R2.1B and/or R5.1, the subroutine of the COBOL program generated by Telon is STATIC CALL. Can a subroutine of the COBOL program be generated by Dynamic call? Are there any impacts if change it to Dynamic call?
Can a subroutine of the COBOL program be generated by Dynamic call? Are there any impacts if change it to Dynamic call?
Environment
MF, z/OS,
Resolution
Yes. However, it can be done since Telon 4.0 SP0 0106. Telon was originally written just to handle STATIC calls. All the called modules were link-edited together, and there was no need to make these modules available at run-time. With Telon 4.0 SP0 0106, we introduced Support for Dynamic Calls of Subroutines.
In the Telon 4.0 Release Summary we had the following;
A new parameter, DYNCALL (for the SETSYS and SETENV macros), allows specification of dynamic rather than static subroutine calls for generated code. When this parameter is set to Y, the following working storage definitions are produced: ******************************************************** * T E L O N E D I T N A M E S * ******************************************************** SKIP1 01 TELON-EDIT-NAMES. 05 DYN-ODATE PIC X(8) VALUE 'ODATE'. ******************************************************** * T E L O N A B E N D N A M E S * ******************************************************** SKIP1 01 TELON-ABEND-NAMES. 05 DYN-ADLAABT PIC X(8) VALUE 'ADLAABT'. 05 DYN-ADLAAB0 PIC X(8) VALUE 'ADLAAB0'. 05 DYN-ADLAAB1 PIC X(8) VALUE 'ADLAAB1'. ******************************************************** * T E L O N D Y N A M I C S U B R O U T I N E S * ******************************************************** SKIP1 01 TELON-DYNAMIC-NAMES. 05 DYN-TLRATIO PIC X(8) VALUE 'TLRATIO'. 05 DYN-ADRASTG1 PIC X(8) VALUE 'ADRASTG1'. 05 DYN-TLRAMRI PIC X(8) VALUE 'TLRAMRI'. 05 DYN-TLRAMR0 PIC X(8) VALUE 'TLRAMR0'. SKIP1 In procedural code, the calls to subroutines are similar to the following: * DATE FIELD
SKIP1 MOVE 'DATE ' TO TRACE-FIELD-NAME. MOVE XFER-TODAYS-DATE TO WORKFLD-NUMERIC. CALL DYN-ODATE USING TPO-DATE TPO-DATE-LTH WORKFLD-NUMERIC. And also: CALL DYN-ADLAABT USING ABNORMAL-TERMINATION-AREA IO-PCB XFER-PCB SQLCA SPA-XFER-WORK-AREA TP-BUFFER TPO-ERRMSG1.
By specifying dynamic calls, the load module for the calling program does not include the code for the subroutine, but only the calling sequence. As a result, a change to a subroutine will require the replacement of only one load module (for that subroutine) rather than a change to all programs which call that routine.
The impact if it is changed to Dynamic call, is the Dynamically called sub-routines need to be available at runtime, Or else you will get Load Failures S806's. member not in indicated library..