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
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
What are different data types in cobol?
What is the difference between comp and comp-3?
What is the use of intialize verb?
State the various causes of s0c1, s0c5 and s0c7.
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
) How do u handle errors in BMS macro
What is the difference between PIC 9.99 and 9v99 in COBOL?
how do you reference the esds vsam file formats from cobol programs
Why would you use find and get rather than to obtain?
What is the LINKAGE SECTION used in COBOL?
What is the difference between comp and comp-3 usage?
Write the code to count the sum of n natural numbers.