× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jerry,

You're using the %fields BIF for the UPDATE, so the only fields that will
be updated are those you specify - this is good. However, in the ELSE
clause, you're simply writing the RFREC record. Unless you're explicitly
specifying all the fields in that ELSE clause, a previous successful CHAIN
would load the fields, and the WRITE might use some of those values unless
you explicitly set them.

Rory

On Thu, Jul 12, 2012 at 10:09 AM, Gerald Kern <jp2558@xxxxxxxxx> wrote:

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;

--
Thanks, Jerry


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.