I have a field with data type X(10). I want to perform
arithmetic operation on this field? I tried doing it by
moving the value into a numeric field. but it didn't work
out. I am getting a S0C7 abend. Pls let me know if there is
any way of getting this done?
Answer Posted / suersh ramaiyan
Use REDEFINE.
Example:
01 NUMBER-X PIC X(10).
01 NUMBER-N REDEFINES NUMBER-X
PIC 9(10).
COMPUTE A = NUMBER-N + B
This will surely work.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is the difference between next sentence and continue in cobol programing language?
When is inspect verb is used in cobol?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
Explain how to differentiate call by context by comparing it to other calls?
What is rmode(24)
What are various search techniques in cobol? Explain.
example for sub strings ? and refernce modifications whit output pls
Discuss about changing dataset name in proc.
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
What is the Purpose of Pointer in the string?
Define cobol?
How you can characterize tables in cobol?
What is static and dynamic call in cobol?
Which mode is used to operate the sequential file?