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

Hi All,
Can anyone tell me how we can MOVE value of a X(19)
variable to a S9(17) COMP-3 variable?
Answer with an Example will be of great help.

Answer Posted / nk

05 MY-NUM-ALPHA PIC X(9).
05 MY-NUM REDEFINES MY-NUM-ALPHA PIC S9(17) COMP-3.
MOVE 'ABCDEFGHI' to MY-NUM-ALPHA.
note that comp-3 stores 2 numbers per byte so 17 digits
takes 9 bytes (half of one byte stores the sign.) So you
could move a 19-character variable to a 9-byte field but it
will be truncated.

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between array and sub-script ?

1656


Which mode is used to operate the sequential file?

1204


I have a File that has duplicate records. I need only those records that occur more than thrice.?

9885


How do you define a variable of comp-1 and comp-2?

1199


What is the use of intialize verb?

1251


What is a SSRANGE and NOSSRANGE?

1466


How to remove 2 duplicate records and copy only one using job control language?

1217


What are the rules of the move verb?

1265


What are declaratives and what are their uses in cobol?

1202


What is amode(31)

1170


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

2219


How do get the result of your program directly on your pc?

2339


What is static and dynamic call in cobol?

1070


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

1149


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

1081