Consider the below example
call a-test1.
--
--
--
a-test1.
if a=b
perform a-test through a-exit
next sentence
else
if b=c
perform c-test through c-exit.
if a=d
perform d-test through d-exit.
a-test.
--
--
a-exit.
exit.
can u tell me what will happen if a=b
after looping into a-exit will the control go back to a-
test1.
will the condition a=d be checked???
Answers were Sorted based on User's Feedback
Answer / uday
if a=b the loop will be executed(a-test) and then control will
comeback to the loop.here next sentence is used thats why the
control is going to execute statements after end-if ,if any.
Is This Answer Correct ? | 6 Yes | 0 No |
Hi,
If a=b then para a-test will be performed from a-test to
a-exit , once it will be completed the control will returns
back to perform statement at line number 7 then the next
sentence statement will be executed. when next sentence will
be executed the control will look for a period (.) if it
finds then it will execute just after line of the para. here
it is if a=d , So the control will check for the condition
a=d and if its true then will perform d-test through d-exit.
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / adarsha
NOP ! none of the above.. compiler Error !!!
When you are using NEXT SENTENCE or continue, their
shouldn't be any sentence/paragraph name or anything before
or after it with in that condition...
if a=b
NEXT SENTENCE
.
.
. should be the syntax ... perform a-test through a-exit
shouldn't be coded 1
hope it helps u !
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / khasim
compile error.
d-test and d-exit. not defined in Procedure division.
if we code the d-test and d-exit.
control goes to d-exit. not goback to a-test1.
after d-exit, it will go back.
Is This Answer Correct ? | 1 Yes | 0 No |
I have a Flat file in which certain records are present in a tabular format. I need to extract some of the records on some basis from it and copy them into a flat file...how it can be done ??
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I want Display WS-VARX and WS-VARN?
example for sub strings ? and refernce modifications whit output pls
0 Answers College School Exams Tests, IBM,
What is the difference between binary search and sequential search?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
can we display comp-3 variables. if we want to display what we have to do . give me one example
how will you define vsam file in select clause?
What is the difference between COMP & COMP-3 ?
In a COBOL program, 2 tables TABLE1 and TABLE2 are defined that are indexed by INDEX1 and INDEX2 respectively. Can we use INDEX1 with TABLE2 and INDEX2 with TABLE1?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
Under which scenario you would go for a static call as opposed to dynamic call?
What is an in-line perform ?