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

Write some characteristics of cobol as means of business language.

619


What are various search techniques in cobol? Explain.

650


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

634


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2060


what is the use of outrecord?

1771






What are the pertinent COBOL

2045


What rules are to be followed while using the corresponding options?

641


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1906


What are the different data types in cobol?

797


how do you reference the fixed unblock file formats from cobol programs

712


) how do u code after getting data?

1580


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1653


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1588


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

744


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

644