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



Thanx everybody for the input

I am well aware that the TR will not give me the solution. "How to detect
if a RPG feature is available for the compiler version" would have been a
better title.

I hate my own solution to this problem: Create a tiny dummy program in
QTEMP with this only feature: And if the compile fails - well the feature
is not supported and we can set a compiler directive based on that
knowledge. This is how it is done on unix, however I was looking for a more
elegant solution since we are on IBM i and only have one RPG compiler
vendor.

However, since i don't like the "magic code" in my solution above - I
think I will stick to a more pragmatic solution to let the "user"
define USE_OVERLOAD if it is loaded on the system or not. If we are on a
V7R4 I will define that automatically


/IF DEFINED(*V7R4M0)
DEFINE USE_OVERLOAD
/ENDIF
...
/IF DEFINED(USE_OVERLOAD)
Dcl-PR jx_Set Pointer overload (
jx_SetBool :
jx_SetNum :
jx_SetInt :
jx_SetDate:
jx_SetTime:
jx_SetTimeStamp:
jx_SetStr
);
/ENDIF




On Wed, Jul 1, 2020 at 10:04 PM Jim Oberholtzer <midrangel@xxxxxxxxxxxxxxxxx>
wrote:

You would have to modify the where clause to see if it’s applied, but
that’s simple.

Jim Oberholtzer
Agile Technology Architects



On Jul 1, 2020, at 1:57 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
wrote:

Is that loaded status always that even when superceded? Or isn't there
a superceded flag? That should be in that result somewhere, right? That
would get around the variability, I'd think, Jim.

Regards
Vern

On 7/1/2020 12:01 PM, midrangel@xxxxxxxxxxxxxxxxx wrote:
Or just use SQL to identify if the PTF is loaded/applied:

SELECT PTF_IDENTIFIER, PTF_IPL_REQUIRED, A.*
FROM QSYS2.PTF_INFO A
WHERE PTF_LOADED_STATUS = 'LOADED'
ORDER BY PTF_PRODUCT_ID;

(from the SQL scripts example)


--
Jim Oberholtzer
Agile Technology Architects

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Vernon
Hamberg
Sent: Wednesday, July 1, 2020 11:52 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Prototypes depending of TR ( overload)

YW - RFE comes to mind, but a condition based on PTF would change so
often
to be almost useless.

Crazy idea - is there a SRVPGM used for the RPG runtime? If so, check
the
exports?

OK, enough insanity, right?

Cheers
Vern

On 7/1/2020 10:39 AM, Niels Liisberg wrote:
Thank you Vern; Well I don't have the silver bullet to fix this issue
..
Keep me posted if you get some ideas :)


On Wed, Jul 1, 2020 at 2:28 PM Vernon Hamberg
<vhamberg@xxxxxxxxxxxxxxx>
wrote:

Hi Niels

I'm sure you know what I'm going to say and ask here, but for the
benefit of the archive, right?

Isn't the problem that the PTFs for RPG and other things are not part
of the TR PTF number? There are hardware and firmware updates tied to
the TR PTF, not for RPG or Db2, as I understand it. The key phrase is
"Enhancements timed with Technology Refresh 1" on
https://www.ibm.com/support/pages/node/1164034

That page has a link - https://www.ibm.com/support/pages/node/1106409
- to the RPG Cafe article - which gives some details.

But none of that helps, right? Can we condition a define on a PTF
number?

I'm just asking lots of questions - apologies that it doesn't give a
solution!

Vern

On 7/1/2020 5:07 AM, Niels Liisberg wrote:
Is there a way to determine if a TR is installed so a given
prototype can be available.

My use case is to overload some procedures to give a unified
interface.
Today I can do a /IF DEFINED(*V7R4M0), however the "overload"
feature is also available if you have 7.3 with current TR.

How to get around this?

/IF DEFINED(*V7R4M0)
Dcl-PR jx_Set Pointer overload (
jx_SetBool :
jx_SetNum :
jx_SetInt :
jx_SetDate:
jx_SetTime:
jx_SetTimeStamp:
jx_SetStr
);
/ENDIF
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post
a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://amazon.midrange.com


--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


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.