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

How to find Static Call or Dynamic Call


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shriya reddy
Warnings : 1

New User


Joined: 05 Jun 2004
Posts: 43

PostPosted: Mon Aug 16, 2004 11:35 am
Reply with quote

Hi Friends,

I am writing a cobol pgm in that i call three sub modules(A,B,C).

if i call these modules Dynamically where i specify these modules called dynamically.
if i call these modules Statically where i specify these modules called Statically.

Is there any syntax for these dynamic call & staticcall in cobol.
please show me thru example.


Bye
Shriya.
Back to top
View user's profile Send private message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 150
Location: Tokyo, Japan

PostPosted: Mon Aug 16, 2004 12:09 pm
Reply with quote

Hi Shriya,

For calling submodules DYNAMICALLY -

Code:
In Working Storage Section -

01 WS-PROGRAM        PIC X(08).

MOVE 'SUBPROGA' TO WS-PROGRAM
CALL WS-PROGRAM USING ....(Your Parameters)

MOVE 'SUBPROGB' TO WS-PROGRAM
CALL WS-PROGRAM USING ....(Your Parameters)

MOVE 'SUBPROGC' TO WS-PROGRAM
CALL WS-PROGRAM USING ....(Your Parameters)



For Calling STATICALLY, check your compiler option. If it is NODYNAM then use -

Code:
CALL 'SUBPROGA' USING ...(Your parameters)
CALL 'SUBPROGB' USING ...(Your parameters)
CALL 'SUBPROGC' USING ...(Your parameters)


Regards,
Sandip.
Back to top
View user's profile Send private message
sudarsanreddy_k

New User


Joined: 16 Aug 2004
Posts: 3
Location: chennai

PostPosted: Mon Aug 16, 2004 9:12 pm
Reply with quote

IDENTIFYING STATIC AND DYNAMCI CALL THROUGH COBOL PRG:
static call uses literal while calling, where dynamic call uses identifier which should be declared in the working storage section.

IDENTIFYING THROUGH COMPILER:
for static call we have lked.syslin in compile program.

IDENTIFYING TRHOUGH RUN JCL :
in jcl for static call we mention 'nodyn' in parm parameter, for dynamci call we mention 'dyn' in parm parameter.
if nothing is mentioned in parm parameter then default is static.
Back to top
View user's profile Send private message
sudarsanreddy_k

New User


Joined: 16 Aug 2004
Posts: 3
Location: chennai

PostPosted: Mon Aug 16, 2004 9:13 pm
Reply with quote

IDENTIFYING STATIC AND DYNAMCI CALL THROUGH COBOL PRG:
static call uses literal while calling, where dynamic call uses identifier which should be declared in the working storage section.

IDENTIFYING THROUGH COMPILER:
for static call we have lked.syslin in compile program.

IDENTIFYING TRHOUGH RUN JCL :
in jcl for static call we mention 'nodyn' in parm parameter, for dynamci call we mention 'dyn' in parm parameter.
if nothing is mentioned in parm parameter then default is static.
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 db2 vs static data COBOL Programming 1
No new posts sort to find out the char which repea... Mainframe Interview Questions 10
No new posts Compare 2 alphabets in a REXX and fin... CLIST & REXX 2
No new posts Call an hlasm from REXX in batch and ... CLIST & REXX 4
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top