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



Sorry...you did mention that...the only other thing is that logical data
areas are not supported in OPM...


Here is a copy of Scott's reply awhile back :

Sigh... RPG/400 is an extremely limited language. That's why IBM
hasn't developed feaures for it in 15 years. That's why just about
everyone frowns on it's use... it's an extremely limited language.

It does not support *LGL data areas. Here's a quote from the RPG/400
User's Guide:

"An RPG/400 program does not support data areas defined by the
CL command CRTDTAARA in which *LGL is specified as the TYPE
parameter."

So, truly, what you're planning is not possible with RPG/400 (at least,
not without calling an API). It's beyond the capabilities of RPG/400.
It might be worth noting, although this doesn't really help you, that
when you use a data structure as the result of an IN operation, the data

area MUST be *CHAR. However, if you used a numeric field (just the
field, not in a data structure) you could potentially read a *DEC data
area from RPG/400. But *LGL isn't possible.

ILE RPG/400, by contrast, has no problem with *LGL data areas:

d MyLglVar s 1N dtaara(TESTLGL)

c *lock in MyLglVar

Likewise, CL has no problem with them

RTVDTAARA DTAARA(TESTLGL) RTVVAR(&MYLGLVAR)

If you want to stay with the OPM environment, your best bet is to write
a CL program to retrieve the contents of your *LGL variable, and call
that CL program from your RPG/400.

Sorry.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Adam Glauser
Sent: Thursday, April 10, 2008 9:59 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Error reading data area

Coyle, Stephen F. wrote:
Define your variable as
D triggerControl...
D S N dtaara(##trigCtl)

Also change to
if (triggerControl <> *ON);
Or
If NOT TriggerControl :

Thanks for the suggestion. As I mentioned, that was the first thing I
tried. I guess I messed up a step somewhere along the way.

Scott Klement wrote a very good explanation about data areas about a
month ago on this list

I'll try to hunt that down.

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.