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?
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 |
Explain fixed length record in cobol? with suitable example
what r the types of perform statement
What is the output generated by the following code? 01 GRP-I. 05 SUBFLD1 PIC XX VALUE "AB". 05 FILTER PIC X(6) VALUE SPACES. 01 GRP-2 REDEFINED GRP-1. 05 SUB-FLD2 PIC XX. 05 SUB-FLD3 PIC XX. 05 FILTER PIC X(4). IF SUB-FLD1 NOT = SPACES DISPLAY "SUBFLD1" MOVE "ABBCCD" TO GRP-1 IF SUB-FLD3 = SPACES DISPLAY "SPACES" ELSE DISPLAY "SUBFLD3" DISPLAY "END" ELSE DISPLAY "SPACES" DISPLAY "END". (a) SUBFLD1 SUBFLD3 END (b) SPACES END (c) SUBFLD1 END (d) SUBFLD1 SPACES
Why IBM?
using redefine can you redefine lower variable size to higher variable size?
What are literals?
i need the code for this program in cobol. 2 + 1 = 3 4+3=7 6+5=11 8+7=15 10+9=19
What is the difference between CONTINUE & NEXT SENTENCE ?
If we put three reads in COBOL in the same para one after the other, to read a PS file,will it read the same record thrice or it will read three records sequentially? For example : Input File 01 02 03 Para 900 Read infile Display Infile rec Read infile Display infile rec Read infile Display infile rec. What will be the output?
describe 805 error
How to print 10 to 1 if the input have only 10 digit number?
How many variables can be declared in w-s section.?