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
how to move the records from file to array table. give with code example
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
What is rmode(24)
What is static and dynamic call in cobol?
What is the Purpose of Pointer in the string?
What is the difference between Call and a Link?
i want a program using by if, evaluate , string, unstring, perform, occurs?
In which area will you utilize 88 level items in cobol?
how do you reference the fixed unblock file formats from cobol programs
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
What are the different rules for performing sort operation?
What is the compute verb? How is it used?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
What is report-item in COBOL?