iSeries Remote Systems
v6.0.1

com.ibm.etools.iseries.core
Class ISeriesNfsCommandHandler

java.lang.Object
  extended bycom.ibm.etools.iseries.core.ISeriesNfsCommandHandler
All Implemented Interfaces:
IISeriesDataElementDescriptorTypes, ISeriesDataStoreConstants

public class ISeriesNfsCommandHandler
extends Object
implements ISeriesDataStoreConstants, IISeriesDataElementDescriptorTypes

Helper class for running remote commands and refreshing the tree or table views if required.


Field Summary
static int CMD_CANCELED
           
static String Copyright
           
 
Fields inherited from interface com.ibm.etools.iseries.core.dstore.common.ISeriesDataStoreConstants
ABSTRACT_FILTER_DESCRIPTOR, ABSTRACT_NATIVE_FSO_DESCRIPTOR, API_ERROR, API_ERROR_DESCRIPTOR, API_OK, API_PTF_MISSING, API_RESULT_DESCRIPTOR, API_RETURN_CODE, AUTHORITY_LIST_NODE, AUTHORITY_NODE, BATCHCOMMAND_DESCRIPTOR, C_GET_EDIT_CCSID, C_LDA_READ, C_LDA_WRITE, C_USER_PREFERENCES_DIRECTORY, CCSID_DESCRIPTOR, CDRA_INFO, CHECK_AUTHORITY_COMMAND, CLEAR_LOCAL_CACHE, CMD_DEBUG_RELEASE_APPLICATION, CMD_DEBUG_SPAWN_AND_HOLD, CMD_GET_DEBUG_ROUTER_PORT, CMD_IJOB_ASSOCIATE, CMD_IJOB_RELEASE, CMD_IJOB_RUNPGM, CMD_MULTI_SPAWNFAIL, CMD_MULTI_SPAWNSUCC, CMD_RUNBATCHCOMMAND, CMD_RUNBATCHCOMMAND_NOHELP, CMD_RUNCOMMAND, CMD_RUNCOMMAND_MULTITHREADED, CMD_RUNCOMMAND_MULTITHREADED_NOHELP, CMD_RUNCOMMAND_NOHELP, COMM_SERVER_INFORMATION, COMMAND_DESCRIPTOR, COMMAND_FILTER_DESCRIPTOR, COMMAND_MINER, COMMAND_MINER_ROOT_ELEMENT, COMMAND_QUERY_DB_FIELDS, COMMAND_QUERY_DB_KEYS, COMMAND_QUERY_DSPF_ALL, COMMAND_QUERY_MODULE_LIST, COMMAND_QUERY_PROCEDURE_LIST, copyright, CREATE_EDIT_MASK, CURRENT_WORKING_DIR, CURRENT_WORKING_DIR_DESCRIPTOR, DBFIELD_ALIAS, DBFIELD_ALLOC_LENGTH, DBFIELD_ALWNUL, DBFIELD_CCSID_SPECIFIED, DBFIELD_COLHEAD1, DBFIELD_COLHEAD2, DBFIELD_COLHEAD3, DBFIELD_DATA_CCSID, DBFIELD_DATTIMFMT, DBFIELD_DATTIMSEP, DBFIELD_DBCS_ALTTYPE, DBFIELD_DBCS_COLHEAD, DBFIELD_DBCS_TEXTDESC, DBFIELD_DBCS_VALCHECK, DBFIELD_DECPOS, DBFIELD_DESCRIPTION, DBFIELD_DIGITS, DBFIELD_DISPLAY_LEN_FLAG, DBFIELD_DISPLAY_LENGTH, DBFIELD_DTFLAGS, DBFIELD_EDITCODE, DBFIELD_EDITCODE_SYMBOL, DBFIELD_EDITWORD, DBFIELD_ENCODING_SCHEME, DBFIELD_GENERIC_KEY_COUNT, DBFIELD_INBUF, DBFIELD_INTNAME, DBFIELD_KEYFIELD_ATTRS, DBFIELD_LENGTH, DBFIELD_MAXKEYLEN, DBFIELD_MIN_DISPLAY_LEN_FLAG, DBFIELD_NUMDBCS, DBFIELD_OPERATOR, DBFIELD_OUTBUF, DBFIELD_REF_FIELD, DBFIELD_REFSHIFT, DBFIELD_SST_END, DBFIELD_SST_START, DBFIELD_TYPE, DBFIELD_UCS2_CONVERT_FLAG, DBFIELD_USAGE, DBFIELD_VARLENGTH, DEBUG_HELD_JOB_DESCRIPTOR, DOWNLOAD_RESULT_AS400_SECURITY_EXCEPTION, DSPFFD_INBUF, DSPFFD_OUTBUF, EDCODE_CURSYM, EDCODE_DATESEP, EDCODE_DECSEP, EDCODE_JOBDESC, EDCODE_JOBDESCLIB, EDCODE_SYSDATE, EDCODE_TIMESEP, EDCODE_USERID, EDIT_CODE_DESCRIPTOR, EDIT_CODE_INFORMATION, EDIT_CODE_QUERY, EDIT_DESCRIPTION, EDIT_MASK_DESCRIPTOR, EDIT_MASK_INFO, EDTD_DECCHAR, EDTD_FILLCHAR, EDTD_FLOATSTR, EDTD_FRACTION_MASK, EDTD_INTMASK, EDTD_LEFTCHAR, EDTD_NEGCHAR, EDTD_POSCHAR, EDTD_RIGHTCHAR, EDTD_ZEROVAL, EDTM_RECLEN, ENVVAR_DESCRIPTOR, ENVVAR_INFO, ERROR_DESCRIPTOR, EVENTSFILE_DESCRIPTOR, FIELD_DESCRIPTOR, FIELD_LIST_NODE, FIELD_PROPERTIES_NODE, FILE_ACCPATHTYPE, FILE_ALTSEQ, FILE_BASEDONCOUNT, FILE_BASEDONFILES, FILE_DESCRIPTOR, FILE_DYNSEL, FILE_IGCFIELD, FILE_IGCLITERAL, FILE_JFILE, FILE_KEYACCESS, FILE_LANGID, FILE_OVERRIDE_INFO, FILE_OVERRIDE_SOURCE_DESCRIPTOR, FILE_OVERRIDE_TARGET_DESCRIPTOR, FILE_PROPERTIES_NODE, FILE_SELECTOMITLF, FILE_SRCFILE, IFS_FILE_FILTER_OBJECT, IFS_FILESYSTEM_MINER, IFS_FILTER_DESCRIPTOR, IFS_FOLDER_FILTER_OBJECT, IJOB_DATAQ_DESCRIPTOR, ISERIES_PROGRAM_DESCRIPTOR, JOB_DESCRIPTOR, JOB_FILTER_DESCRIPTOR, JOB_MINER, JOB_MINER_LOG_ELEMENT, JOB_MINER_ROOT_ELEMENT, JOB_PROPERTY_DESCRIPTOR, JOB_PROPERTY1_ELEMENT, JOB_PROPERTY2_ELEMENT, JOB_PROPERTY3_ELEMENT, JOB_PROPERTYINT_ELEMENT, JOBCMD_CHGJOB, JOBCMD_DSPJOBLOG, JOBCMD_ENDJOB, JOBCMD_ENDJOB_IMMED, JOBCMD_HOLDJOB, JOBCMD_QRYJOB_ALL_PROPERTIES, JOBCMD_QRYJOB_PROPERTY, JOBCMD_QRYJOB_PROPERTYP2, JOBCMD_QRYJOB_PROPERTYP3, JOBCMD_QRYJOB_PROPERTYPINT, JOBCMD_RELEASEJOB, JOBFILTERCMD_QUERY, JOBNAME_DESCRIPTOR, JOBPROP_ACCTCODE, JOBPROP_ACTIVESTATUS, JOBPROP_AUXIO, JOBPROP_BREAKMSGHDL, JOBPROP_CCSID, JOBPROP_CNTRYID, JOBPROP_CTLDENDREQ, JOBPROP_CURRSYSPOOL, JOBPROP_CURRUSER, JOBPROP_DATE_ENTERED, JOBPROP_DATE_STARTED, JOBPROP_DATEFMT, JOBPROP_DATESEP, JOBPROP_DBCSCAP, JOBPROP_DECFMT, JOBPROP_DESCRIPTION, JOBPROP_DEVRCYACT, JOBPROP_DFTCCSID, JOBPROP_ENDSEV, JOBPROP_INQMSGRPLY, JOBPROP_ITRANS, JOBPROP_KEEPDDMACT, JOBPROP_LANGID, JOBPROP_LOGCLP, JOBPROP_LOGLVL, JOBPROP_LOGSEV, JOBPROP_LOGTXT, JOBPROP_MAXCPU, JOBPROP_MAXTMPSTOR, JOBPROP_MSGQACT, JOBPROP_MSGQMAX, JOBPROP_OUTQ, JOBPROP_OUTQ_PTY, JOBPROP_PGMRC, JOBPROP_PRODRC, JOBPROP_PRTDEV, JOBPROP_PRTKEYFMT, JOBPROP_PRTTXT, JOBPROP_PURGE, JOBPROP_ROUTING, JOBPROP_RUNPTY, JOBPROP_SORTTAB, JOBPROP_SPECENV, JOBPROP_STATUSMSGHDL, JOBPROP_SUBMITNAME, JOBPROP_SUBMITNUMBER, JOBPROP_SUBMITUSER, JOBPROP_SUBSYSTEM, JOBPROP_SUBTYPE, JOBPROP_SWITCHES, JOBPROP_SYSPOOL, JOBPROP_THREADS, JOBPROP_TIMESEP, JOBPROP_TIMESLICE, JOBPROP_TIMESLICEPOOL, JOBPROP_TOTRESPTIME, JOBPROP_TYPE, JOBPROP_USEDCPU, JOBPROP_USEDTMPSTOR, JOBPROP_USERRC, JOBPROP_WAITTIME, KEYFIELD_LIST_NODE, KEYWORD_DESCRIPTOR, LDA_READ_EXCEPTION_DESCRIPTOR, LDA_READ_LIBRARY_NAME_DESCRIPTOR, LDA_READ_MEMBER_NAME_DESCRIPTOR, LDA_READ_NO_OUTPUT_DESCRIPTOR, LDA_WRITE_CCSID_DESCRIPTOR, LDA_WRITE_EXCEPTION_DESCRIPTOR, LDA_WRITE_LENGTH_DESCRIPTOR, LIB_FILTER_DESCRIPTOR, LIB_FILTER_STR_DESCRIPTOR, LIBRARY_DESCRIPTOR, LIBRARY_PROPERTIES_NODE, LIST_OBJ_LOCKS_COMMAND, MBR_FILTER_DESCRIPTOR, MBR_FILTER_STR_DESCRIPTOR, MEMBER_CHANGE_TIMESTAMP, MEMBER_CREATION_TIMESTAMP, MEMBER_DESCRIPTOR, MEMBER_NUMBER_OF_DELETED, MEMBER_NUMBER_OF_RECORDS, MEMBER_PROPERTIES_NODE, MEMBER_RESTOTE_TIMESTAMP, MEMBER_SAVE_TIMESTAMP, MESSAGE_DESCRIPTOR, MESSAGE_FILE_DESCRIPTOR, MESSAGED_DESCRIPTOR, MINER_VERSION, MODULE_DESCRIPTOR, MODULE_INTERNAL_DESCRIPTOR, MODULE_LANGID, MODULE_LIST_NODE, MODULE_PROPERTIES_NODE, MSGD_STRUCTURE_NODE, NATIVE_FILESYSTEM_MINER, NETINT_DESCRIPTOR, NETINT_LIST_NODE, NETINT_QUERY, NETWORK_ERROR_DESCRIPTOR, OBJ_FILTER_DESCRIPTOR, OBJ_FILTER_STR_DESCRIPTOR, OBJECT_DESCRIPTOR, OBJECT_PROPERTIES_NODE, PGM_DEBUGGABLE, PGM_OPM, PROCEDURE_DESCRIPTOR, PROCEDURE_LIST_NODE, PROGRAM_DESCRIPTOR, PROPERTY_DESCRIPTOR, QSYS_DESCRIPTOR, QUERY_CURRENT_WORKING_DIR, QUERY_DEVICE_RECORDS, QUERY_ENCODING_SCHEME, QUERY_ENV_VAR, QUERY_FIELD_LIST, QUERY_FILE_PROPERTIES, QUERY_MEMBER_PROPERTIES, QUERY_MESSAGE_DESCRIPTORS_COMMAND, QUERY_RECORD_LIST, QUERY_RECORD_PROPERTIES, RECORD_BUFFER_SIZE, RECORD_CCSID, RECORD_DESC, RECORD_DESCRIPTOR, RECORD_DEVICE_PROPERTIES, RECORD_FLDCNT, RECORD_HAS_SEP_IND_AREA, RECORD_HAS_START_LINE_NUM, RECORD_ISDBCS, RECORD_LEVELID, RECORD_LIST_NODE, RECORD_LOWEST_RESP_IND, RECORD_PROPERTIES_NODE, RECORD_RECLEN, RECORD_STANDARD_PROPERTIES, RECORD_TYPE, RELATIVE_FILTER_DESCRIPTOR, RESULT_MESSAGES_ELEMENT, RETRIEVE_FILE_OVERRIDE_COMMAND, SERVICE_PROGRAM_DESCRIPTOR, SORT_SEQ_TABLE, SORT_SEQ_TABLE_INFO, SPECIAL_FILTER_DESCRIPTOR, SQL_COLERROR, SQL_COLFIRSTBYTE, SQL_COLLASTBYTE, SQL_DESCRIPTOR, SQL_MSGFILE, SQL_MSGID, SQL_MSGLIB, SQL_MSGREPLACELEN, SQL_MSGREPLACETEXT, SQL_NUMSTMT, SQL_RECERORR, SQL_RECFIRSTBYTE, SQL_RECLASTBYTE, SQL_RETINFOLEN, SQL_STATE, SQL_SYNTAX_CHECK, SQL_SYNTAX_CHECK_INFO, SST_BYTESAVAIL, SST_BYTESRETURN, SST_COUNTRYID, SST_JOBCCSID, SST_LANGID, SST_QUERY, SST_SSTLIB, SST_SSTNAME, SST_SUBSITUTION, SST_TABLE, SST_TABLECCSID, SST_TABLELIB, SST_TABLENAME, SST_WEIGHT, STRUCTURE_NODE_DESCRIPTOR, SYSTEM_INFORMATION, SYSTEM_PROPERTY_DESCRIPTOR, SYSTEM_QIGC, SYSTEM_VRM, TABLE_DESCRIPTOR
 
