× 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 Scott,

I was aware that things changed in 6.1, however my understanding wasn't complete. I knew the workaround from pre-6.1 no longer worked, but I didn't realize they made an effort to make 1 byte return value work the same for CL & RPG. This helps clear up a lot.

Knowing's half the battle. The other half is me implementing these additional ExtProc *CL modifications.

Thanks for the information,

Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery Platform

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Sunday, December 06, 2015 12:16 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: CL calling RPG Procedure returning 1byte value

Kurt,

The way procedures are called changed in IBM i 6.1. So maybe you learned your lesson before 6.1, and it changed when you upgraded?

Of course, it also might change again in another future release.

The only way to be safe is to "follow the rules", which means to use EXTPROC(*CL). If you use that, your code should work on any release past or present.

Using some sort of other workaround that might work today, might not work in a future release, etc.

-SK


On 12/4/2015 3:44 PM, Kurt Anderson wrote:
To my knowledge, it has always been that for a RPG procedure that returns a single byte value, EXTPROC(*CL) must be specified on the prototype.

However, I have recently discovered numerous scenarios that are all working perfectly where it doesn't specify EXTPROC(*CL). I emailed the list about this back in 2011 where I found a scenario where it was working and the consensus was that we were lucky it was working. But now I'm questioning that.

Is EXTPROC(*CL) really still required for single-byte return values? Or is the scenario that EXTPROC(*CL) is required a bit more specific than "whenever you want a CL to call a procedure that returns a 1 byte value." I tried searching around, but didn't find an update on EXTPROC(*CL).

The documentation still states that EXTPROC(*CL) is required. Ideally I'm looking for something than "you're lucky all instances of your CLs using single-byte values returned from RPG procedures is working." I've even started to question my understanding of what a "single byte value" is, but the documentation gives 1a as an example and that's the majority of what I'm seeing our procedures use in these cases (and one using an indicator).

We're at 7.2.

Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery
Platform [cid:image002.jpg@01CD16F9.25D27630]
web: www.customcall.com<http://www.customcall.com/> | email:
kanderson@xxxxxxxxxxxx<mailto:kanderson@xxxxxxxxxxxx>

A Division of Enghouse Systems Ltd.<http://www.enghouse.com/>
(TSX:ESL)


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


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.