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
Which is not true about evaluate statement
how can i see junk values in dclgen or in hostvariable of comp ?
) How do u handle errors in BMS macro
Write down the divisions of cobol program?
What is the Purpose of Pointer in the string?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
how to access the file from prodution from changeman tool and to submit a file to production
What is rmode(24)
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.
How do you reference the fixed block file formats from cobol programs
example for sub strings ? and refernce modifications whit output pls
how to convert the recors form vsam file to db2 table tru file aid
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
Write a program to explain size error.