Fields inherited from interface com.ibm.etools.iseries.core.descriptors.IISeriesDataElementDescriptorTypes
DSPF_FILE_TYPE, DTA_FILE_TYPE, FILE_TYPE, LF_FILE_TYPE, LIB_TYPE, MBR_TYPE, MESSAGE_DESCRIPTION_TYPE, MODULE_TYPE, MSG_FILE_TYPE, OBJ_TYPE, PGM_MODULE_TYPE, PGM_TYPE, PROCEDURE_TYPE, QRYDFN_TYPE, SAVF_FILE_TYPE, SRC_FILE_TYPE, SRC_MBR_TYPE, SRVPGM_TYPE, UNKNOWN_TYPE
 
Constructor Summary
ISeriesNfsCommandHandler(Shell shell)
          Constructor.
ISeriesNfsCommandHandler(Shell shell, boolean bUpdateTreeView)
          Constructor that explicitly specifying whether to update the tree view.
ISeriesNfsCommandHandler(Shell shell, boolean bUpdateTreeView, boolean bUpdateTableView)
          Constructor that explicitly specifying whether to update the tree view and table view.
ISeriesNfsCommandHandler(Shell shell, CmdSubSystem cmdSubsystem)
          Constructor when you set the command subsystem to use for running remote commands.
 
