| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
meetsrk
Joined: 13 Jun 2004
Posts: 86
|
| Posted: Sat Sep 25, 2004 12:08 am Post subject: dynamic calling |
|
|
hi ppl,
can we call a subprogram dynamically .... if yes , explain? |
|
| Back to top |
|
priya
Joined: 24 Jul 2003
Posts: 624
Location: Bangalore
|
| Posted: Sat Sep 25, 2004 8:34 am Post subject: Hi |
|
|
Yes, you can call a sub program dynamically.
For example,
ACCEPT A.
CALL A.
The value of A is known only at run time.
To call a program dynamically you must specify the 'DYNAM' Complier option. |
|
| Back to top |
|
meetsrk
Joined: 13 Jun 2004
Posts: 86
|
| Posted: Sun Sep 26, 2004 1:07 am Post subject: |
|
|
thnx priya.
i tried tht way but i got a error saying DYNAM option was missing. can u tell me how and where to give that option? |
|
| Back to top |
|
sandip_datta
Joined: 02 Dec 2003
Posts: 152
Location: Tokyo, Japan
|
| Posted: Sun Sep 26, 2004 2:36 pm Post subject: |
|
|
Hi meetsrk,
DYNAM is the compiler option with which you have to compile the calling program. |
|
| Back to top |
|
mmwife
Joined: 30 May 2003
Posts: 1526
|
| Posted: Mon Sep 27, 2004 8:17 am Post subject: |
|
|
Hi meetsrk,
The paragraphs below show all possible ways to invoke STATIC/DYNAMIC CALLs:
If compiled as NODYNAM:
CALL 'literal' is a static call
CALL WS-label is a dynamic call
If compiled as DYNAM:
CALL 'literal' is a dynamic call
CALL WS-label is a dynamic call |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|