iSeries Remote Systems
v6.0.1

com.ibm.etools.iseries.core.dstore.miners
Class RSEUtilWrapper

java.lang.Object
  extended bycom.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
      extended bycom.ibm.etools.iseries.core.dstore.miners.RSEUtilWrapper
All Implemented Interfaces:
com.ibm.etools.iseries.comm.interfaces.IISeriesAPIProcessor

public class RSEUtilWrapper
extends com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor

This class provides a Java wrapper for the iSeries RSEUtil service program which contains native code for use by the RSE communications server.


Nested Class Summary
 
Nested classes inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor.HostAPIErrorCodeStructure
 
Field Summary
static String copyright
           
static byte RC_CLIENTCONN_ERR
           
static byte RC_CLIENTCONN_FAILED
           
static byte RC_CLIENTCONN_INVALID_HOSTNAME
           
static byte RC_CLIENTCONN_OK
           
static byte RC_CLIENTCONN_TIMEOUT
           
 
Fields inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
cancel, cancellableSubTasks, cancelQuerier, Copyright, CREATE_FALSE, CREATE_TRUE, dbcsConvert, DEFAULT_OBJECT_FACTORY_BASIC, DEFAULT_OBJECT_FACTORY_BRIEF, DEFAULT_OBJECT_FACTORY_EXHAUSTIVE, DEFAULT_OBJECT_FACTORY_NAMEONLY, errorcodeObj, hostAPILibraries, INFOLEVEL_BASIC, INFOLEVEL_BRIEF, INFOLEVEL_EXHAUSTIVE, INFOLEVEL_NAME, INFOLEVEL_NAMEARRAY, INITIAL_SPACESIZE, LOG_DIR, LOG_FILENAME, logFile, logFileStream, logLineCounter, logStandardOut, NEED_USERSPACE_NO, NEED_USERSPACE_YES, objName, objType, QVDEOBJLinfo, returnObjectFactory, todos, tracePrefix, warnings
 
Constructor Summary
RSEUtilWrapper()
          Constructor for RSEUtilWrapper.
RSEUtilWrapper(com.ibm.as400.access.AS400 system)
          Constructor for providing AS400 Toolbox object
 
Method Summary
 int checkHostCallback(String clientHostname, int port, int timeout)
          Test if a socket connection can be created from the iSeries back to the client
 String getCurrentDirectory()
          Get the user's current working directory.
 int getDebugRouterPortNumber()
           
 String getEnvironmentVariable(String variableName)
          Retrieve the value for the environment variable.
 int getLastReturnCode()
          Returns the last return code from an api call.
 int releaseThreadJob(String qualifiedJobName, String messageQueue, byte[] messageKey)
          ReleaseThreadJob: Release the specified job
 int releaseThreadJob(String qualifiedJobName, String messageQueue, String messageKey)
          Same as releaseThreadJob but takes a String message key for convience and converts it to a byte[] message key.
 ISeriesProgramInformation retrieveProgramInformation(String libraryName, String programName, boolean srvpgm, boolean exportedProcs)
          Retrieve the program information, including its modules and procedure entries for each module.
 ISeriesDebugHoldJobInfo spawnAndHoldThreadedApplication(String destinationName, String programName, String programParameters)
          SpawnAndHoldThreadedApplication: Run the program in a new multi-threaded job which inherits the environment from the calling job.
 ISeriesDebugHoldJobInfo spawnThreadedApplication(String destinationName, String programName, String programParameters)
          SpawnThreadedApplication: Run the program in a new multi-threaded job which inherits the environment from the calling job.
 
Methods inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor
addCancellableSubTask, addWarning, cancel, clearWarnings, closeUserSpace, computeSize, createUserSpaceOnHost, determineInfoLevel, getClientCCSID, getDefaultObjectFactory, getErrorCodeStructure, getHostCCSID, getLibrary, getLogFileStream, getObjectFactory, getObjectName, getObjectType, getSystem, getUserSpace, getUserSpaceAPIName, getUserSpaceIFSName, getUserSpaceLibrary, getUserSpaceName, getWarnings, isCancelled, isTraceOn, logException, logHostMessages, logMessage, logMessage, logMessage, logTodo, openUserSpace, padString, parseBin8Date, parseChar13Date, parseChar7Date, parseChar8Date, readUserSpace, readUserSpace, registerCancelQuerier, removeCancellableSubTask, setClientCCSID, setHostCCSID, setLibrary, setLogFileDirectory, setObjectFactory, setObjectName, setObjectType, setSystem, setTracing, setUserSpaceLibrary, setUserSpaceName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

