Suppose a program has the following code. What will be the
output?
MAIN-PARA.
DISPLAY 'MAIN-PARA'
PERFORM SECTION-A.
STOP RUN.
SECTION-A.
PARA-A1.
DISPLAY 'SECTION A PARA A1'.
PARA-A2.
DISPLAY 'SECTION A PARA A2'.
Answers were Sorted based on User's Feedback
Answer / deependra
The output is as follow:-
MAIN-PARA
SECTION A PARA A1
SECTION A PARA A2
Is This Answer Correct ? | 24 Yes | 1 No |
Answer / wairagade
Output = MAIN-PARA
See the Main-Para. the flow is like , it will display MAIN-
PARA text and then perform SECTION-A in which nothing is
coded, it will give control back to OS.
If PERFORM SECTION-A thru PARA-A2
Then
O/P
MAIN-PARA
SECTION A PARA A1
SECTION A PARA A2
Please correct me if I stated wrong
Is This Answer Correct ? | 3 Yes | 3 No |
The output is :
---------------
MAIN-PARA
SECTION A PARA A1
SECTION A PARA A2
Because, There is no THRU command in PERFORM statement. So
it will execute still it reaches the 'EXIT' command or it
will perform the full section or until the next section
reaches.
Is This Answer Correct ? | 0 Yes | 1 No |
what happens if parmparameter passes zero bytes to the program
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
COBOL program to read the string ' BOMBAY' in reverse order as 'YABMOB'
what happens if we wont give timestamp in precompilation process ?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
What is the point of the REPLACING option of a copy statement?
select TURE Statement(s) aboUt eject statemenet in cobol? a)The eject statememnt must be the only statement on the line b.It causes the program to edit abnormally c. eject statement can be written in either area A or area B d. specifies that the next source statement is to be printed at Top of the next page e.The EJECTstatement has no effect on the compilation of the source program itself
We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
What are the functions like c or c++ in cobol?
) How do u handle errors in BMS macro?
In a COBOL II PERFORM statement, when is the conditional tested, before or after the perform execution?