Without using move verb how to move one variable to another.
Answer Posted / raju
Let the variables and their values be A = 20 and B = 30
and we need to swap them as A = 30 and B = 20 without MOVE statement
BEFORE AFTER
A B A B
Way 1: COMPUTE A = A+B 20 30 50 30
COMPUTE B = A-B 50 30 50 20
COMPUTE A = A-B 50 20 30 20
Way 2: COMPUTE A = A*B 20 30 600 30
COMPUTE B = A/B 600 30 600 20
COMPUTE A = A/B 600 20 30 20
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is inspect in cobol ?
What is the compute verb? How is it used?
Which is not true about evaluate statement
example for sub strings ? and refernce modifications whit output pls
explain sorting techniques in cobol program?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
Describe the cobol database components?
Explain how to differentiate call by context by comparing it to other calls?
What is the difference between external and global variables in COBOL?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
What rules are to be followed while using the corresponding options?
What is the problem of ordered sequential files access?
What are the different data types in cobol?
What are the various section in data division and briefly explain them.
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech