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 ? | 20 Yes | 1 No |
Post New Answer View All Answers
How do you get the data to code the BMS macro?
Difference between array and sub-script ?
What is length is cobol?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
What are the different rules to perform a Search?
Define static linking and dynamic linking.
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
What is the difference between perform … with test after and perform … with test before?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What rules are followed by the search verb.
Explain how to differentiate call by context by comparing it to other calls?
What is the difference between comp and comp-3 usage?
Explain what you understand by passing by value.