IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Regading Called programs


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tushar_study

New User


Joined: 01 Feb 2007
Posts: 30
Location: Mumbai

PostPosted: Thu Feb 22, 2007 3:04 pm
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Feb 22, 2007 3:13 pm
Reply with quote

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
View user's profile Send private message
sachin_star3
Warnings : 1

New User


Joined: 30 Sep 2006
Posts: 78
Location: pune

PostPosted: Thu Feb 22, 2007 3:47 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Feb 22, 2007 4:09 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Finding Assembler programs PL/I & Assembler 5
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
No new posts Intertest Batch issue with called ass... COBOL Programming 4
Search our Forums:

Back to Top