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



Hi Reeve and Daniel,

It's not the "in %range()".

It's the missing () in the %date function.
It's needed for in range, but not for >=.

%date() in %range() <-- works

Vs %date in %range() <- fails

select;
when %date() in %range(gpoeff:gpocan)
or (%date >= gpoeff and gpocan = d'0001-01-01');
*in82 = *on;
when gpoeff > %date;
*in83 = *on;
endsl;

I have a bunch of code with %range, and all them are forced to use %date() in %range().

Hope this helps!

Steve



-----Original Message-----
From: WDSCI-L <wdsci-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Daniel Gross
Sent: Monday, January 27, 2025 12:15 AM
To: wdsci-l@xxxxxxxxxxxxxxxxxx
Subject: Re: [WDSCI-L] "Formatting failed: no model available" error: possible cause

External: Pause and review the sender's email address, any URLs before clicking links, opening attachments, or following requests. When in doubt, contact the Service Desk.


Hi Reeve,

select;
when %date in %range(gpoeff:gpocan)
or (%date >= gpoeff and gpocan = d'0001-01-01');
*in82 = *on;
when gpoeff > %date;
*in83 = *on;
endsl;

As you have written this, it seems, that you already tried other code, that didn't cause the error instead.

compiles on V7R5 but causes the Outline to fail with the "Formatting
failed: No model available" message in RDi 9.8.0.3 and 9.8.0.1.
Comment out the first WHEN clause and everything works as expected.
In this case, the %range built-in function may be the culprit.

Yes - %range can be the problem. I have found a compiler error some weeks ago, when using for-each and %split in one statement.

I would try to open a ticket at IBM with example code - they forward the RDi tickets to Fortra.

HTH
Daniel
--
This is the Rational Developer for IBM i (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/wdsci-l.



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