Best practice would seem to indicate a CLEAR RFREC; should be placed
immediately after the else;

I wouldn't rely on assuming anything about the state of those other
fields. Even if they were being cleared now, a later program
modification could unwittingly change that.

Trevor Briggs
Analyst/Programmer
Lincare, Inc.
(727) 431-1246
TBriggs2@xxxxxxxxxxx

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Gerald Kern
Sent: Thursday, July 12, 2012 1:10 PM
To: RPG
Subject: Re: Record Buffer question after file open and close

This is the meat of the code - I asked the programmer who wrote this
what
was missing, and his response was 'clearing the rest of the fields...
but I
thought closing the file would take care of it'.

Begsr UpdateRfmast;

Chain %KDS(RF_KEY) RFMAST;
IF %FOUND(RFMAST);
AST402_DS=AST402;
RFPCPNPI= ast402_DS.NPI;
RFB1=AST402_DS.UPIN ;
RFA1=AST402_DS.NAME ;
UPDATE RFREC %Fields(RFPCPNPI:RFA1:RFB1);
else;
AST402_DS=AST402;
rfloc= loc_PR;
rfclno = clno_pr;
rfptno = pat_PR;
RFPCPNPI= ast402_DS.NPI;
RFB1=AST402_DS.UPIN ;
RFA1=AST402_DS.NAME ;
write RFREC ;
ENDIF;

ENDSR;


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.