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 / nicx

The function NUMVAL can be used to change the X(19) to S
(17) and then moved to comp-3
Ex:
ws-variable PIC X(19)
ws-variable-1 PIC S9(17)
ws-variable-1 PIC S9(17) comp-3
Compute ws-variable-1 = function numval(ws-variable)
move ws-variable-1 to ws-variable-2.

Ofcourse you should be expecting a signed 9(17) value in
the ws-variable. Check out NUMVAL-C too. Both functions are
a great help in such situations.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the utilization of copybook in cobol?

1185


How you can characterize tables in cobol?

1198


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

1351


what happens if parmparameter passes zero bytes to the program

2128


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1563


how do you reference the rrds file formats from cobol programs

1573


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

1237


What is the difference between next sentence and continue in cobol programing language?

1220


What are different data types in cobol?

1313


What is cobol?

1238


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

1195


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

1159


What are the access modes of START statement?

1269


What kind of error is trapped by on size error option?

1232


What are the cobol coding sheets?

1265