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...

Consider the following COBOL entries
05 X PIC 99 VALUE 10.
ADD 40 X TO X.
COMPUTE X = 3 * X - 40.
The result in X is

Answer Posted / mr.perfect

ADD A B TO C. (Means (A+B)+C moved in C)
ADD 40 X TO X
Value of X is 10
So, ADD 40 10 TO 10 (Gives 40+10+10 = 60)

Now, COMPUTE X = 3 * X - 40
Here , order of preference is - then * will come
so, it will calculate first X-40 = 60-40 =20
THEN, 3*20 == 60
Means X = 3 * 60 - 40 ==20
So answer is : 60

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

2152


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

2474


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5750


What is amode(31)

1178


Describe the cobol database components?

1183


How do you reference the fixed block file formats from cobol programs

1232


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

1145


IF I mention stop run in CICS what happens?

2381


HOw can I get the negative sign while deduct high value from low value

2259


what are decleratives in cobol?

2265


What guidelines should be followed to write a structured cobol prgm?

1151


What is redefines clause in COBOL?

1296


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

1218


What is rmode(any) ?

1274


how to refer the data field?

2280