RE: Re: GCIC Fullscreen applications Replace algorythm

"Joe Monk" <[email protected]>
Newsgroups gmane.comp.emulators.hercules390.vm
Message-ID <[email protected]>
Rocky -

I would have a "bounds" function that would set the column boundaries for
ALL functions. You can default this from the file type, or just set it to 80
for F, or lrecl for V.

Then when doing a "replace", replace within those boundaries and trunc to
the right. If you do trunc, make sure and tell the user.

Don't try to subjectively "guess" as to what to do.

Make the user tell you.

Joe
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Rocky
Sent: Monday, August 09, 2010 12:05 AM
To: [email protected]
Subject: [H390-VM] Re: GCIC Fullscreen applications Replace algorythm



I threw this question out yesterday but have had no specific suggestions as
to how the REPALCE alogrythm should work when one the replacing field is
larger or smaller than the field being replaced.

When it is smaller than the filed it is replacing  what do we do?
replace the field and PAd with blanks or shift the entire line is there a
trunc function needed

Blanks are valid arguments for Replace and search. But they may also have a
special delimiting function.

What do we do when the replacing field is larger

Do we just shift the whole record from that point Do we have a trunC
position that stops the shifting Do we arbitarily shift out the last
position of the record.
Do we remove Blanks in the middle
and leave as much unchanged as possible.

In the absence of an algorythm I will not waste any more time on this

If no one has thoughts I will add a trunc position that will default to 72
but that can be changed and I will just shift the whole line to the right or
left from where the string is found.
That is the easiest logic though not necessarily the best.

If I have to shift anything other than blanks out of the record it will be
an error

Message  will be:  Some records not replaced




------------------------------------

Yahoo! Groups Links
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.