View previous topic :: View next topic
|
Author |
Message |
shivakumar .b Warnings : 1 New User
Joined: 11 May 2005 Posts: 18 Location: bangalore
|
|
|
|
hi this is shivakumar.
i have two doubts.
1. if i have a jcl that creates a new dataset with disp=new,catlg,catlg in the first run. if i run the same jcl for second time, what could be the error code, what message we would get?
2. how to convert a dynamic call into a static call(or viceversa) in the cobol program.
plz reply me as early as possible.
regards,
shivakumar .b |
|
Back to top |
|
|
gnagakishore
New User
Joined: 26 Mar 2005 Posts: 25 Location: Hyderabad
|
|
|
|
if u run the same jcl for the second time it will give error. may be NOTCAT2 indicate that duplicate entry allready exists.
call "var-name" using .......
in "var-name" u can give program name ,, then it will be static call.
call "pgm-name" usin... will be dynamic call.
WE CAN CALL PROGRAMS DYNAMIC OR STATIC USING COMPILER OPTIONS " DYNUM" OR "NODYNUM" |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
what could be the error code, what message we would get? |
Code: |
DATA SET DATA.SET.NAME
NOT DEFINED BECAUSE DUPLICATE NAME EXISTS IN CATALOG
RETURN CODE IS ... REASON CODE IS ...
JOBNAME STEPNAME - STEP WAS NOT EXECUTED |
.
One way to get rid of this is to put a FASTDEL before that step.
Regards,
Priyesh. |
|
Back to top |
|
|
shivakumar .b Warnings : 1 New User
Joined: 11 May 2005 Posts: 18 Location: bangalore
|
|
|
|
Thanks gnagakishore and thanks to priyesh agarwal for u r information.
but i have one doubt,
we r using CALL varname for static call in which varname contains object module name and
we r using CALL "pgmname" for dynamic call in which we are directly entering the loadmodule name in CALL statement.
am i right?
thanks in advance |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 419 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
I think the static/dynamic statements above are reversed.
DYNAMIC occurs if the proram name is provided in a variable, not literal, or if compiler option DYNAMIC is used.
Dave |
|
Back to top |
|
|
raja_sekhar007
New User
Joined: 16 May 2005 Posts: 2
|
|
|
|
CALL "Literal" Using parm1,parm2....... becomes the Static call.
Where Literal is the name of the Called program name. The object module should be created for Called program and it should be concatinated to Main program object module at linkedit time to get one load module for both calling and called program. The compilor option is NODYNAM.
CALL identifier Using............. becomes dynamic call. identifier is a variable which contains Name of Called program. Calling and Called program should have separate load module.
Regards
Rajasekhar |
|
Back to top |
|
|
|