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
) How do u handle errors in BMS macro
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
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
what is search and searchall?what is the diffrence between them?give an best example?
Explain how you can characterize tables in cobol?
Why occurs cannot be used in 01 level in COBOL?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
Explain the configuration section of a cobol program with examples of syntax.
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
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
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
Discuss about changing dataset name in proc.
how do you reference the variable block file formats from cobol programs
Which Search verb is equivalent to PERFORM…VARYING?