How to replace the GOTO statement in COBOL without changing
the structure of program. e.g. consider following code...
I.D.
E.D.
D.D.
P.D.
compute C = A + B.
GOTO para 100-display.
compute D = C - D.
GOTO 200-display.
some other logic......
........
GOTO 300-para.
......
......
GOTO 400-para.
Now I want to replacce all GOTO statements without
changing the structure and otput of program.
Answer Posted / suraj borge
Using evaluate statement
take the value of para in a variable then evaluate it for ex.
evaluate xyz
when 100 perform para-100
when 200 perform para-200
..
.
.
.
.
like that we can replace the goto statement .
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
Discuss about changing dataset name in proc.
Can we change the password using ALTER? anyone tried and changed?
Which is not true about evaluate statement
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
Write a program that uses move corresponding.
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
Can you please let me know the centre name of INS certification in Kolkata.
What are the different rules to perform a Search?
Write a cobol program making use of the redefine clause.
What are the rules of the move verb?
What is rmode(any) ?
HOw can I get the negative sign while deduct high value from low value
Whats the difference between search & search ALL?