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

Answers were Sorted based on User's Feedback



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

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

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

Answer / mr.s

using inspect command

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More COBOL Interview Questions

What is the usage of comp fields in cobol?

0 Answers  


wht r the advantages of 77 level number ?

8 Answers   TCS,


What are the different rules to perform a Search?

0 Answers  


If you were passing a table via linkage, which is preferable - a subscript or an index?

3 Answers   TCS,


How do you define a table/array in COBOL?

5 Answers   Hexaware,






Mention the guidelines to write a structured cobol program?

0 Answers  


What is the mode in which you will OPEN a file for writing?

4 Answers  


what is index and how to use two tables using index?

1 Answers  


What is the difference between next sentence and continue in cobol programing language?

0 Answers  


If there are two files one with 100 records and other with 101 records. we have to find out the one record that is the odd man out . What are the steps to do it

7 Answers   BirlaSoft,


What are the different open modes available in cobol?

0 Answers  


What is rmode(24)

0 Answers  


Categories