View previous topic :: View next topic
|
Author |
Message |
Sunilkumarsaini
New User
Joined: 25 Jul 2008 Posts: 13 Location: chandigarh
|
|
|
|
Hi,
I was analysing a program ans found that calling program which should pass two variables with Using Clause is passing on only one with one comma as given below:-
CALL 'RS0MADR3' USING REAS-WINDOW-ALPHA-TEMP ( 1) ,
But progrm RS0MADR3 is recieving two variables in linkage section.
Is there any default value after comma which is passed if we don't give it explicitly.
thanks
Saini |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
looks like someone deleted a source line. |
|
Back to top |
|
|
Sunilkumarsaini
New User
Joined: 25 Jul 2008 Posts: 13 Location: chandigarh
|
|
|
|
nope I am compiling it and it is not giving any compilation error.
below is the actual code :-
Code: |
CALL 'RS0Y4DR3' USING WS-COMPARE-DATE , REAS-WIND-OFF
MOVE 901231 TO REAS-WINDOW-ALPHA-TEMP ( 1)
CALL 'RS0MADR3' USING REAS-WINDOW-ALPHA-TEMP ( 1) , --------> I am talking about this line
* IF (WS-COMPARE-DATE GREATER THAN 901231) AND
IF (WS-COMPARE-DATE GREATER THAN REAS-WINDOW-ALPHA-TEMP ( 1)) AND
(WS-RETIREMENT-YEARS LESS THAN 75)
CALL 'RS0Y4DD3' USING WS-COMPARE-DATE , REAS-WIND-OFF
PERFORM 4000-SAFE-HARBOR
THRU 4000-SAFHRBR-EXIT
GO TO 2310-PREPARE-RECORD-DATES-EXIT
ELSE CALL 'RS0Y4DD3' USING WS-COMPARE-DATE ,
REAS-WIND-OFF. |
|
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Sunil,
Quote: |
But progrm RS0MADR3 is recieving two variables in linkage section.
|
What is the value in the received field? Is it spaces? |
|
Back to top |
|
|
Sunilkumarsaini
New User
Joined: 25 Jul 2008 Posts: 13 Location: chandigarh
|
|
|
|
Aaru,
I am not able to run this because I don't have proper set up for this. I need to give analysyis only. So is it possible is this syntex acceptable?? |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
IIRC, the called program needs to check the address of the second parm before using it. If it is null, do not reference the data area.
BTW, a comma on a COBOL line means nothing. |
|
Back to top |
|
|
Sunilkumarsaini
New User
Joined: 25 Jul 2008 Posts: 13 Location: chandigarh
|
|
|
|
could you please explain this littele bit more |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if RS0MADR3 (the CALLed program)
does not insure that there is addressability to the second parm,
but instead references to the second parameter are made as if the parm was provided,
you have lost a source line in the CALL.
If RS0MADR3 does indeed insure addressability of the second parm, then the CALL syntax, though irregular, is correct. |
|
Back to top |
|
|
Meir Goldstein
New User
Joined: 12 May 2008 Posts: 7 Location: Jerusalem, israel
|
|
|
|
Hi sunil!
The list of the parameters is tranlated to a list of words(4 bytes), each word contains the address of the corresponding par. the last word in the list contains in the high order bit, of the first byte from left, is on.
so everything is perfect if the called program check this bit to look if this is the last parameter passed to it otherwise it will get garbage.
best tiding. |
|
Back to top |
|
|
|