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 various section in data division and briefly explain them.
Why would you use find and get rather than to obtain?
) How do u handle errors in BMS macro
How many bytes S(8) comp field occupy and its maximum value?
what is amode(24), amode(31), rmode(24) and rmode(any)?
What is a report item?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
How do you get the data to code the BMS macro?
Differentiate between structured cobol programming and object-oriented cobol programming.
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
How do we get current date from system with century in COBOL?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
What are all the divisions of a COBOL program?
Can we change the password using ALTER? anyone tried and changed?