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 ? | 20 Yes | 1 No |
How can you pass values from COBOL program to non-COBOL programs?
How to covert given string into ASCII value in COBOL/MF COBOL
how to refer the data field?
01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.
How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree
what are decleratives in cobol?
I have 100 records in a file.. i want to sort the records from 5 to 5o... give the syntax...
What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?
01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access the second name
What is the difference between comp and comp-3?
) How do you access the migrate the data from production region to development region
can i give 9(10) in comp 3 instead of s9(10) ? if i can give wht would be ths ans