Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

) How do u handle errors in BMS macro

2049


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

2590


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

1232


what is search and searchall?what is the diffrence between them?give an best example?

6824


Explain how you can characterize tables in cobol?

1063


Why occurs cannot be used in 01 level in COBOL?

1160


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

1152


Explain the configuration section of a cobol program with examples of syntax.

1197


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

1355


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)?

1117


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

2429


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2375


Discuss about changing dataset name in proc.

1235


how do you reference the variable block file formats from cobol programs

1253


Which Search verb is equivalent to PERFORM…VARYING?

1041