View previous topic :: View next topic
|
Author |
Message |
k_sanu4u
New User
Joined: 23 Mar 2007 Posts: 8 Location: india
|
|
|
|
how to make sure a subroutine is called dynamically ...? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
k_sanu4u wrote: |
how to make sure a subroutine is called dynamically ...? |
The simplest way it to not tell the compiler what the subroutine name is so the compiler can't tell the linker......
CALL dataname USING...... where dataname is an area in WS containing the subroutine name. |
|
Back to top |
|
|
munikumar Currently Banned New User
Joined: 18 Apr 2007 Posts: 24 Location: India
|
|
|
|
Also we have a compiler options in order to distinguish a call.
Use DYNAM to make a dynamic call. (Of course there is NODYNAM also) |
|
Back to top |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
William already answered your question, If you call the program using literal it will be called statically or if you pass the program name to a working storage varaible and call then it will called dynamically. The other option is to have 'DYNAM' as compiler option |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
By using program code rather than relying on the compiler parm, you protect your intended code, and it is clear to any reader what's going on. |
|
Back to top |
|
|
|