I am planning to do following steps.But still have some questions.
WS-VAR1 PIC X(30) value 'ABC-D.#E234/12/3145'
1. Inspect on WS-VAR1 to replace '#', '.', '/' by spaces
output would be --> ABC D E234 12 3145
Question:- Do I have to use INSPECT 3 times for 3 special characters.
1.INSPECT, for replacing '#' by SPACES.
2.INSPECT, for replacing '.' by SPACES.
3.INSPECT, for replacing '/' by SPACES.
2.Doing perform something like below..
perform varying source-index from 1 by 1
until source-index > source-size
if source-field(source-index:1) > space
add 1 to target-index
move source-field(source-index:1) to
3.Now calculating the length of string and then will use Reference modification for numeric check like ws-new-var(len-of-str:9) is NUMERIC then do my work, else do nothing..
Can anyone throw some light on my approach?