Method Summary
 int changeDescription(com.ibm.etools.systems.dstore.core.model.DataElement deElement, String sNewDescription)
          Change description of an object on a remote iseries.
 int changeLibraryList(String cmd, String newLib, com.ibm.etools.systems.core.ui.view.ISystemTree tree, com.ibm.etools.systems.filters.SystemFilterReference selectedFilter)
          Make a change to the library list: add, change curlib, remove a library, etc Unlike other methods in here, you supply the ADDLIBLE command string.
 int changeMessageDescription(ISeriesMessageDescription msgd)
          Change an existing message description.
 int changeObject(com.ibm.etools.systems.dstore.core.model.DataElement deElement, boolean processCmdLineParm)
          Prompt the user for the appropriate Change XXX command on the iseries, based on the type of the given iseries object.
 int changeType(com.ibm.etools.systems.dstore.core.model.DataElement deElement, String sNewType)
          Change type of a library or member on a remote iseries.
 int copyFile(com.ibm.etools.systems.dstore.core.model.DataElement deElement, boolean processCmdLineParm)
          Run Copy file.
 int copyLib(String sSourceLib, String sTargetLib, boolean processCmdLineParm)
          Copy a library on the iSeries.
 int copyMbr(String sSourceLib, String sSourceFile, String sSourceMbr, String sTargetLib, String sTargetFile, String sTargetName, boolean isSourceFile, boolean processCmdLineParm, boolean withPrompt)
          Copy a data or source file member on the iSeries.
 int copyObj(String sSourceLib, String sSourceName, String sSourceType, String sTargetLib, String sTargetName, boolean processCmdLineParm, IProgressMonitor monitor)
          Copy an object on the iSeries.
 int createMessageDescription(com.ibm.etools.systems.dstore.core.model.DataElement parent, String library, String msgFileName)
          Create a new message file in the specified library with the specified name.
 int crtRemoteObject(Object parentObject, String parentObjectName, com.ibm.etools.systems.core.ui.view.ISystemTree tree, String newObjectName, String sCmdString)
          Create a remote object, such as a library, file or member.
 int delete(com.ibm.etools.systems.dstore.core.model.DataElement deElement, boolean processCmdLineParm)
          Physically delete the iSeries object represented by the given data element.
