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
Why would you use find and get rather than to obtain?
What are the various section in data division and briefly explain them.
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
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.
Mention the guidelines to write a structured cobol program?
What are the pertinent COBOL
What are the different rules to perform a Search?
What is redefines clause in COBOL?
Discuss about changing dataset name in proc.
What are 77 levels used for?
What is the difference between PIC 9.99 and PIC9v99?
What is the difference between next sentence and continue in cobol programing language?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
What is comp-1 and comp-2?
What are different data types in cobol?