Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Query on DYNAMIC and STATIC Linking in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
syntelraj
Warnings : 1

New User


Joined: 28 Jul 2006
Posts: 10
Location: Pune

PostPosted: Thu Aug 03, 2006 2:50 pm    Post subject: Query on DYNAMIC and STATIC Linking in COBOL
Reply with quote

Hi Guys,

Can any one explain the following scenario falls under STATIC or DYNAMIC linking?

Calling program has the below statment and at the time of linking NODYNAM option was used.

CALL WS-SUB-PROGRAM USING WS-VAR1

I just want to know what happens in this case.

Thank you very much for your time.
Back to top
View user's profile Send private message
References
PostPosted: Thu Aug 03, 2006 2:50 pm    Post subject: Re: Query on DYNAMIC and STATIC Linking in COBOL Reply with quote

shreevamsi

Senior Member


Joined: 23 Feb 2006
Posts: 320
Location: Hyderabad,India

PostPosted: Thu Aug 03, 2006 3:03 pm    Post subject: Re: Query on DYNAMIC and STATIC Linking in COBOL
Reply with quote

When a program that is compiled using the NODYNAM and NODLL compiler options, a static call occurs.

~Vamsi
Back to top
View user's profile Send private message
syntelraj
Warnings : 1

New User


Joined: 28 Jul 2006
Posts: 10
Location: Pune

PostPosted: Thu Aug 03, 2006 5:42 pm    Post subject: Re: Query on DYNAMIC and STATIC Linking in COBOL
Reply with quote

Thanks for your response Vamsi.

In this case what will be the value in the variable WS-SUB-PROGRAM?

I think there will be no memory is allocated to this variable at the compile time.

Do you mean the whatever value we initialze in the working storage the same will be used??

If we don't assign any value to WS-SUB-PROGRAM, does it cause any compilation ( I actually mean link) error?

Do you mean only during linking time the CALL type will be decided?

Even though all the questions similar, I want to make each and every point clear.

Could some please provide answers for each question.

Thank you very much for your time & patience.
Back to top
View user's profile Send private message
DavidatK

Senior Member


Joined: 22 Nov 2005
Posts: 715
Location: Troy, Michigan USA

PostPosted: Fri Aug 04, 2006 4:49 am    Post subject: Re: Query on DYNAMIC and STATIC Linking in COBOL
Reply with quote

Hi syntelraj,

The DYNAM/ NODYNAM compiler option only affects subroutine call in this format:

CALL 'MYSUB' USING ARG1.

If the NODYNAM option has been used, then the call is STATIC, If the DYNAM option was used the call is DYNAMIC.

Subroutine calls in this format:

CALL WS-SUB-PROGRAM USING WS-VAR1.

Are ALWAYS DYNAMIC calls.

Dave
Back to top
View user's profile Send private message
syntelraj
Warnings : 1

New User


Joined: 28 Jul 2006
Posts: 10
Location: Pune

PostPosted: Fri Aug 04, 2006 9:24 pm    Post subject: Re: Query on DYNAMIC and STATIC Linking in COBOL
Reply with quote

Thank you very much Dave for the clarification.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1