static String getMemberType(String sFileName)
          Attempt to intelligently default a member type based on the name of the file.
 int getNumberOfReturnMessages()
          Return the number of messages issued by last remote command
 ISeriesMessage[] getReturnMessages()
          Return all the messages issued by the last remote command
 ISeriesMessage getReturnMsg()
          Get the first last message issued by running a remote command
 int mergeSource(com.ibm.etools.systems.dstore.core.model.DataElement deElement, boolean processCmdLineParm)
          Run Mrgsrc.
 int moveMbr(String sSourceLib, String sSourceFile, String sSourceMbr, String sTargetLib, String sTargetFile, String sTargetName, boolean isSourceFile, boolean processCmdLineParm)
          Move a member from one file to another on the iSeries.
 int moveObj(String sSourceLib, String sSourceName, String sSourceType, String sTargetLib, String sTargetName, boolean processCmdLineParm, IProgressMonitor monitor)
          Move an object from one library to another on the iSeries.
 int rename(com.ibm.etools.systems.dstore.core.model.DataElement deElement, String sNewName, boolean processCmdLineParm)
          Rename a remote object on the iseries.
 int reorderLibraryList(String[] cmds, String movedLib, com.ibm.etools.systems.core.ui.view.ISystemTree tree, com.ibm.etools.systems.filters.SystemFilterReference parentFilter)
          Make a change to reorder the library list: move a library up or down or to a new position All these actions require multiple commands to achieve
 int restore(com.ibm.etools.systems.dstore.core.model.DataElement deElement, boolean processCmdLineParm)
          Run Restore.
 int restoreLib(com.ibm.etools.systems.dstore.core.model.DataElement deElement, boolean processCmdLineParm)
          Run RSTLIB command for SAVF
 int restoreObj(com.ibm.etools.systems.dstore.core.model.DataElement deElement, boolean processCmdLineParm)
          Run RSTOBJ command for SAVF
 int runCommand(String sCmdString, com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Run a command using the subsystem from the dataElement
 int save(com.ibm.etools.systems.dstore.core.model.DataElement deElement, boolean processCmdLineParm)
          Run Save.
 void setCommandSubSystem(CmdSubSystem cmdSubSystem)
          Set the command subsystem in which to run commands.
 
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

CMD_CANCELED

public static final int CMD_CANCELED
See Also:
Constant Field Values
Constructor Detail

ISeriesNfsCommandHandler

public ISeriesNfsCommandHandler(Shell shell)
Constructor. Defaults to false for both updating tree view and table view.


ISeriesNfsCommandHandler

public ISeriesNfsCommandHandler(Shell shell,
                                CmdSubSystem cmdSubsystem)
Constructor when you set the command subsystem to use for running remote commands. This is necessary when using methods that don't take data elements. Defaults to false for both updating tree view and table view.


ISeriesNfsCommandHandler

public ISeriesNfsCommandHandler(Shell shell,
                                boolean bUpdateTreeView)
Constructor that explicitly specifying whether to update the tree view. Defaults to false for updating the table view.


ISeriesNfsCommandHandler

public ISeriesNfsCommandHandler(Shell shell,
                                boolean bUpdateTreeView,
                                boolean bUpdateTableView)
Constructor that explicitly specifying whether to update the tree view and table view.

Method Detail

setCommandSubSystem

public void setCommandSubSystem(CmdSubSystem cmdSubSystem)
Set the command subsystem in which to run commands. This need only be called if using methods which do not take a data element as a parameter, since the command subsystem can be deduced from a data element.


changeLibraryList

public int changeLibraryList(String cmd,
                             String newLib,
                             com.ibm.etools.systems.core.ui.view.ISystemTree tree,
                             com.ibm.etools.systems.filters.SystemFilterReference selectedFilter)
Make a change to the library list: add, change curlib, remove a library, etc Unlike other methods in here, you supply the ADDLIBLE command string.

Parameters:
cmd - The ADDLIBLE, RMVLIBLE or CHGCURLIB command to run
newLib - The name of the library being added (so we can select it)
tree - The RSE view from which this was run. Optional
selectedFilter - The selected libl filter this was run from. Optional.
Returns:
integer representing severity of first iSeries error message

reorderLibraryList

public int reorderLibraryList(String[] cmds,
                              String movedLib,
                              com.ibm.etools.systems.core.ui.view.ISystemTree tree,
                              com.ibm.etools.systems.filters.SystemFilterReference parentFilter)
Make a change to reorder the library list: move a library up or down or to a new position All these actions require multiple commands to achieve

Parameters:
cmds - The RMVLIBLE and ADDLIBLE commands to run
tree - The RSE view from which this was run. Optional
parentFilter - The parent libl filter this was run from children of. Optional.
Returns:
integer representing severity of first iSeries error message

copyMbr

public int copyMbr(String sSourceLib,
                   String sSourceFile,
                   String sSourceMbr,
                   String sTargetLib,
                   String sTargetFile,
                   String sTargetName,
                   boolean isSourceFile,
                   boolean processCmdLineParm,
                   boolean withPrompt)
Copy a data or source file member on the iSeries. Results in CPYF or CPYSRCF command being remotely issued.

Parameters:
sSourceLib - - name of library containing member to be copied.
sSourceFile - - name of file containing member to be copied.
sSourceMbr - - name of member to be copied.
sTargetLib - - name of library to copy member into.
sTargetFile - - name to file to copy member into.
sTargetName - - new name to assign to the new copy of the member.
isSourceFile - - true if the member is a source member, false if it is a data member.
processCmdLineParm - - true if the command line input should be treated as parameters.
withPrompt - - Prompt the command first. If true, caller should check for cancel return.
Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, -99 if prompt is canceled or 0 if all went well. and otherwise the severity of the first error message,

copyObj

public int copyObj(String sSourceLib,
                   String sSourceName,
                   String sSourceType,
                   String sTargetLib,
                   String sTargetName,
                   boolean processCmdLineParm,
                   IProgressMonitor monitor)
Copy an object on the iSeries. Results in CRTDUPOBJ command being remotely issued.

Parameters:
sSourceLib - - name of library containing object to be copied.
sSourceName - - name of object to be copied.
sSourceType - - type of object to be copied.
sTargetLib - - name of library to copy object into.
sTargetName - - new name to assign to the new copy of the object.
Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

copyLib

public int copyLib(String sSourceLib,
                   String sTargetLib,
                   boolean processCmdLineParm)
Copy a library on the iSeries. Results in CPYLIB command being remotely issued.

Parameters:
sSourceLib - - name of library to be copied.
sTargetLib - - new name for the new library copy.
Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

moveMbr

public int moveMbr(String sSourceLib,
                   String sSourceFile,
                   String sSourceMbr,
                   String sTargetLib,
                   String sTargetFile,
                   String sTargetName,
                   boolean isSourceFile,
                   boolean processCmdLineParm)
Move a member from one file to another on the iSeries. Does this by a calling copyMbr, then issuing a RMVM remote command.

Parameters:
sSourceLib - - name of library containing member to be moved.
sSourceFile - - name of file containing member to be moved.
sSourceMbr - - name of member to be moved.
sTargetLib - - name of library to move member into.
sTargetFile - - name to file to move member into.
sTargetName - - new name to assign to the moved member.
isSourceFile - - true if the member is a source member, false if it is a data member.
Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

moveObj

public int moveObj(String sSourceLib,
                   String sSourceName,
                   String sSourceType,
                   String sTargetLib,
                   String sTargetName,
                   boolean processCmdLineParm,
                   IProgressMonitor monitor)
Move an object from one library to another on the iSeries. Results in MOVOBJ command being remotely issued.

Parameters:
sSourceLib - - name of library containing object to be moved.
sSourceName - - name of object to be moved.
sSourceType - - type of object to be moved.
sTargetLib - - name of library to move object into.
sTargetName - - new name to assign to the moved object.
Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

crtRemoteObject

public int crtRemoteObject(Object parentObject,
                           String parentObjectName,
                           com.ibm.etools.systems.core.ui.view.ISystemTree tree,
                           String newObjectName,
                           String sCmdString)
Create a remote object, such as a library, file or member. There is no prompting, as this assumes user has been prompted for information via a wizard. Assumes setCommandSubSystem has been called.

Parameters:
parentObject - The actual object selected when this request happened
parentObjectName - The fully qualified name of the parent container for this new object. Is used to refresh all occurrences of that parent.
tree - The RSE view from which this was run. Optional
Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

delete

public int delete(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                  boolean processCmdLineParm)
Physically delete the iSeries object represented by the given data element. This will decide the correct iSeries command to run, and will run the command via the command subsystem as deduced from the given data element. Depending in the boolean values used to instantiate this object, it will optionally refresh the Remote Systems tree views, and the iSeries table views.

Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

rename

public int rename(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                  String sNewName,
                  boolean processCmdLineParm)
Rename a remote object on the iseries.

Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

changeDescription

public int changeDescription(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                             String sNewDescription)
Change description of an object on a remote iseries.

Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

changeType

public int changeType(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                      String sNewType)
Change type of a library or member on a remote iseries.

Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

changeObject

public int changeObject(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                        boolean processCmdLineParm)
Prompt the user for the appropriate Change XXX command on the iseries, based on the type of the given iseries object.

Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

changeMessageDescription

public int changeMessageDescription(ISeriesMessageDescription msgd)
Change an existing message description. If the change is successful then the parent message file in the tree (or table view) is refreshed.

Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

createMessageDescription

public int createMessageDescription(com.ibm.etools.systems.dstore.core.model.DataElement parent,
                                    String library,
                                    String msgFileName)
Create a new message file in the specified library with the specified name. If the change is successful then the parent message file in the tree (or table view) is refreshed.

Returns:
-1 if user prompted to signon, and they cancel that signon, -2 if an exception occurred, -3 if subsystem null, and otherwise the severity of the first error message, or 0 if all went well.

getReturnMessages

public ISeriesMessage[] getReturnMessages()
Return all the messages issued by the last remote command


getReturnMsg

public ISeriesMessage getReturnMsg()
Get the first last message issued by running a remote command

Returns:
an ISeriesMessage, which can then be displayed by calling displayMessage on it

getNumberOfReturnMessages

public int getNumberOfReturnMessages()
Return the number of messages issued by last remote command


runCommand

public int runCommand(String sCmdString,
                      com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Run a command using the subsystem from the dataElement


getMemberType

public static String getMemberType(String sFileName)
Attempt to intelligently default a member type based on the name of the file.

Parameters:
sFileName - - the name of the file. Eg QRPGLESRC

restore

public int restore(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                   boolean processCmdLineParm)
Run Restore. RSTLIB command for library and RSTOBJ for objects


restoreLib

public int restoreLib(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                      boolean processCmdLineParm)
Run RSTLIB command for SAVF


restoreObj

public int restoreObj(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                      boolean processCmdLineParm)
Run RSTOBJ command for SAVF


save

public int save(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                boolean processCmdLineParm)
Run Save. SAVLIB command for library and SAVOBJ for objects


mergeSource

public int mergeSource(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                       boolean processCmdLineParm)
Run Mrgsrc.


copyFile

public int copyFile(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                    boolean processCmdLineParm)
Run Copy file.


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.