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

How To Separate The Numerics From An Alphanumric Data Item
Which Contains Both Alphabates And Numerics ?

Answer Posted / shriram supalwar, dharmabad

01 A pic x(10) value 'a1b2c34d5e'.
01 B pic x(5).
(You want to move only numeric data from a to b)

PERFORM PARA1 VARYING I FROM 1 BY 1 UNTIL I>10
PARA1.
IF A(I:1) IS NUMERIC
MOVE A(I:1) TO B(I:1)
END-IF
END-PERFORM.
DISPLAY "NUMERIC DATA IS:" B(I).

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

HOw can I get the negative sign while deduct high value from low value

2298


For rewrite, why is it mandatory that file needs to be opened?

1151


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

1204


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

1174


How do get the result of your program directly on your pc?

2394


What is redefines clause in COBOL?

1349


What are the different rules for performing sort operation?

1278


What is the LINKAGE SECTION used in COBOL?

1599


What is the difference between binary search and sequential search?

1128


What is the difference between comp and comp-3 usage?

1254


What is the problem of ordered sequential files access?

1207


Explain what you understand by passing by value.

1202


What is the difference between comp and comp-3?

1227


how do you reference the esds vsam file formats from cobol programs

1266


how do you reference the fixed unblock file formats from cobol programs

1305