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 is the difference b/w level no.01 & level no.77?
I got user abend U4038 while compiling my runjcl.. can anyone help me?
What is diff betn PS and ESDS file? What is the diffrent compiler options in cobol and there discription? What is retrive nth maximum salary from salary DB2 table. Can we redefine COM-3 variable with varchar variable?
What are the two search techniques ?
how we can reverse the string in the cobol for example satheesh can be reveresed as hseehtas
how do you reference the variable block file formats from cobol programs
Suppose i have a Cobol field of 10 byte. it contains a decimal sign.How to know where is the point location?
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(9) VALUE SPACES. 01 WS-VARN REDEFINES WS-VARX PIC 9(9).
The below is the declaration for a variable ws 01 ws pic 9(3). if you want to insert space how will you do that. in which level u should do it
In COBOL CALL-CALLING,if a program A is calling 3 sub- programs, dynamically, then it is said sub-programs will always will always in Initial Mode. My question is : Do we need to code CANCEL or (IS INITIAL) for dynamically called sub-programs or it is the property of Dynamically called pgms so every time sub-pgms are called they will be in initial mode. ***This question is only Dynamic call****, Please reply. Thank you in advance.
can we display comp-3 variables. if we want to display what we have to do . give me one example
What are the pertinent COBOL commands?