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



To determine which commands you may use, use the DSPCMD command on the 
command and see if the command can be executed in batch (*BATCH) then 
you're OK as long as you're authorised.

Examples:
DSPCMD CMD(DSPPFM)
  May be executed: *IREXX *IPGM *EXEC *INTERACT
DSPCMD CMD(CRTLIB)
  May be executed: *IBND *BBND *IREXX *BREXX *BPGM *IPGM *EXEC *INTERACT 
*BATCH

Rune Kaus





NGay@xxxxxxxxxxxxx
Sent by: java400-l-bounces@xxxxxxxxxxxx
26.03.2004 09:06
Please respond to Java Programming on and around the iSeries / AS400
 
        To:     Java Programming on and around the iSeries / AS400 
<java400-l@xxxxxxxxxx   om>
        cc: 
        Subject:        Re: JTOpen CmdCall question



Redge,

Its perfectly correct, 'DSP' commands require a screen to output onto.
Java cannot use the screen in this fashion, and so neither can iSeries
commands called from Java.  Its just like trying to do a MONMSG on the
command line, you get the same 'not allowed in this setting' error.

Any commands which do not output to the display should work fine, if you
have the correct authority.

Nigel Gay.



|---------+------------------------------>
|         |           <RCRafols@xxxxxxxxx|
|         |           .ph>               |
|         |           Sent by:           |
|         |           java400-l-bounces@m|
|         |           idrange.com        |
|         |                              |
|         |                              |
|         |           26/03/2004 06:34   |
|         |           Please respond to  |
|         |           Java Programming on|
|         |           and around the     |
|         |           iSeries / AS400    |
|         |                              |
|---------+------------------------------>
 
>--------------------------------------------------------------------------------------------------------------|
  |                                       |
  |       To:       <java400-l@xxxxxxxxxxxx>          |
  |       cc:                                       |
  |       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.








********************************************************************************
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee; access to this
email by anyone else is unauthorised.

If you are not the intended recipient: (1) you are kindly requested
to return a copy of this message to the sender indicating that you
have received it in error, and to destroy the received copy; and (2)
any disclosure or distribution of this message, as well as any action
taken or omitted to be taken in reliance on its content, is prohibited
and may be unlawful.
********************************************************************************

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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.