Search found 3 matches

by ashok6254
Tue Mar 13, 2012 3:18 pm
Forum: COBOL
Topic: Replacing a larger string with smaller string
Replies: 3
Views: 6294

Got it.... Thank you dick for your suggestion.. I did this way.. inspect msg-2000-chars tallying cnt-sb for all "should be" perform cnt-sb times inspect msg-2000-chars replacing first "should be" by "s/b{*}{@}" unstring msg-2000-chars delimited by "{@}" into receiving-f...
by ashok6254
Fri Mar 09, 2012 5:49 pm
Forum: COBOL
Topic: Replacing a larger string with smaller string
Replies: 3
Views: 6294

how many times can/could the string 'SHOULD BE' occur within the 2000 char string?
not sure...

It may occur once or twice or thrice or in worst case more than 10 times..

And can't tell where this may come.....
by ashok6254
Fri Mar 09, 2012 4:43 pm
Forum: COBOL
Topic: Replacing a larger string with smaller string
Replies: 3
Views: 6294

Replacing a larger string with smaller string

Hi, I am trying to replace a larger byte string with a smaller byte string. I tried using cobol INSPECT - REPLACING.. As both operands are not of equal size, it is throwing an error. Suppose in a 2000 byte string, if there is any "SHOULD BE", should be replaced with "S/B". i.e., a 9 bytes string sho...