Page 1 of 1

Static or dynamic call in COBOL.

Posted: Wed Nov 19, 2014 2:23 pm
by R Patil
Hi,

I've this with me in a program:

Code: Select all

01 WS-PROG PIC X(8) VALUE ' DATEROUT'.
..
CALL WS-PROG.
Compiler options used: NODYNAM

Is this a dynamic or static call? As the option is NODYNAM, I'd assume it's a static call. But one of collegues says otehrwise. Please share yourviews.

Re: Static or dynamic call in COBOL.

Posted: Wed Nov 19, 2014 4:00 pm
by William Collins
Whenever CALL identifier is used it is a dynamic CALL. It has to be, since the compiler cannot always reliably know what value the identifier has from CALL to CALL at run-time.

Compiler option DYNAM/NODYNAM only controls the behaviour of CALL literal.

Re: Static or dynamic call in COBOL.

Posted: Thu Dec 18, 2014 1:47 pm
by R Patil
William Collins wrote:Whenever CALL identifier is used it is a dynamic CALL. It has to be, since the compiler cannot always reliably know what value the identifier has from CALL to CALL at run-time.

Compiler option DYNAM/NODYNAM only controls the behaviour of CALL literal.
Thanks but that's strange. I always thought it call depends on the compiler option! :shock:

Then what's the use of making a default compiiler option as NODYNAM and mandate it on the shop while as a programmer I can anyways make it behave DYAM? :?

Re: Static or dynamic call in COBOL.

Posted: Fri Dec 19, 2014 4:31 am
by Robert Sample
I think you have totally missed the point. CALL WS-PROG, where WS-PROG has the value 'DATEROUT' will be a dynamic call -- period. This is because COBOL does not know the name of the subprogram to be called until the program is executing.

However, CALL 'DATEROUT' may be either a static OR dynamic call -- depending upon the compiler option. If the compiler option is NODYNAM, you are not going to make it a dynamic call since the compiler can identify the subprogram at COMPILE time and take that into account -- so at execution time the name of the subprogram has been fixed and is part of the load module.

Re: Static or dynamic call in COBOL.

Posted: Mon Mar 02, 2015 2:09 pm
by jjourneyy22
Nowdays players should focus FIFA 15 PC Coins on testing the movement and weapons, although I have to Fifa Ultimate Team Coins agree that it's time to see some "advance" in the PvE aspect or otherwise players will start to leave the game.