|
Hi All,
Our company is exploring using JTOpen to connect to our iSeries. I'm studying
JTOpen and I created CmdCall.java. I got the following error when I ran the
program:
Not authorized to command CRTLIB in library *LIBL.
Errors occurred in command.
I changed the code to do a DSPPFM command instead, and I got the following
error:
Command DSPPFM not allowed in this setting.
Errors occurred in command.
For CRTLIB, I tried the user id and it doesn't have the authority to do the
CRTLIB command. But, the user id does have authority to do a DSPPFM command.
What could be the reason for this? If not CRTLIB or DSPPFM, what other command
can I use?
Code as follows:
//////////////////////////////////////////////////////////////////////////////////
//
// Example using the IBM Toolbox for Java's access class, CommandCall.
//
// This source is an example of IBM Toolbox for Java "Job List".
//
//////////////////////////////////////////////////////////////////////////////////
//
// The access classes of the Toolbox are in the com.ibm.as400.access.package.
// Import this package to use the Toolbox classes.
//
//////////////////////////////////////////////////////////////////////////////////
import com.ibm.as400.access.*;
public class CmdCall
{
public static void main(String[] args)
{
// Like other Java classes the Toolbox classes throw
// exceptions when something goes wrong. These must be
// caught by programs that use the Toolbox.
try
{
AS400 system = new AS400("systemname", "userid", "password");
CommandCall cc = new CommandCall(system);
cc.run("CRTLIB MYLIB");
//cc.run("dsppfm dircd");
AS400Message[] ml = cc.getMessageList();
for (int i=0; i<ml.length; i++)
{
System.out.println(ml[i].getText());
}
}
catch (Exception e)
{
e.printStackTrace();
}
System.exit(0);
}
}
thanks,
________________________
Redge C. Rafols
Smart Communications, Inc.
IT - Customer Care Systems
Office Tel. No. 511-6252
~+~+~+~+~+~+~+~+~+~+~
If you give someone a program,
you will frustrate them for a day;
if you teach them how to program,
you will frustrate them for a lifetime.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.