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
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
What is redefines clause in COBOL?
Can we change the password using ALTER? anyone tried and changed?
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
example for sub strings ? and refernce modifications whit output pls
What is rmode(24)
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
Name some of the examples of COBOl 11?
What is an in line perform? When would you use it? Anything else you wish to say about it.
A table has two indexes defined. Which one will be used by the SEARCH?
explain sorting techniques in cobol program?
what is the use of outrecord?
How to print 10 to 1 if the input have only 10 digit number?