difference between escape(top or bottom) and escape
immediate(top or bottom?

Answers were Sorted based on User's Feedback



difference between escape(top or bottom) and escape immediate(top or bottom?..

Answer / akansha

ESCAPE TOP indicates that processing is to continue at the
top of the processing loop. This starts the next repetition
of the processing loop.


ESCAPE BOTTOM indicates that processing is to continue with
the first statement following the processing loop. The loop
is terminated and loop-end processing (final BREAK and END
DATA) is executed for all loops being terminated.

Whereas if you specify the keyword IMMEDIATE, no loop-end
processing will be performed(i.e.,final BREAK and END DATA
is not executed for all loops being terminated).

Is This Answer Correct ?    16 Yes 1 No

difference between escape(top or bottom) and escape immediate(top or bottom?..

Answer / nitin

Program

000010 define data local
000020 1 #ACCOUNT_ID (N10)
000030 end-define
000040 LIMIT 5
000050 SELECT ACCOUNT_ID
000060 INTO #ACCOUNT_ID
000070 FROM CIS_ACCOUNT
000080 WHERE COY = 1
000090 AND ACCOUNT_ID = 12344
000100 *
000120 IF #ACCOUNT_ID = 7232
000130 WRITE 'INSIDE1' #ACCOUNT_ID
000140 ESCAPE ROUTINE IMMEDIATE
000150 END-if
000150 *
000160 AT END OF PAGE
000170 WRITE 'GOOD'
000180 END-ENDPAGE
000190 *
000200 WRITE 'INSIDE3'
000210 END-SELECT
000220 WRITE 'HELLO'
000230 end


Output


INSIDE3 3682
INSIDE3 4340
INSIDE3 7200
INSIDE1 7232
GOOD

I have written above program to test the scinarion. But in
all situations Good is getting printed. Will somebody help
me what escape statement should I use so that Good will not
get printed.

Is This Answer Correct ?    0 Yes 0 No

difference between escape(top or bottom) and escape immediate(top or bottom?..

Answer / dd

Normal Escape comes out of the inner processing loop without
flushing out the details stored in variables etc But escape
immediate erases the earlier content of the different fields.

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More Natural Interview Questions

what r the quality process in development

1 Answers  


How to create 1 ddm that fetches 3 adabas files simultaneously?

0 Answers  


What is STACK in Natural? How we can use it in Program? Give me Eg.?

2 Answers   IBM,


Explain the address converter?

0 Answers  


Explain how to ftp the natural program to desktop? (From mainframe to pc), is it possible?

0 Answers  






Suppose you are processing an input file in a natural program and you want the program to fail if the file is empty. What command you use in natural to force it to fail?

0 Answers  


Is it possible to declare a GDA for an external subroutine?

4 Answers  


Explain how to find occurrence of mu and pe fields in a file?

0 Answers  


How do you receive data passed through JCL parm parameter in a Natural program ? How Data definition is defined in the program?

5 Answers   JPMorgan Chase,


Explain how many work file we can code in jcl?

0 Answers  


Explain how to move cursor to a particular field when position is not known?

0 Answers  


Explain difference between read work file 1 and read work file once? Why we are using work file once?

0 Answers  


Categories