how do you move only numeric data from A to B
01 A pic x(10) value 'a1b2c34d5e'.
01 B pic x(5).

Answer Posted / ravi krian j

using reference modification move & isnumeric


PERFORM VARYING I FROM 1 BY 1 UNTIL I>10

IF A(I:1) IS NUMERIC
MOVE A(I:1) TO B(I:1)
END-IF
END-PERFORM.

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a Search can be done on a table with or without Index?

800


How do we get current date from system with century in COBOL?

796


How many sections are there in data division in COBOL?

676


What is the Purpose of Pointer in the string?

640


How do you reference the following file formats from cobol programs?

693






What is rmode(any) ?

680


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1798


How do define dynamic array in cobol.

669


Differentiate between structured cobol programming and object-oriented cobol programming.

663


) How do u handle errors in BMS macro

1505


How to print 10 to 1 if the input have only 10 digit number?

808


Write down the divisions of cobol program?

665


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

674


What the difference is between continue and next sentence?

651


What is the local-storage section?

681