Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to make sure a subroutine is called dynamically

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
k_sanu4u

New User


Joined: 23 Mar 2007
Posts: 8
Location: india

PostPosted: Mon Apr 23, 2007 4:36 pm    Post subject: How to make sure a subroutine is called dynamically
Reply with quote

how to make sure a subroutine is called dynamically ...?
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Apr 23, 2007 4:43 pm    Post subject: Re: subroutine
Reply with quote

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
View user's profile Send private message
munikumar
Currently Banned

New User


Joined: 18 Apr 2007
Posts: 24
Location: India

PostPosted: Wed Apr 25, 2007 2:17 pm    Post subject: Re: How to make sure a subroutine is called dynamically
Reply with quote

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
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Wed Apr 25, 2007 2:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 973
Location: Richmond, Virginia

PostPosted: Thu Apr 26, 2007 1:05 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CA SYSVIEW - MQTHRESH updating dynami... Anilkumarmq CA Products 2 Fri Jun 08, 2018 2:06 pm
No new posts Dynamically updating the MQ monitorin... Anilkumarmq Java & MQSeries 0 Fri Jun 08, 2018 2:05 pm
No new posts Creation of Datasets dynamically on t... Raghu M N DFSORT/ICETOOL 8 Fri Mar 16, 2018 12:56 am
No new posts CICS called and calling program rizwanaccy CICS 1 Thu Feb 01, 2018 4:34 pm
No new posts attchmvs from rexx subroutine that re... harisukumaran CLIST & REXX 1 Fri Jan 19, 2018 5:29 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us