|
Redge, Why are you trying to do a DSPPFM from a java program, that's an interactive command. On your CRTLIB, the mesaage says you are not authorized, you've checked and your not authorised. No problem? Cheers Colin.W -----Original Message----- From: RCRafols@xxxxxxxxxxxx [mailto:RCRafols@xxxxxxxxxxxx] Sent: 26 March 2004 10:05 To: java400-l@xxxxxxxxxxxx Subject: JTOpen CmdCall question 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. _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l. This e-mail has been sent by a company of Bertram Group Ltd, whose registered office is The Nest, Rosary Road Norwich NR1 1TF. This message, and any attachments, are intended solely for the addressee and may contain privileged or confidential information. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. If you believe that you have received this email in error, please contact the sender immediately. Opinions, conclusions and statements of intent in this e-mail are those of the sender and will not bind a Bertram Group Ltd company unless confirmed in writing by a director independently of this message. Although we have taken steps to ensure that this email and any attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free.
As an Amazon Associate we earn from qualifying purchases.
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.