RE: Re: GCIC Fullscreen applications Replace algorythm
"Rocky" <[email protected]>
| Newsgroups | gmane.comp.emulators.hercules390.vm |
|---|---|
| Message-ID | <[email protected]> |
Thanks Paolo Thats good logic and I didn't think of using the LRECL as part of the algorythm Makes very good sense. In the same vein perhaps we could use the FT as part of the logic as well. "C" "EXEC" "ASSEMBLE' "PLI" "COB" Do you think I should try to identify if it is a program _ perhaps identifying - Assembler - C - PL1 that is probably doable very easily - and then I could tailor the logic a bit And do you agree that shifting whole line is the right approach as opposed to shifting out multiple blanks For instance: ch /MVC/PACK/ MVC A,B original xxx1234xxx PACK A,B eliinating mulltiple blanks xxxx123xxx or PACK A,B Shifting Line xxxx1234xxxx Would we want the A,B to line up or are we going to shift them. I think that TSO trys to eliminate blanks for certain scenarios and X-edit shifts the whole line Roc _____ From: [email protected] [mailto:[email protected]] On Behalf Of paoloG Sent: Monday, August 09, 2010 08:47 To: [email protected] Subject: [H390-VM] Re: GCIC Fullscreen applications Replace algorythm --- In [email protected] <mailto:H390-VM%40yahoogroups.com> , "Rocky" <rocsystems@...> wrote: > > > > 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 > Rocky, I'll give you my thoughts;-) if RECFM=F and LRECL=80 you should trunc at length=72, if RECFM=F and LRECL>80 you should trunc at length=LRECL, if RECFM=V you should shift the whole line to the right. BTW you're doing an excellent job; I'm really astonished! Regards. Paul