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
State the various causes of s0c1, s0c5 and s0c7.
How do you reference the fixed block file formats from cobol programs
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
Write the code implementing the perform … varying.
Explain what you understand by passing by value.
What rules are followed by the search verb.
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
How to know whether the module is dynamical or statistical?
how do you reference the printer file formats from cobol programs
What the difference is between continue and next sentence?
how do you reference the esds vsam file formats from cobol programs
Explain about different table spaces.
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
What are the pertinent COBOL