Thursday, November 20, 2008

COBOL calls with compiler options

Hi,

In the few previous post, we talked about the different types of call in cobol( static and dynamic). We also talked about how to invoke these. But be careful, there are few compiler options which can change the type of call made by you in the COBOL program.

Below are the compiler options which can override the calling mechanism in your COBOL program :

  • If compiled with NODYNAM compiler option:
  • CALL 'literal' is a static call
  • CALL WS-label is a dynamic call

  • If compiled with DYNAM compiler option:
  • CALL 'literal' is a dynamic call
  • CALL WS-label is a dynamic call

So, next time just be careful while making any type of CALL in your cobol code.

Hope things are much more clearer now. Please do not forget to provide your comments or reactions.


For more cobol queries, check this out : More COBOL questions

5 comments:

narya said...

Hi Kapil,

I was preparing for an interview during which I came acroos this blog. I must say this is the best compilation of COBOL queries I have even seen. You have explained everything in such detail and with so much simplicity that I just loved it.
Keep the good work on.
All the best.
Now you have a regular visitor to this blog in me
Thanks
Neeti

Kaps said...

Thanks Neeti for your appreciation.

Its been long time since I have written something, still your comment surely gives me an opportunity to write more.

Do you have any specific cobol/db2/jcl questions. Which you want answers for.

ursmdnpavan said...

This is the best explanation so far i searched in net. even my lecturers not able to explain properly about CALL stmt. Thanks for the post bro.

Razesh said...

Well its no doubt a very good explanation, I just want to add few lines based on my working experiment.

When main program accessing memory over 16MB line & statically calls a subprog which is designed to use memory below 16MB line,the call works properly.

When you change this call to Dynamic you will face abend due to addressing issue.

Kaps said...

Thanks for your comments ursmdnpavan & Razesh.