I'm trying to retrieve a list of Objects (no matter what type) from the AS400 based upon a Library name.
I have tried to use WRKOBJ LibName/*all through a command call but the errors recieved back advise I am unable to use the command WRKOBJ in this setting (no other feedback provided).
Current Code:
StringBuffer getObjects = new StringBuffer("wrkobj " + library + "/*all");
CommandCall call = new CommandCall(as400);
if(call.run(getObjects.toString())){
objectsFound = true;
logger.debug("Lib: " + library + " returned objects");
}else{
// Hold error message to display in joption pane
errorMessages = new StringBuffer();
// Show the messages (returned whether or not there was an error.)
messagelist = call.getMessageList();
for (int i = 0; i < messagelist.length; i++){
// Show each message.
logger.debug(messagelist[i].getText());
errorMessages.append(messagelist[i].getText() + "\n");
}
}
I'm still looking for a solution to this so if I find anything I will post it but anyone who has any ideas or can point me in the right direction I'd appreciate it !
Yes, but you need to use the jt400.jar for this (which is what the jtopen tag covers)"
If you just need the names the IFSFile class supports listing file names on QSYS objects.