|
Post by Stefan on Dec 31, 2023 12:14:02 GMT -5
Hi George,
You'll no doubt recall a debate about PRESERVE and which trailing blanks in file it should or should not remove. This took place around October 26th
I thought you fixed it so that PRESERVE OFF would trim all trailing blanks from lines, UNLESS they had color attributes associated with them. Such lines would be curtailed at the right-most blank with an attribute.
So line lengths should vary and could even be zero length.
Either I was mistaken and that isn't what was implemented or the 'fix' has been lost.
Most of my profiles specify RECFM U, LRECL 0, MINLEN 100, PRESERVE OFF. I thus rely on PRESERVE OFF to leave just the 'relevant' chars on every line. Opening any of my files with NOTEPAD, a simple REPLACE ALL " " "@" makes it clear that my files all behave as RECFM F, LRECL 100
PRESERVE OFF isn't doing anything as far as I can see.
Any thoughts?
|
|
|
Post by George on Jan 1, 2024 11:17:07 GMT -5
Stefan: Working here with the latest Beta. Here's a snapshot of a test file, with some HILITE blocks extending into the trailing blanks. MINLEN was 100 and you can see the cursor positioned after the END key. PRESERVE is OFF. I do a SAVE and the 2nd snapshot shows the file in HEX with the HILITEd trailing blanks retained. I tried with no HILITEs also and all trailing blanks were removed. ? George
|
|
|
Post by Stefan on Jan 5, 2024 11:50:33 GMT -5
George,
I'm going to need some help here - I'm clearly missing something elementary.
I've attached a part of a file which simply refuses to reliquish trailing blanks.
The profile profile for this is:
=PROF> PROFILE REX LOCKED, ACTION OFF, AUTOBKUP ON, AUTOCAPS ON, AUTONAME REX =PROF> AUTOSAVE ON NOPROMPT, BOM OFF, CAPS OFF, CASE T, CHANGE DS, COLLATE ANSI =PROF> COLS ON, COMMENTS 5 55 5 89, EMACRO NONE, EOL CRLF, FOLD OFF, HEX OFF, HILITE FIND AUTO =PROF> IMACRO NONE, LRECL 0, MACLIB NONE, MARK ON, MINLEN 100, MODE EDIT, NUMTYPE NONE =PROF> PAGE OFF, PRESERVE OFF, RECFM U, SCROLL HALF, SETUNDO 20, SOURCE ANSI, START PRIOR =PROF> STATE ON, SUBARG OFF, SUBCMD OFF, TABS ON, TABBNDS OFF, XFORM NONE, XTABS 0 =WORD> A-z a-z 0-9 _ ! ? =MARK> < < > < =MASK> =TABS> * * * * * * * * * * =COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----10---+----11---+----12---+----13---+- =BNDS> < >
Note we have: EOL CRLF, LRECL 0, MINLEN 100, PRESERVE OFF, RECFM U
Suggest you first open the file with NOTEPAD and examine the blanks via Edit -> Replace, change <singleblank> to ! and select REPLACE ALL
Load file into SPFLIte.
Ensure you have HILITE FIND ON in the profile. Enter FIND " " ALL You'll see the same pattern as your did with Notepad. You can change and SAVE as much data as you like and re-examine with NOTEPAD - the trailing blanks are not removed PRESERVE ON removed nothing - not even the surplus blanks from lines 9 and 10.
Now it gets interesting!
Issue TR/ line command on line 000001 Enter FIND " " ALL and the screen will show you that trailing blanks are now gone. SAVE the file or close the tab with END
Reopen file with NOTEPAD - do the "replace thing" again and there are all the trailing blanks - up to the MINLEN limit of 100 bytes line length.
I'm stumped. What simple thing am I missing?
|
|
|
Post by George on Jan 5, 2024 13:42:49 GMT -5
Stefan: OK, weird though it was, I found it.
AUTOCAPS
With AUTOCAPS on the line being written is first passed to the AutoCaps guy, who adds the appropriate UC LC attributes.
PRESERVE didn't strip off blanks with an attribute, in this case UC and LC. It is now trying to be a bit smarter.
Interesting chase.
When I do a TR/ the spaces don't go away if MINLEN 100
I do the SAVE and open in NotePad, and the spaces are gone (Remember - with the 'fixed' version)
I'll try and get a Beta out today. George
|
|