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?
Answers were Sorted based on User's Feedback
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 |
Answer / anonymous
You cant perform any arithmetic operationon alphabetic and
alphanumeric data items . If u try to perform u ll get SOC7.
| Is This Answer Correct ? | 2 Yes | 0 No |
can we print comp 3 stmts how ?
SSRange is used to do a range check on which of the Following. SUBSCRIPT,INDEX,REFERENCE MODIFICATION,Run-time option.
What are the differences bitween cobol and cobol-2?
What does the INITIALIZE verb do?
What is IMPACT analysis?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
What is the reference modification.
I HAVE FOLLOWING DECLARATION. 02. A PIC X(10) VALUE 'XXXXXXXXXX'. 02. B REDEFINES A. 05. C PIC X(3). 05. D PIC X(3). 05. E PIC 9(3). IN MY PROG, I HAVE MOVE 1 TO E. DISPLAY A. WHAT WILL BE DISPLAYED AS A RESULT OF THIS? PLEASE EXPLAIN THE ANSWER. THANKS.
what is Reentrancy and Quasi-reentrancy?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
What is the point of the REPLACING option of a copy statement?
What is 77 level used for ?