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
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 |
What is the usage of comp fields in cobol?
wht r the advantages of 77 level number ?
What are the different rules to perform a Search?
If you were passing a table via linkage, which is preferable - a subscript or an index?
How do you define a table/array in COBOL?
Mention the guidelines to write a structured cobol program?
What is the mode in which you will OPEN a file for writing?
what is index and how to use two tables using index?
What is the difference between next sentence and continue in cobol programing language?
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
What are the different open modes available in cobol?
What is rmode(24)