Sunday, 22 September 2013

COBOL Static Call.

COBOL static call is more often used to transafer control from one program to another program. When you use the CALL literal statement in a program that is compiled using the NODYNAM and NODLL compiler options, a static call occurs.
With these options, all calls of the CALL literal format are handled as static calls. Refer below figure.
In the static CALL statement, the COBOL program and all called programs are part of the same load module. When control is transferred, the called program already resides in storage, and a branch to it takes place.
Subsequent executions of the CALL statement make the called program available in its last-used state unless the called program has the INITIAL attribute. In that case, the called program and each program directly or indirectly contained within it are placed into their initial state each time the called program is called within a run unit.
Example : CALL "EMP002" USING RECORD-1 

Created with Artisteer

1 comment: