ibm midrange - How does GO TO control flow work in COBOL? -
ibm midrange - How does GO TO control flow work in COBOL? -
procedure partition mainpara display "hello main". go para1. display " sec display". stop run. para1. display " in para1". para2. display "i in para2" .... para200
i have little understanding of flow. but, confused. when command jump go para1, execute para1.
now question is:
will executepara2and homecoming mainpara? or execute para2 towards end of program? i not cobol programmer, , need understand code migration tool/process, amxw cobol. target scheme ibm as/400.
go to statement permanently transfers execution 1 part of programme part of program. after go para1, execution jump para1 label, execute next paragraph , go on there.
output:
hello main in para1 in para2 . . in para200 so, execution continue until encounters stop run statement or runtime error.
note: go to statements considered bad practice reason. becomes harder maintain track of go to statements go speak. i'd suggest using perform instead. returns command after executing procedure.
ibm-midrange cobol
Comments
Post a Comment