× 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

Sorry, I did not mean to rattle anything. I didn't see where you mentioned formats in your reply - oh, Rory mentioned formats.

Tom's solution was a way to take care of the problem I described and that I thought Tom was addressing - that you can't do native IO easily once you set a handler. This has been a strong concern of mine all along, and Tom has a nice approach.

So please take what I said as expanding on your and Rory's and Tom's posts. Mention of display APIs was my meandering through possible other solutions that I find not very useful if one wants to still have the option of native usage, as well as remote devices.

Again, no offense meant at all.

Vern

On 3/15/2011 3:25 PM, Crispin Bates wrote:
Vern,

What does this have to do with my answer to Rory?

Rory was asking if there was a need to add additional conditional compile
statement in the existing code, in a response to Tom's solution, where they
have two sets of objects from the same source code. I simply said no, there
was no need to change any reference to record formats in the existing code.

Where did I show my naievty to how the handlers work? Where did I say
anything anout a handler using the native IO? Where did I say anything about
rewriting anything to use display API's? Where did I say anything about
making it conditional at runtime? Where did I say anything about adding to
anybody's workload?

My cage is rattled by your response. Do you get that?


----- Original Message -----
From: "Vern Hamberg"<vhamberg@xxxxxxxxxxx>
To: "RPG programming on the IBM i / System i"<rpg400-l@xxxxxxxxxxxx>
Sent: Tuesday, March 15, 2011 3:49 PM
Subject: Re: how to handle handlers *update


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

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.