RC_CLIENTCONN_OK

public static final byte RC_CLIENTCONN_OK
See Also:
Constant Field Values

RC_CLIENTCONN_FAILED

public static final byte RC_CLIENTCONN_FAILED
See Also:
Constant Field Values

RC_CLIENTCONN_TIMEOUT

public static final byte RC_CLIENTCONN_TIMEOUT
See Also:
Constant Field Values

RC_CLIENTCONN_INVALID_HOSTNAME

public static final byte RC_CLIENTCONN_INVALID_HOSTNAME
See Also:
Constant Field Values

RC_CLIENTCONN_ERR

public static final byte RC_CLIENTCONN_ERR
See Also:
Constant Field Values
Constructor Detail

RSEUtilWrapper

public RSEUtilWrapper()
Constructor for RSEUtilWrapper.


RSEUtilWrapper

public RSEUtilWrapper(com.ibm.as400.access.AS400 system)
Constructor for providing AS400 Toolbox object

Method Detail

spawnAndHoldThreadedApplication

public ISeriesDebugHoldJobInfo spawnAndHoldThreadedApplication(String destinationName,
                                                               String programName,
                                                               String programParameters)
                                                        throws Exception
SpawnAndHoldThreadedApplication: Run the program in a new multi-threaded job which inherits the environment from the calling job. The new job is set to hold until it is released by a corresponding call to ReleaseThreadJob. *

Throws:
Exception

getDebugRouterPortNumber

public int getDebugRouterPortNumber()
                             throws Exception
Throws:
Exception

spawnThreadedApplication

public ISeriesDebugHoldJobInfo spawnThreadedApplication(String destinationName,
                                                        String programName,
                                                        String programParameters)
                                                 throws Exception
SpawnThreadedApplication: Run the program in a new multi-threaded job which inherits the environment from the calling job. The new job is set to hold until it is released by a corresponding call to ReleaseThreadJob. *

Throws:
Exception

releaseThreadJob

public int releaseThreadJob(String qualifiedJobName,
                            String messageQueue,
                            byte[] messageKey)
                     throws Exception
ReleaseThreadJob: Release the specified job

Parameters:
qualifiedJobName - The qualified job name of the job to be released
messageQueue - The message queue on which this job is waiting for a response to an *INQ message
messageKey - The message key of the *INQ message.
Throws:
Exception

releaseThreadJob

public int releaseThreadJob(String qualifiedJobName,
                            String messageQueue,
                            String messageKey)
                     throws Exception
Same as releaseThreadJob but takes a String message key for convience and converts it to a byte[] message key.

Throws:
Exception

getLastReturnCode

public int getLastReturnCode()
Returns the last return code from an api call.


getEnvironmentVariable

public String getEnvironmentVariable(String variableName)
                              throws Exception
Retrieve the value for the environment variable. QRSEUTILS.retrieveEnvironmentVariable parm1: char *envvar // environment variable name [input] parm2: char *value // return value [output] parm3: int length // length of return value [input]

Returns:
The value for the environment variable or null if no environment variable with the specified name exists.
Throws:
Exception

getCurrentDirectory

public String getCurrentDirectory()
                           throws Exception
Get the user's current working directory. Note: It appears that the host servers do not pick up the same default current directory as you get when you sign on directly to a 5250 screen. If you sign on via 5250 you typically get the default /home/userid, but via the host servers you get the default / However the user can run the CHGCURDIR to set the current directory which will then be returned by this function call. QRSEUTILS.retrieveCurrentDirecotry parm 1: char* current working dir [output] parm 2: int length of buffer [input] returns -1 if an error occured, otherwise the length of the current working directory

Returns:
The user's current working directory.
Throws:
Exception

retrieveProgramInformation

public ISeriesProgramInformation retrieveProgramInformation(String libraryName,
                                                            String programName,
                                                            boolean srvpgm,
                                                            boolean exportedProcs)
                                                     throws Exception
Retrieve the program information, including its modules and procedure entries for each module. This is the entry point for the caller to get the program information.

Returns:
true if the program information was successfully retrieved, false otherwise
Throws:
Exception
Since:
WDSc V5.1

checkHostCallback

public int checkHostCallback(String clientHostname,
                             int port,
                             int timeout)
                      throws Exception
Test if a socket connection can be created from the iSeries back to the client

Parameters:
port - TCP/IP port to connect back to
timeout -
Throws:
Exception
Since:
RWDi 6.0

iSeries Remote Systems
v6.0.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.