IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to make sure a subroutine is called dynamically


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 3156
Location: Tucson AZ

PostPosted: Mon Apr 23, 2007 4:43 pm
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
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
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

Senior Member


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

PostPosted: Thu Apr 26, 2007 1:05 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts trying to make sense of keylists TSO/ISPF 11
No new posts Dynamically pass table name to a sele... DB2 2
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
No new posts FD Section to Create FB or Vb File Dy... COBOL Programming 1
No new posts Intertest Batch issue with called ass... COBOL Programming 4
Search our Forums:

Back to Top