Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between Global and External Variables?

1387


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

2118


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

2088


Are you comfortable in cobol or jcl?

1061


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

1360


example for sub strings ? and refernce modifications whit output pls

2326


What is comp-1 and comp-2?

1238


What are all the divisions of a COBOL program?

1221


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

1333


What are different data types in cobol?

1328


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2556


In COBOL programming, what is PERFORM? What is VARYING?

1156


In COBOL, what is the different between index and subscript?

1250


Explain what you understand by passing by value.

1167


how do you reference the printer file formats from cobol programs

1231