Can we use goto statement in inline_perform ?
Answer Posted / sivakumar sekharannair
Yes go to can be used in inline perform. when GO TO is used
in inline perform then irrespective of the number of times
the perform has to execute.. the control will go to GO TO.
example:
PERFORM VARYING A1 FROM 1 BY 1 UNTIL A1 > 4
DISPLAY 'SIVAKUMAR'
GO TO DISPLAY-PARA
END-PERFORM.
DISPLAY-PARA
DISPLAY 'KUMAR'.
SYSOUT:
SIVAKUMAR
KUMAR
Instead of
SIVAKUMAR
SIVAKUMAR
SIVAKUMAR
SIVAKUMAR
Actually the perform has to execute 4 times and so the
display should be executed 4 times. but because GO TO is
given inside the inline perform the control goes to display-
para and and dose not come back.
| Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
What are the rules of the move verb?
What is inspect in cobol ?
Differentiate between structured cobol programming and object-oriented cobol programming.
Which division and paragraphs are mandatory for a COBOL program?
HOw can I get the negative sign while deduct high value from low value
Name the divisions, which are available in a cobol program?
What is the LINKAGE SECTION used in COBOL?
How do u write test cases?
What is perform what is varying?
example for sub strings ? and refernce modifications whit output pls
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
How do we get current date from system with century in COBOL?
How are the next sentence and continue different from each other?
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
Difference between array and sub-script ?