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 / quasar chunawala
You cannot perform Arithmetic Operations on Textual
Character Data.
01 WS-TEXT PIC X(02) VALUE '15'.
ADD +1 TO WS-TEXT
This is a S0C-7(Data Exception in COBOL).
If you still want to acheive this effect, I suggest you do
it this way -
01 WS-TEXT PIC X(02) VALUE '15'.
01 WS-NUMBER REDEFINES WS-TEXT PIC 9(02).
ADD +1 TO WS-NUMBER
Is This Answer Correct ? | 10 Yes | 0 No |
How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1: move 20 to a.
what is scope terminator
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
i want to enter the name 'pandu' into ur table how?
created cluster using IDCAMS ..that is empty ..when i write a program for read using Input ..wil it open the cluster or gives any error?
how to know that the file has 300 records how to acess it?
describe 805 error
what is the minimum number of lines a Cobol program should have to successfully compile and run
11 Answers ABC, Societe Generale,
If i got a job on mainframe technology, will i have a bright future?. Some people are discouraging me. Let me know, is it true? Please bring back me from the confusion.
How can I tell if a module is being called DYNAMICALLY or STATICALLY?
how do you define single dimensional array and multidimensional array in your cobol?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?