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

Can you please let me know the centre name of INS certification in Kolkata.

2181


What is the usage of comp fields in cobol?

1130


Define static linking and dynamic linking.

1109


Explain about different table spaces.

1047


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

2014


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

1316


Write a program to explain size error.

1136


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

6665


What are the access modes of START statement?

1187


How many sections are there in data division in COBOL?

1078


What is the use of intialize verb?

1179


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

1279


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

3206


how can i see junk values in dclgen or in hostvariable of comp ?

2933


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

2393