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
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
What is the difference between goback, stop run and exit program in cobol?
what happens if parmparameter passes zero bytes to the program
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
What do you understand by psb and acb?
What is comp-1 and comp-2?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
Give some examples of command terminators?
how do you reference the variable unblock file formats from cobol programs
Whats the difference between search & search ALL?
how to refer the data field?
what is the difference between COBOL2 AND COBOL390?
How can you get the ksds file records into your cobol program?
How do get the result of your program directly on your pc?