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
Write some characteristics of cobol as means of business language.
What are various search techniques in cobol? Explain.
how do you reference the esds vsam file formats from cobol programs
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
what is the use of outrecord?
What are the pertinent COBOL
What rules are to be followed while using the corresponding options?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What are the different data types in cobol?
how do you reference the fixed unblock file formats from cobol programs
) how do u code after getting data?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?