I have a COBOL main program which is calling sub program, the number of calling parameters used in main program are 4 whereas in sub program it's 5.

Sub program is passing 5 parameters back to main program

Will there be any compilation error? Or main program parameters displays junk values?



I have a COBOL main program which is calling sub program, the number of calling parameters used in m..

Answer / nehal jethava

When the main program passes fewer parameters than the sub program expects, the compiler will raise an error because the sub program cannot access the fifth parameter it is expecting. This is a mismatch in the interface and is not allowed in COBOL.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

0 Answers   iNautix,


i have a variable block which is used in my cobol program as input file having records of 4080 after compilation while runing the program im getiing file attribut mismatch and it is saying tht the record length of the file is 4084 can any one knw the answer how to reslove it ?

2 Answers  


What is Alternate Index ? How is it different from regular index ?

2 Answers  


How can I find the maximum value of a field in a file while reading the file dynamically? without using sort function. Suppose i have a file with fields Timestamp, description, teamname, teamnumber.. i have read the file till end and find the maximun value of timestamp which is not in sorted order.. can we use function max(timestamp)?

1 Answers   CGI,


WHY LRECL NEEDS TO BE 4 EXTRA THEN THE COBOL FILE LENGTH & WHAT IT CONTAIN IN THAT LENGTH

2 Answers   Cap Gemini,


1.What is the limit of linkage section?

4 Answers  


i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?

12 Answers  


01 a pic 9(9v99) 01 b pic 9(9.99) wht will be the stored vales in both cases

6 Answers   Patni,


Can we use icetool in cobol program?

3 Answers  


What is "Call by content" and "call by reference"?

4 Answers   ADP, Syntel,


what is Reentrancy and Quasi-reentrancy?

1 Answers  


I am getting S00F abend when i try to compare two variable of different pic class,one variable is of 9(09) and another is S9(09) comp-3. First i moved the data from S9(09) comp-3 to 9(09), but no luck. So i tried to move the data from S9(09) comp-3 to X (09) and move to 9(09). I am getting same error message, Please help me to find solution for this ptoblem. ERROR MESSAGE - "The system or user abend S00F R=NULL was issued."

1 Answers  


Categories