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



I was a little disappointed just now to discover that JTOpen's
com.ibm.as400.resource.Resource package has been deprecated.

I want to be able to list (in a generic manner) the attributes and values of
any resource, and in particular that of User Profiles. The following
deprecated technique nicely does the job and is (ironically for a deprecated
technique) upwardly compatible with future i5/OS releases because it's all
generic!

...
system = new AS400(system_name);
boolean error = true;
RUser resource = new RUser(system, user_name);

try {

// Get the attribute meta data.
ResourceMetaData[] attributeMetaData =
resource.getAttributeMetaData();

// Loop through all attributes and print the values.
for(int i = 0; i < attributeMetaData.length; ++i)
{
Object attributeID = attributeMetaData[i].getID();
Object value = resource.getAttributeValue(attributeID);
System.out.println("Attribute " + attributeID + " = " +
value);
}

} catch (ResourceException e) {

e.printStackTrace();
}

....

Unless I'm missing something, it seems to me that the suggested alternative
of (for user information)com.ibm.as400.access.UserList and
com.ibm.as400.access.User is less flexible because com.ibm.as400.access.User
requires the programmer to have knowledge of the property getters (one has
to program 'getDescroption()', 'getDirectoryEntry()', etc.)

Any thoughts anyone/someone who has been through this path already? Maybe
there is some alternative that I'm not aware of?

Thanks in advance

Chris Jewell
mailto:jewellcj@xxxxxxxxxxxx



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.