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 ?

Answers were Sorted based on User's Feedback



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

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

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

Answer / harsha

Use COBOL program and check byte by byte.

Is This Answer Correct ?    9 Yes 0 No

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

Answer / kingmanish

Use the COBOL keyword ISNUMERIC.

This would be evaluated to true if the value stored is
numeric and you can separate the numeric values

Is This Answer Correct ?    2 Yes 1 No

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

Answer / reddy

use Function NUMVAL

Is This Answer Correct ?    4 Yes 8 No

Post New Answer

More COBOL Interview Questions

What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?

2 Answers  


What is the figurative constant in cobol?

1 Answers  


i want to store 20 digits . h will u do it in cobol ?

4 Answers   TCS,


How to increase the logical record length of existing PS file?

7 Answers  


How many sections are there in data division in COBOL?

0 Answers   B-Ways TecnoSoft,


When would you use in-line perform?

2 Answers  


What are the different data types available in COBOL?

4 Answers  


What are the differences bitween cobol and cobol-2?

1 Answers   Wipro,


How do define dynamic array in cobol.

0 Answers  


How do you reference the fixed block file formats from cobol programs

0 Answers  


whn do i get soc7 abend while moving alphanumeric to numeric or while moving numeric to aplhanumeric please reply ASAP?

9 Answers  


level number 77 is used to define a)group data b)elementary data c)redefine d)none

8 Answers   TCS,


Categories