View previous topic :: View next topic
|
Author |
Message |
shriya reddy Warnings : 1 New User
Joined: 05 Jun 2004 Posts: 43
|
|
|
|
Hi Friends,
I am writing a cobol pgm in that i call three sub modules(A,B,C).
if i call these modules Dynamically where i specify these modules called dynamically.
if i call these modules Statically where i specify these modules called Statically.
Is there any syntax for these dynamic call & staticcall in cobol.
please show me thru example.
Bye
Shriya. |
|
Back to top |
|
|
sandip_datta
Active User
Joined: 02 Dec 2003 Posts: 150 Location: Tokyo, Japan
|
|
|
|
Hi Shriya,
For calling submodules DYNAMICALLY -
Code: |
In Working Storage Section -
01 WS-PROGRAM PIC X(08).
MOVE 'SUBPROGA' TO WS-PROGRAM
CALL WS-PROGRAM USING ....(Your Parameters)
MOVE 'SUBPROGB' TO WS-PROGRAM
CALL WS-PROGRAM USING ....(Your Parameters)
MOVE 'SUBPROGC' TO WS-PROGRAM
CALL WS-PROGRAM USING ....(Your Parameters)
|
For Calling STATICALLY, check your compiler option. If it is NODYNAM then use -
Code: |
CALL 'SUBPROGA' USING ...(Your parameters)
CALL 'SUBPROGB' USING ...(Your parameters)
CALL 'SUBPROGC' USING ...(Your parameters)
|
Regards,
Sandip. |
|
Back to top |
|
|
sudarsanreddy_k
New User
Joined: 16 Aug 2004 Posts: 3 Location: chennai
|
|
|
|
IDENTIFYING STATIC AND DYNAMCI CALL THROUGH COBOL PRG:
static call uses literal while calling, where dynamic call uses identifier which should be declared in the working storage section.
IDENTIFYING THROUGH COMPILER:
for static call we have lked.syslin in compile program.
IDENTIFYING TRHOUGH RUN JCL :
in jcl for static call we mention 'nodyn' in parm parameter, for dynamci call we mention 'dyn' in parm parameter.
if nothing is mentioned in parm parameter then default is static. |
|
Back to top |
|
|
sudarsanreddy_k
New User
Joined: 16 Aug 2004 Posts: 3 Location: chennai
|
|
|
|
IDENTIFYING STATIC AND DYNAMCI CALL THROUGH COBOL PRG:
static call uses literal while calling, where dynamic call uses identifier which should be declared in the working storage section.
IDENTIFYING THROUGH COMPILER:
for static call we have lked.syslin in compile program.
IDENTIFYING TRHOUGH RUN JCL :
in jcl for static call we mention 'nodyn' in parm parameter, for dynamci call we mention 'dyn' in parm parameter.
if nothing is mentioned in parm parameter then default is static. |
|
Back to top |
|
|
|