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 are the different types of condition in cobol and write their forms.

1064


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

1261


Which Search verb is equivalent to PERFORM…VARYING?

999


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

1054


Have you used comp and comp-3 in your project? And how?

2424


Name the divisions, which are available in a cobol program?

1167


In which area will you utilize 88 level items in cobol?

1096


) How do u handle errors in BMS macro?

1905


how do you reference the esds vsam file formats from cobol programs

1129


what happens if parmparameter passes zero bytes to the program

2081


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

1169


Are you comfortable in cobol or jcl?

988


what are decleratives in cobol?

2208


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

1290


how do you reference the ksds vsam file formats from cobol programs

1122