[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Strange SA/NV behavior--BK is culprit
- Subject: Re: Strange SA/NV behavior--BK is culprit
- From: Carl Distefano cld@xxxxxxxx
- Date: Sat, 17 Oct 2009 13:30:24 -0400
Reply to note from Paul Lagasse Sat, 17 Oct
2009 07:43:52 -0400
Paul:
> In my case, resetting the flag is not desirable. If I were to
> save when I've not altered a file, I would end up with FILE and
> FILE.BAK being identical, and lose the old version stored as
> FILE.BAK.
I don't think so. Your routine performs the COPY command first,
before SAving, right? (If you trace the GoLabel...LaBel sequence,
you'll see that it does.) If the file has not changed on disk, you
would simply be copying the same file contents over the existing
.BAK file. The file date of the .BAK file would be refreshed, but
the file contents would not change. In any event, you can avoid the
unnecessary .BAK file refresh by doing COPY/NV only if VA$MO is 1.
Here's your routine, with a forced SAve (and no LaBels); .BAK files
are handled the same as in yours:
XPLeNCODE v2.0
b-gin [UNTITLED]
{<}IF{<}VA$MO{>}>0{>}{<}SX01,{<}VA$FP{>}{>}[BX_]exist {<}PV01
{>}[Q2_]{<}IF@NOT({<}ER{>}){>}{<}SX02,{<}IS01{>}{>}{<}IF{<}IS
01{>}{240}"."{>}{<}SV02,.{>}{<}XS01,02,02,03,03{>}{<}EI{>}[BX
_]copy/nv {<}PV01{>} {<}PV02{>}.BAK[Q2_]{<}EI{>}{<}EI{>}[GT_]
{<}SV01,{>}{<}GT01{>}[BX_]sa[Q2_]{<}IF@NOT({<}ER{>}){>}{<}PRF
ile saved{>}{<}EI{>}{<}EX{>}[cr|lf][cr|lf]
-nd
XPLeNCODE
--
Carl Distefano
cld@xxxxxxxx