× 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 Peter,
 
Thanks for your response.
 
Mea culpa first - I wrote root as "\" in the mail by mistake. In the
pgm, I'm actually using the forward slash "/".
 
Also, in your mail you write "... it throws an error whenevr I use a
forward slash." Guess you meant backward, because when I actually tried
using the backward slash, the API fails but with a different errno.
 
Anyway, since yesterday, I've come up with an intersting research - the
API returns a -1 (fail) code when it tries to parse the QGPL library.
Errno is 3021 (EINVAL). I've no clue why. Pls can you shed some light ?
 
And you're right abt the overkill thing... but actually I wanted to
write a generic program for the IFS (the program also parses the QDLS
and other other IFS directories) and not specific to just QSYS.LIB.
 
Thanks & regards,
Shantanu.
 
______________
Shantanu Biswas
(469) 220-5843

 
-----Original Message-----
From: "Peter Connell" <Peter.Connell@xxxxxxxxxxxxxxxxxxxx
<mailto:Peter.Connell@xxxxxxxxxxxxxxxxxxxx> >
Sent: Wed, 13 Sep 2006 14:33:34 +1000
To: rpg400-l@xxxxxxxxxxxx <mailto:rpg400-l@xxxxxxxxxxxx> 
Subject: RE: Qp0lProcessSubtree.... sigh
 
Shantanu,
I just tried this and it works fine when the path separator is a forward
slash / but not when it is a back slash \. This is true for either QDLS
or QSYS.LIB or any other IFS directory, it throws an error whenevr I use
a forward slash.
 
Anyway, I figure the subtree API is an overkill if you do not want to
traverse subdirectories since DSOOBJD works faster. 
 
Peter 
 
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Biswas, Shantanu
Sent: Wednesday, 13 September 2006 9:36 a.m.
To: rpg400-l@xxxxxxxxxxxx
Subject: Qp0lProcessSubtree.... sigh
 
Hi,
 
I've written an RPGLE pgm to retrieve the owner and created date
attributes of IFS objects, specifically of type *LIB, *FLR and *DIR.
 
The pgm structure is simple: 
1. the main pgm calls the API Qp0lProcessSubtree - the API parms include
where to begin the parsing (for which I specify root "\") and what types
of objects to look for (I specify *LIB, *FLR and *DIR).
2. the API takes care of the recursion of parsing the IFS tree, and
calls a user exit program for each matching object it comes up with.
3. the user exit pgm (also written by me) calls another API, Qp0lGetAttr
to retrieve the required attributes.
 
Now I was testing this and I'm facing a weird problem at the very first
step. 
 
When I give the starting point as \QDLS and type as *FLR, this program
works fine. But when I give \QSYS.LIB and *LIB, I get error EINVAL
(invalid parameters) on Qp0lProcessSubtree. I checked the manuals and
this API should work for the QSYS.LIB FS. But still, I can't get it to
work. 
 
Please help. 
 
Thanks.
 
______________
Shantanu Biswas
(469) 220-5933
 
--
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.
 
########################################################################
#############
This correspondence is for the named person's use only. It may contain
confidential or legally privileged information, or both. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this correspondence in error, please immediately delete
it from your system and notify the sender. You must not disclose, copy
or rely on any part of this correspondence if you are not the intended
recipient. Any views expressed in this message are those of the
individual sender, except where the sender expressly, and with
authority, states them to be the views of Baycorp Advantage. If you need
assistance, please contact Baycorp Advantage on either :- Australia
133124 or New Zealand +64 9 356 5800


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.