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
How do you differentiate between cobol and cobol-ii?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
What are the different types of condition in cobol and write their forms.
What are the various section in data division and briefly explain them.
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
What is rmode(any) ?
What is the problem of ordered sequential files access?
What is the difference between next sentence and continue in cobol programing language?
What is redefines clause in COBOL?
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
In COBOL programming, what is PERFORM? What is VARYING?
Difference between cobol and cobol-ii?
What is a SSRANGE and NOSSRANGE?