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 utilization of copybook in cobol? Could we utilize a similar copybook?
What are the different rules for performing sort operation?
How do you define a variable of comp-1 and comp-2?
Define static linking and dynamic linking.
how to convert the recors form vsam file to db2 table tru file aid
how do you reference the esds vsam file formats from cobol programs
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
What is comp-1 and comp-2?
What is the utilization of copybook in cobol?
How you can read the file from bottom?
How do u write test cases?
What is the difference between comp and comp-3 usage?
what is the use of outrecord?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?