Hi friends,
I need a help on Cobol coding..
I would like to replace special characters with Spaces and then find any 9 digit numeric value( at end) is there in that string then perform some action. That numeric value should be 9 bytes length and is always last part of the string.If last 9 bytes are not 'numeric' then do nothing.Can you help me how we can do this?
Here is the example:-
#1.
I have a input string WS-VAR1 PIC X(30) like ABC-D.#E234123145
then special characters - . # should be replace by 'spaces' as below 'ABC D E234123145'
then search the string for last 9 characters..it will find 234123145..so Perform some action.
#2.
WS-VAR2 PIC X(30) value 'DEF&#F@G1234'
It's not having last 9 digits as 'numeric' so it does nothing.
Can you please share some ideas how I can do this?
Thanks,
Suresh.