Page 1 of 1

Query regarding Static Call.

PostPosted: Thu Mar 03, 2011 4:09 pm
by shabukumar
Hi,

I had done the program before using static call by having the subprogram and mainprogram in different load modules.

To achieve this, I made the changes in the cobol compiler and it worked well that time. But right now I am not able to remember how I done this.

The changes are like in SYSLIN DD statement of compiler (concatenation of load modules). Somewhat Like this. But I am not sure about this now.

so Kindly request you to send me a sample compiler program or let me know the information about the changes to be made in the compiler.

I searched through the forums and there was no information.

Kindly help me in this regard.

Re: Query regarding Static Call.

PostPosted: Thu Mar 03, 2011 5:37 pm
by Robert Sample
SYSLIN typically would not be changed. The SYSIN would be for the linkage editor / binder, NOT the compiler. You need to have a DD statement (SYSLIB is common) pointing to the load library where the subprogram resides. Your input to the linkage editor / binder will include
  INCLUDE SYSLIB(lmodame)
where lmodname is the name of the load module and SYSLIB is the DD name for the load library containing the subprogram.

Re: Query regarding Static Call.

PostPosted: Thu Mar 03, 2011 8:25 pm
by BillyBoyo
I think you will need to change the compile options as well so that Cobol won't do a dynamic call. Possibly it is NODYNAM, but check in the current cobol manual.

If the module you are calling has the same object name, the linkage-editor is able to find it without a specific include, check in the LE manual .

Of course, if you are testing it under a different name, you will have to "include" the test name you are using (obviously then doesn't have to be the same name as you are "calling", the LE will know that K32YTQ has as its main entry-point HJ402091). You do have to be careful of the order of concatention for the LE. Put you test libraries first if you are testing with the same name as the main entry-point, else you'll get an unexpected version, not the one you you are changing.

Re: Query regarding Static Call.

PostPosted: Sat Mar 05, 2011 8:03 pm
by BillyBoyo
Having recently discovered that LE means something else entirely, in the previous posting, where I said "LE" I was meaning the Linkage-Editor.