× 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.



One - I don't see this as too tricky:
if %nullind(termDate);
dsply 'employee is active';
else;
dsply 'employee was terminated ' + %char(termDate);
endIf;
or any more lines of code than
if termDate = MichelangelosBirthday;
dsply 'employee is active';
else;
dsply 'employee was terminated ' + %char(termDate);
endIf;

You do have some leg to stand on that if an incompetent programmer were to
check termDate without checking it's null indicator they can get into
trouble. For example if I do
termDate = date(); // set to current date
%nullind(termDate) = *on; // set termDate off as employee is active
dsply termDate; // even though null, it will still display today's date
But, who's to say that same programmer wouldn't figure that a date of
0001-01-01 or Michelangelo's Birthday or whatever wasn't a valid date?

Were you hoping that IBM had written the compiler so that if you tried
dsply termDate;
and if termDate was null then you'd get a messy MCH type message as if you
tried to dsply a variable that wasn't passed into the program and you
failed to check %addr on that?

I take it you also have an issue with
select termDate
into :termDate :termDateInd
from ....


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.