Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
This topic is locked: you cannot edit posts or make replies. How to supply called sub-program from... dchristensen JCL & VSAM 25 Wed Sep 14, 2016 11:36 pm
No new posts User exit in COBOL programs ganasrinivasan PL/I & Assembler 0 Thu Aug 18, 2016 12:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us