Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Regading Called programs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Regading Called programs
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: 1187
Location: Bangalore,India

PostPosted: Thu Feb 22, 2007 3:13 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Thu Feb 22, 2007 4:09 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts pointers on using USS and C programs. Pedro All Other Mainframe Topics 0 Wed Oct 04, 2017 4:38 am
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Could we identify the called modules ... elixir1986 COBOL Programming 5 Fri Jul 14, 2017 1:53 am
No new posts Why myself doing Package Bind always ... Susanta DB2 5 Thu Mar 02, 2017 10:47 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us