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
 

 

DYNAMIC and STATIC Linking in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
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: DYNAMIC and STATIC Linking in COBOL
Reply with quote

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

shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
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

Active Member


Joined: 22 Nov 2005
Posts: 700
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
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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm


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