View previous topic :: View next topic
|
Author |
Message |
tushar_study
New User
Joined: 01 Feb 2007 Posts: 30 Location: Mumbai
|
|
|
|
Hi All,
Thanks for the previous reply.
I have another question
If I call a subprogram 'A' where 'A' is in WS-CALL
CALL WS-CALL using var1,var2(PICTURE CLAUSE OF VAR1 IS 9(2) WHILE THAT OF VAR2 IS 9(4))
and in the linkage portion of the called program 'A' I define only
the equivalent of var1 as
LINKAGE SECTION.
01 WS-LINKAGE-VARIABLES.
05 ws-var-length PIC S9(04) COMP.
05 WS-LINK-VAR1 PIC 9(2).
mY QUESTION IS THAT IF I DONT DECLARE THE SECOND CARIABLE AND
WRITE "procedure division using WS-LINK-VAR1" then whether the program will execute successfully?
I feel the number of parameters and their PCITURE clause between the CALLING/CALLED programs must be the same.
Please help.
Thanks in advance.
Regards,
Tushar |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi there,
I agree
Quote: |
I feel the number of parameters and their PCITURE clause between the CALLING/CALLED programs must be the same |
|
|
Back to top |
|
|
sachin_star3 Warnings : 1 New User
Joined: 30 Sep 2006 Posts: 78 Location: pune
|
|
|
|
I THINK THIS MIGHT HELPFUL TO YOU
SUPPOSE CONDTION
1] IF YOUR PARAMETER IN CALLED PROGRAME ARE LESS THEN CALLING PROGRAME THEN SOC4 COMES
2] BUT IF YOU PARAMETER IN CALLING PROGRAME ARE LESS THEN CALLED PROGRAMME THEN MAXCC COMES
KEEP IN MIND IN CALL NO NEED TO MENTION THE LENGTH
CORRECT ME I AM WRONGE
FROM-
SACHIN BORASE
PUNE |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Quote: |
mY QUESTION IS THAT IF I DONT DECLARE THE SECOND CARIABLE AND WRITE "procedure division using WS-LINK-VAR1" then whether the program will execute successfully?
I feel the number of parameters and their PCITURE clause between the CALLING/CALLED programs must be the same.
|
It will execute successfully. The number of parms do not have to be the same, but it helps.
Quote: |
1] IF YOUR PARAMETER IN CALLED PROGRAME ARE LESS THEN CALLING PROGRAME THEN SOC4 COMES
2] BUT IF YOU PARAMETER IN CALLING PROGRAME ARE LESS THEN CALLED PROGRAMME THEN MAXCC COMES
|
1) The risk of a S0C4 is there, but if you don't reference the extra parms, you won't get one.
2) Horse-pucky! |
|
Back to top |
|
|
|