Last Character ?
Craig Tooker
craig at cwtsoftware.com
Mon Mar 19 13:22:59 PDT 2012
On 3/19/12 14:23, Kenneth Brody wrote:
> On 3/19/2012 2:13 PM, GCC Consulting wrote:
> [...]
>>> Since the data is a 4-digit year, PFCMARK is irrelevant for it. Although
>> I don't
>>> know what data he's storing in that field, it is not bounded by PFCMARK.
> [...]
>> Ken,
>>
>> I had suggested to him, off list, that he use pfcmark in this manner:
>>
>> Date="20"{getenv("pfcmark"){"12/31"
>>
>> Lv=999999&date
>>
>> This would give him the highest possible values for the lookup. Of course
>> this would depend on the value of pfcmark.
> A 4-digit-year date field (and the OP is using such dates) is not bound by
Additionally, in any situation where two digit years and PFCMARK did
apply, you would want to use "getenv("PFCMARK")-"1" because PFCMARK
indicates the cut over year for the sliding century. You are trying to
get at the last date *before* the mark.
I usually code it thus:
then: yr(3,.0)=getenv("PFCMARK");declare latest_date(8,mdy/)
if: yr=""
then: yr=getenv("FPCMARK") ' in case I am dyslexic
if: yr = "" or yr ge "100"
then: yr="100" ' in case no mark is defined it will give us '99'
if:
then: latest_date = "12/31/"{(yr-"1")
> PFCMARK.
>
More information about the Filepro-list
mailing list