Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 962
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 How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
This topic is locked: you cannot edit posts or make replies. How to supply called sub-program from... dchristensen JCL & VSAM 25 Wed Sep 14, 2016 11:36 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us