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



Crispin

The issue comes from a desire to use the completely native solution - from the same source code. A program using a handler simple cannot use the native IO - it shunts everything to the handler for each op-code.

I can certainly see where, with WORKSTN or PRINTER files, that you might want to print locally or to Excel, show a green screen or a browser - those things are not easily conditional, if at all, at runtime. You COULD write something using display APIs, perhaps, but this technology is supposed to make things easier - not add to your workload.

I like Tom's solution - and, as he says, it doesn't seem to raise any editor syntax errors.

Vern

On 3/15/2011 10:38 AM, Crispin Bates wrote:
Rory,

RPG OA uses the existing code, and just passes info to the handler as
parameters. No changes required to the rest of the source, so I can't see
why any additional conditioning would be required...

----- Original Message -----
From: "Rory Hewitt"<rory.hewitt@xxxxxxxxx>
To: "RPG programming on the IBM i / System i"<rpg400-l@xxxxxxxxxxxx>
Sent: Tuesday, March 15, 2011 11:00 AM
Subject: Re: how to handle handlers *update


Nice solution, Tom. Do you also need to use this method anywhere else (when
specifying record format names for Write, Read etc.)?
On Mar 15, 2011 5:19 AM, "Tom Deskevich"<thomas.l.deskevich@xxxxxxxxxxxxx>
wrote:
I came up with this getting ready for work. It is true that the bathroom
is the thinking room.
This example that I created does NOT raise a syntax error since you use a
/COPY with the HANDLER.
FCEN106D CF E WORKSTN
/copy cenhnd

(will not raise the syntax error, because SEU does not know I am using a
handler)
Source member CENHND

/if defined(USE_HANDLER)
F Handler('ASNAWINGS')
/endif

(get the syntax error here, but you only touch this once)


We are keeping two object libraries, one for the handler RPG objects and
one NOT.
The 5250 programmers compile like they normally do, and DO NOT get the
syntax error when they go into the source.
We compile with CRTBNDRPG define(‘use_handler’)
If we accidently compile it to the wrong place, they just need to
re-compile without the parm to make it work.

Tom Deskevich
INFOCON
814-472-6066
Fax 814-472-5019
--
This is the RPG programming on the IBM i / System i (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 ...

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.