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
 

 

Question regarding passing values to a sub-program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
cybertaurean

New User


Joined: 22 Dec 2008
Posts: 85
Location: US

PostPosted: Mon Apr 19, 2010 6:37 pm    Post subject: Question regarding passing values to a sub-program
Reply with quote

Hi,

I have the subprogram linkage defined with three values A B and C.

When I call the program, I call using only A and B. Will this work fine as long as I dont refer to C in subprogram or will this not compile at all???

Regards,
Sumesh
Back to top
View user's profile Send private message

cybertaurean

New User


Joined: 22 Dec 2008
Posts: 85
Location: US

PostPosted: Mon Apr 19, 2010 6:38 pm    Post subject: ERRATUM: Question regarding passing values to a sub-program
Reply with quote

Sorry,

The question is as follows -

I have A B and C in called program LINKAGE and I call it using A B C and a fourth parameter D.

What will be the output in the above case.

Regards,
Sumesh
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Mon Apr 19, 2010 6:47 pm    Post subject:
Reply with quote

Since your subprogram has no way of identifying the extra parameter(s), there is no way the subprogram can use it(them).

Why didn't you just test this (10 minutes would have done it)?
Back to top
View user's profile Send private message
cybertaurean

New User


Joined: 22 Dec 2008
Posts: 85
Location: US

PostPosted: Wed Apr 21, 2010 1:26 pm    Post subject:
Reply with quote

Thanks a lot Robert icon_smile.gif
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 Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm


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