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

01 ws-p pic 9(2).
01 ws-q pic 9(2) value 01.
01 ws-r pic 9(2) value 99.

p.d.

compute p = q + r
what will be result of p ans(00) but my question is that

how i got 10 on the place of 00.
(truncation will ocuure on right side not left).

please tell me ?


Answer Posted / sam

01 p pic 9(02) value zero.
01 p1 pic 9(03) value zero
01 q pic 9(02) value 99.
01 r pic 9(02) value 1.
01 s pic x(02) value spaces.

p = q+r.
actual p value = 100. but p value is numeric so it writes
from right to left tuncations will be taken left side.
so p value = 00 if u want p = 10
but we cann't use justifications
since justification claue works on alphanumeric field.
so compute p1 = q+r.
move p1 to s . ( here s will contain value 10)
now move s to p.then p will be 10.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

4121


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

1091


What is Pic 9v99 Indicates in COBOL?

1179


What are different data types in cobol?

1231


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

2213


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

2487


Write a cobol program making use of the redefine clause.

1123


) How do u handle errors in BMS macro

1960


What is inspect in cobol ?

1243


What is a SSRANGE and NOSSRANGE?

1417


Write a program that uses move corresponding.

1076


Define cobol?

1313


What are the various section in data division and briefly explain them.

1112


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

1169


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

1146