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
What is the utilization of copybook in cobol?
How you can characterize tables in cobol?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
what happens if parmparameter passes zero bytes to the program
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.
how do you reference the rrds file formats from cobol programs
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
What is the difference between next sentence and continue in cobol programing language?
What are different data types in cobol?
What is cobol?
Explain the configuration section of a cobol program with examples of syntax.
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What are the access modes of START statement?
What kind of error is trapped by on size error option?
What are the cobol coding sheets?