Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Help with Inspect _src_ replacing all [SPACE]ALPHANUMERIC[SPACE] by space
On Nov 2, 7:29 am, vferr...@alumni.uottawa.ca wrote:
> William M. Klein wrote: 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> Hey guys!
>
> Well, I tried the suggestion above, and sure enough it worked.
>
> I am sorry for not originally describing the problem very clearly. It
> was somewhere along the lines...
>
> I have a string say-  ' big fresh a apple'
> I needed to scrapout the a and replace it with a space, I realize this
> will give me double spaces, but I have a routine later that scrubs off
> additional spaces, which was why I didnt care.

Do it in a loop with UNSTRING .. DELIMITED BY SPACE .. WITH
POINTER .., check each word for being a single character and assemble
the result string with STRING .. WITH POINTER .. (not same pointer of
course).

MOVE 1 TO InP OutP
MOVE SPACES TO OutS
PERFORM UNTIL InS(InP:) = SPACES
UNSTRING InS DELIMITED BY SPACE
INTO Word
WITH POINTER InP
IF ( InS(2:1) NOT = SPACE )
STRING Word DELIMITED BY SPACE
" "  DELIMITED BY SIZE
INTO OutS
WITH POINTER OutP
END-IF
END-PERFORM







Report this thread to moderator Post Follow-up to this message
Old Post
Richard
11-01-07 11:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:15 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.