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



Hello Jerry,

The QGYRHRL/QgyRtvHdwRscList API actually returns hardware resources as
opposed to the configuration descriptions of type *DEVD that you are
after. Hardware resources of type *LWS are the IOP's and controllers
through which the workstation device descriptions are attached to your
system. You can run the command DSPHDWRSC *LWS to see the hardware
resources of type *LWS configured on your system. Running this command
will probably produce a list of the two entries that you are currently
getting from the API call.

To get a list of all workstation devices you can use the List
Configuration Descriptions (QDCLCFGD) API - the documentation can be
found here:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/QDCLCFG
D.htm

Best regards,
Carsten Flensburg

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry Adams
Sent: 26. april 2007 15:25
To: RPG programming on the AS400 / iSeries
Subject: Re: QGYRHRL API

Bob,

Thanks again for the pointers. Making the changes you suggested
certainly made for a better program. Unfortunately, I get the same,
incomplete (per my expectations, that is) results. That is, none of the
workstation devices (twinax, emulation, or network) actually show up in
the list. Looks like I picked the wrong API; I next try Rob's
suggestion about using the List API.


* Jerry C. Adams
*IBM System i5/iSeries Programmer/Analyst B&W Wholesale Distributors,
Inc.* * voice
615.995.7024
fax
615.995.1201
email
jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Bob Cozzi wrote:
D QGYRHRL PR ExtProc('QgyRtvHdwRscList')
D Receiver 28800a
D Length 10i 0 Const
D Format 8a Const
D Resource 10i 0 Const
D Errors 116a

I would add OPTIONS(*VARSIZE) to the RECEIVER parameter otherwise you
have to pass a 288000-byte variable for that parameter.

Next, you ERRORDS data structure is NOT initialized. Consequently it
is telling the API that it has X'40404040' as the structure length.
Which is telling the API that you're passing in an error DS that is
1077952576 bytes long.

Rule 1 of data structure declaration: "Avoid surprise, Initialize!".
Add the INZ keyword to the definition of ERRORDS to resolve this
issue.

Next, this code:
Header = %subst(Receiver:1:16);
and
Detail = %subst(Receiver:start:124);

Should be:

Header = %subst(Receiver:1:%size(header)); and Detail =
%subst(Receiver:start:%size(detail));



-Bob Cozzi
www.i5PodCast.com
Ask your manager to watch i5 TV



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry Adams
Sent: Wednesday, April 25, 2007 9:26 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: QGYRHRL API

Bob,

As regards the security issue, probably not an issue as I have *AllObj

authority.

I posted the code at http://code.midrange.com/index.php?id=50f273c912.


* Jerry C. Adams
*IBM System i5/iSeries Programmer/Analyst B&W Wholesale Distributors,
Inc.* * voice
615.995.7024
fax
615.995.1201
email
jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Bob Cozzi wrote:

Jerry,
It is either your prototype or your parameter list or a security
issue.
Can you post a code excerpt?

-Bob Cozzi
www.i5PodCast.com
Ask your manager to watch i5 TV



-----Original Message-----
From: rpg400-l-bounces+bob=rpgworld.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+bob=rpgworld.com@xxxxxxxxxxxx] On Behalf Of
Jerry

Adams

Sent: Wednesday, April 25, 2007 7:57 AM
To: RPG Midrange
Subject: QGYRHRL API

I wrote a program that uses the QGYRHRL (QgyRtvHdwRscList) API
yesterday. The purpose is to find all of the workstation devices on
the system. However, only two devices are found; trust me, we have
more than two workstation devices here. And, incidentally, neither
of the workstations it retrieves is listed when I use WRKCFGSTS *DEV.

No printer is retrieved; we have twinax, network, and emulated
printers all on our system; all of which show upon using the
WRKCFGSTS command.



Originally I tried limiting the API to retrieve just the local work
station resources (Category = 3). When that didn't work, I changed
the program to retrieve all hardware resources (Category = 1). Same
result plus, of course, all cards, disks, etc.


I even downloaded a program from the web that had the API. When I
ran it, I got the same result (only the two displays previously
listed).
The sample output, which accompanied the program on the web site,
indicated that individual display and printer devices are retrieved;
just didn't on my system (which, by the way, is at V5R4).


The only thing that I have been able to come up with is that we run
under the 36 environment, but I don't see how that could have an
effect. An object is an object, ain't it?


Any clues gratefully and humbly accepted.


Thanks.





--
This is the RPG programming on the AS400 / 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.