com.ibm.etools.iseries.edit.verifiers.comm.bridge
Class CODECommFunctions
java.lang.Object
com.ibm.etools.iseries.edit.verifiers.comm.bridge.CODECommFunctions
- All Implemented Interfaces:
- ICODECommIntegrationConstants
public class CODECommFunctions
- extends Object
- implements ICODECommIntegrationConstants
This class contains the implementation for all RSE <-> CODE tool
integration function calls.
Fields inherited from interface com.ibm.etools.iseries.edit.verifiers.comm.bridge.ICODECommIntegrationConstants |
ADEOPT_ALL, ADEOPT_ASIS, ADEOPT_CODE, ADEOPT_DATE, ADEOPT_EDIT, ADEOPT_FIRST, ADEOPT_INACTIVE, ADEOPT_LENGTH, ADEOPT_NOTAG, ADEOPT_SECOND, ADEOPT_SIZE, ADERC_BUFFER_SMALL, ADERC_CCSID_NF, ADERC_EDIT_NF, ADERC_EOF, ADERC_FIELD_NF, ADERC_FILE_AUTH, ADERC_FILE_NF, ADERC_FILE_TYPE, ADERC_INACT, ADERC_INVALID_ALIAS, ADERC_INVALID_MSG, ADERC_LIB_AUTH, ADERC_LIB_NF, ADERC_MBR_NF, ADERC_NO_SERVER, ADERC_OBJ_AUTH, ADERC_OBJ_NF, ADERC_OK, ADERC_PROG_ERR, ADERC_RECORD_NF, ADERC_RSST_ERR, ADERC_SYS_ERR, ALIAS_LENGTH, BOOL_FALSE, BOOL_TRUE, CHKFILE_ADM, CHKFILE_DBCS, CHKFILE_DDM, CHKFILE_DISPLAY, CHKFILE_ICF, CHKFILE_JOIN, CHKFILE_KEYED, CHKFILE_LOGICAL, CHKFILE_MIXED, CHKFILE_PHYSICAL, CHKFILE_PRINTER, CHKFILE_SOURCE, CHKOP_ADD, CHKOP_ALL, CHKOP_CHANGE, CHKOP_COPY, CHKOP_CPYMBR, CHKOP_DELETE, CHKOP_EDIT, CHKOP_MANAGE, CHKOP_OBJOPERATE, CHKOP_OBJOPRMGT, CHKOP_READ, CHKOP_READADD, CHKOP_UPDATE, CHKOP_USE, CHKOP_USEADD, CHKSTATUS_FTYPERETURNED, CHKSTATUS_IGCSYS, CHKSTATUS_LIBREAD, CHKSTATUS_MBRLOCK, CHKSTATUS_OBJREAD, CHKTYPE_ADM, CHKTYPE_BASEDON, CHKTYPE_LIB, CHKTYPE_MBR, CHKTYPE_OBJ, EXTKWD_CHECKAB, EXTKWD_CHECKFE, EXTKWD_CHECKM10, EXTKWD_CHECKM11, EXTKWD_CHECKME, EXTKWD_CHECKMF, EXTKWD_CHECKMF10, EXTKWD_CHECKMF11, EXTKWD_CHECKVN, EXTKWD_CHECKVNE, EXTKWD_CHKMSGID, EXTKWD_COMPEQ, EXTKWD_COMPGE, EXTKWD_COMPGT, EXTKWD_COMPLE, EXTKWD_COMPLT, EXTKWD_COMPNE, EXTKWD_COMPNG, EXTKWD_COMPNL, EXTKWD_DFT, EXTKWD_RANGE, EXTKWD_VALUES, NULL_CHAR, OP_CONCAT, OP_RENAME, OP_SUBSTRING, OP_TRANS_CONCAT, OP_TRANS_RENAME, OP_TRANSLATE, RSE_CHECK_CCSID, RSE_CHECK_OBJECT, RSE_CHECK_OBJECT_2, RSE_CHECK_OBJECT_IFS, RSE_CLOSE, RSE_CLOSE_SOCKET, RSE_DEFAULT_ALIAS, RSE_DEVFILE_INFO, RSE_EDIT_WORD, RSE_GET_CWD_IFS, RSE_GET_ENCODING_SCHEME, RSE_GET_ENV_IFS, RSE_IS_ALIAS_VALID, RSE_IS_ANY_ALIAS_VALID, RSE_MSG_TEXT, RSE_OPEN_DBF, RSE_OPEN_FIELD, RSE_OPEN_GET, RSE_OPEN_GET_IFS, RSE_OPEN_LIST, RSE_READ, RSE_READ_DBF, RSE_READ_FIELD, RSE_READ_IFS, RSE_RESOLVE_DBF, RSE_SORT_SEQ_TABLE, RSE_SQL_LANG_LENGTH, RSE_SYNTAX_CHECK_SQL, RSE_SYS_INFO, RSE_XLATE, XLATE_GET, XLATE_PUT |
Method Summary |
protected static void |
resetSignonPrompts()
Re-enable future signon prompts for all connections. |
protected static void |
rseCheckCCSID(CToJavaInputStream in,
JavaToCOutputStream out)
*
Function: *
rseCheckCCSID : Check if the specified CCSID is valid *
*
Input: *
USHORT ccsid = coded character set identifier *
*
Return: *
LONG returnCode *
ADERC_OK = successful completion *
ADERC_CCSID_NF = CCSID not found *
*
/ |
protected static void |
rseCheckObject(CToJavaInputStream in,
JavaToCOutputStream out)
rseCheckObject :
Check the object condition / status
SEND:
enum RSE_CHECK_OBJECT
ALIAS server_alias - 10 char name of CODE server followed by terminating null
CHAR name[34] library / object [(member | *)]
- library could be:
*LIBL : use the first occurence of the library / file in the library list
if the member is not in this file then ADERC_MBR_NF is returned. |
protected static void |
rseCheckObject2(CToJavaInputStream in,
JavaToCOutputStream out)
rseCheckObject2 :
Check the object condition / status
SEND:
enum RSE_CHECK_OBJECT
ALIAS server_alias - 10 char name of CODE server followed by terminating null
int bufferSize; // The size of the buffer holding the name to check
CHAR name[bufferSize] library / object [(member | *)]
- library could be:
*LIBL : use the first occurence of the library / file in the library list
if the member is not in this file then ADERC_MBR_NF is returned. |
protected static void |
rseCheckObjectHelper(String alias,
String name,
CToJavaInputStream in,
JavaToCOutputStream out)
rseCheckObjectHelper :
A helper method used by rseCheckObject and rseCheckObject 2
The name of the object to check was assumed to be 34 bytes long. |
protected static void |
rseCheckObjectIFS(CToJavaInputStream in,
JavaToCOutputStream out)
rseCheckObjectIFS
SEND:
enum RSE_CHECK_OBJECT_IFS
ALIAS server_alias - 10 char name of CODE server followed by terminating null
ULONG ifsFileName length
CHAR *ifsFileName
- null terminated fully qualified IFS file name
RECEIVE:
LONG return_code
ADERC_OK
ADERC_OBJ_NF for file not found
ADERC_SYS_ERR for communications errors |
protected static void |
rseClose(CToJavaInputStream in,
JavaToCOutputStream out)
RSE equivalent of VDEClose()
ie. |
protected static void |
rseDeviceFileInfo(CToJavaInputStream in,
JavaToCOutputStream out)
rseDeviceFileInfo
SEND:
enum RSE_DEVFILE_INFO
ALIAS server_alias - 10 char name of CODE server followed by terminating null
DFIIN
typedef struct {
CHAR library[11]; // Library
CHAR file[11]; // Library authority
} DFIIN;
RECEIVE:
LONG return_code
DFIOUT
typedef struct {
USHORT lowestRespInd; // Lowest response indicator
ULONG bufferSize; // User buffer size
} DFIOUT; |
protected static void |
rseEditWord(CToJavaInputStream in,
JavaToCOutputStream out)
rseEditWord
SEND:
enum RSE_EDIT_WORD
ALIAS server_alias - 10 char name of CODE server followed by terminating null
EDIN
- request code = 1 ???
RECEIVE:
LONG return_code
SHORT length (single field for EDOUT1)
Related CODE comm structures:
typedef struct {
SHORT editLength; // Length of edit word
SHORT fieldLength; // Field length for edit code
SHORT decimal; // Decimal position for edit code
CHAR request; // Request code
CHAR code; // Edit code
CHAR symbol; // Float symbol for edit code
CHAR word[256]; // Edit word
} EDIN;
typedef struct {
SHORT length; // Output display length
CHAR word[256]; // Output string
} EDOUT1; // Edit code struct. |
protected static void |
rseGetCurrentWorkingDirectory(CToJavaInputStream in,
JavaToCOutputStream out)
rseGetCWDIFS
SEND:
enum RSE_GET_CWD_IFS
ALIAS server_alias - 10 char name of CODE server followed by terminating null
ULONG length
RECEIVE:
LONG return_code
if (rc == OK)
{
ULONG realLength + 1 (includes null terminator)
buffer[] realLength + 1 (null terminated)
}
else if (rc == BUFFER_SMALL)
{
ULONG realLength+ 1 (includes null terminator)
}
else
{
// nothing else is sent for other return codes
}
Change history:
yantzi:5.1.2 added incoming pathNameLenght variable and check to see if the current working
directory is longer than the specified path lengh |
protected static void |
rseGetDefaultAlias(CToJavaInputStream in,
JavaToCOutputStream out)
This API will determine return the first alias that exists,
if the ADEOPT_INACTIVE option is not specified it will return the first active alias. |
protected static void |
rseGetEncodingScheme(CToJavaInputStream in,
JavaToCOutputStream out)
rseGetEncodingScheme
host api QTQGESP
SEND:
enum RSE_GET_ENCODING_SCHEME
ALIAS server_alias - 10 char name of CODE server followed by terminating null
int ccsid
RECEIVE:
LONG return_code
int encodingScheme |
protected static void |
rseGetEnvironmentVariable(CToJavaInputStream in,
JavaToCOutputStream out)
rseGetEnvIFS
SEND:
enum RSE_GET_ENV_IFS
ALIAS server_alias - 10 char name of CODE server followed by terminating null
ULONG varNameLength length
CHAR *variableName - null terminated environment variable name
ULONG maxLength
RECEIVE:
LONG return_code
if (rc == OK)
{
ULONG length (length of environment data + 1 for null terminator)
buffer[] (actual environment data, null terminated)
}
else if (rc == BUFFER_SMALL)
{
ULONG realLength+ 1 (includes null terminator)
}
else
{
// nothing else is sent for other return codes
}
Change history:
yantzi:5.1.2 added incoming maxLength variable and check to see if the environment variable
is longer than the specified path lengh |
protected static void |
rseGetSortSeqTable(CToJavaInputStream in,
JavaToCOutputStream out)
rseGetSortSeqTable
This api retrieves the host sort sequence table for the specified CCSID. |
protected static void |
rseGetSystemInfo(CToJavaInputStream in,
JavaToCOutputStream out)
RSE equivalent of VDEEditWord() for request '3' (extract system info)
================= VDEEditWord() description ===============================
Function:
Edit word or field. |
protected static void |
rseIsAliasValid(CToJavaInputStream in,
JavaToCOutputStream out)
This API will determine if the specified alias exists,
if the ADEOPT_INACTIVE option is not specified it will also check if it is active. |
protected static void |
rseIsAnyAliasValid(CToJavaInputStream in,
JavaToCOutputStream out)
This API will determine if the any alias exists,
if the ADEOPT_INACTIVE option is not specified it will also check if they are active. |
protected static void |
rseMsgText(CToJavaInputStream in,
JavaToCOutputStream out)
RSE equivalent of VDEMsgText()
This API will return the same return code as VDEMsgText() with the same
input but it will get the information from a socket to the specified
port that is communicating through RSE. |
protected static void |
rseOpenDBF(CToJavaInputStream in,
JavaToCOutputStream out)
rseOpenDBF
SEND:
enum RSE_OPEN_DBF
ALIAS server_alias - 10 char name of CODE server followed by terminating null
DBIN
RECEIVE:
LONG return_code
ADE_CB control block (4 bytes)
DBOUT |
protected static void |
rseOpenField(CToJavaInputStream in,
JavaToCOutputStream out)
RSE equivalent of VDEOpen with the ADEOP_FIELD opcode
This API will return the same information as VDEOpen with the same
input but it will get the information from a socket to the specified
port that is communicating through RSE. |
protected static void |
rseOpenGet(CToJavaInputStream in,
JavaToCOutputStream out)
rseOpenGet : open a file for reading
The search sequence for the file is as follows (outlined in DCR004576)
1. |
protected static void |
rseOpenGetIFS(CToJavaInputStream in,
JavaToCOutputStream out)
rseOpenGetIFS
SEND:
enum RSE_OPEN_GET_IFS
ALIAS server_alias - 10 char name of CODE server followed by terminating null
ULONG ifsFileName length
CHAR *ifsFileName
- null terminated fully qualified IFS file name
RECEIVE:
LONG return_code
ADE_CB control block (4 bytes)
ULONG fileSize (number of lines) |
protected static void |
rseOpenList(CToJavaInputStream in,
JavaToCOutputStream out)
rseOpenList
SEND:
enum RSE_OPEN_LIST
ALIAS server_alias - 10 char name of CODE server followed by terminating null
LONG adeOptions =
ADEOPT_ALL -- ?
ADEOPT_DEFAULT
ADEOPT_TYPE
ADEOPT_ASIS
ADEOPT_MORE
CHAR name[100]
- format from PVs to come
- library / file RCDNAME(*)
RECEIVE:
LONG return_code
ADE_CB control block (4 bytes) |
protected static void |
rseRead(CToJavaInputStream in,
JavaToCOutputStream out)
rseRead
SEND:
enum RSE_READ
ADE_CB control_block_ptr - this char * is just the handle that was returned from
the previous RSEOpenXXX() call. |
protected static void |
rseReadField(CToJavaInputStream in,
JavaToCOutputStream out)
RSE equivalent of VDERead with the a previous VDEOpen with ADEOP_FIELD opcode
This API will return the same information as VDERead() with the same
input but it will get the information from a socket to the specified
port that is communicating through RSE. |
protected static void |
rseReadIFS(CToJavaInputStream in,
JavaToCOutputStream out)
rseReadIFS
SEND:
enum RSE_READ_IFS
ADE_CB control block (4 bytes)
RECEIVE:
LONG return_code
USHORT *pLength // length of incoming buffer
buffer[] // actual data |
protected static void |
rseSyntaxCheckSQL(CToJavaInputStream in,
JavaToCOutputStream out)
rseSyntaxCheckSQL
This api Syntax Checks the SQL statements. |
protected static void |
rseXlate(CToJavaInputStream in,
JavaToCOutputStream out)
rseXlate
XLATE_PUT : ascii to ebcdic
XLATE_GET : ebcdic to ascii
SEND:
enum RSE_XLATE
ALIAS server_alias - 10 char name of CODE server followed by terminating null (for job CCSID)
LONG options [ XLATE_PUT | XLATE_GET ]
XLATE_PUT : PC -> host conversion
XLATE_GET : host -> PC conversion
LONG length
CHAR string[length]
RECEIVE:
LONG return_code
LONG length
CHAR string[length] |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
copyright
public static final String copyright
- See Also:
- Constant Field Values
rseOpenField
protected static void rseOpenField(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- RSE equivalent of VDEOpen with the ADEOP_FIELD opcode
This API will return the same information as VDEOpen with the same
input but it will get the information from a socket to the specified
port that is communicating through RSE. The RSE server is assumed to be
running on the same machine.
If there is a problem communicating with the target port, ADERC_SYS_ERR
will be returned, otherwise the return code will be match that of VDEOpen with
the same inputs.
The protocol for this particular request is:
SEND:
enum RSE_OPEN_FIELD
ALIAS server_alias - 10 char name of CODE server followed by
terminating null
ULONG ade_options - an unsigned long containing bit flags, indicating
which options have been selected.
FDIN target_field - the FDIN struct will be streamed out character by
character.
typedef struct {
CHAR library[11]; // Data base library name
CHAR file[11]; // Data base file name
CHAR record[11]; // Data base record name
CHAR field[11]; // Data base field name
CHAR valCheck; // Data base validity check
} FDIN;
RECEIVE:
LONG return_code
ADE_CB control_block_ptr - this char * is just a handle, it can never be dereferenced
FDOUT ref_field_info - the FDOUT struct will be streamed in and stuffed directly
into the C structure. See evfcsys.h for struct definiton
- Throws:
IOException
rseReadField
protected static void rseReadField(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- RSE equivalent of VDERead with the a previous VDEOpen with ADEOP_FIELD opcode
This API will return the same information as VDERead() with the same
input but it will get the information from a socket to the specified
port that is communicating through RSE. The RSE server is assumed to be
running on the same machine.
If there is a problem communicating with the target port, ADERC_EXTFAIL
will be returned, otherwise the return code will be match that of VDEOpen with
the same inputs.
The protocol for this particular request is:
SEND:
enum RSE_READ_FIELD
ADE_CB control_block_ptr - this char * is just the handle that was returned from
the previous RSEOpenXXX() call.
RECEIVE:
LONG return_code
USHORT length - the number of bytes in the subsequent buffer
CHAR[] buffer - the data that is waiting for this read, the data will vary depending
on the open operation preceeding the read.
Since the open operation was ADEOP_FIELD the buffer
will contain a FDKWD struct, followed optionally by the parameter string.
typedef struct {
SHORT length; // Length of keyword parameters
SHORT numParameter; // number of parameters
SHORT id; // keyword identifier
// List of keyword parameters
} FDKWD;
The parameter string contains numParameter parameters, each
delimited with a null character and is contained in the
length bytes following the FDKWD struct in the buffer.
Return Codes:
ADERC_OK = successful completion
ADERC_COMM_ERR = communication error
ADERC_SYS_ERR = local system error
ADERC_EOF = end of file/list/data
Return codes not supported (yet):
ADERC_INVALID_ALIAS = server alias not active
ADERC_BAD_SEQUENCE = invalid call sequence
ADERC_PROG_ERR = programming error
- Throws:
IOException
rseClose
protected static void rseClose(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- RSE equivalent of VDEClose()
ie. it will free the memory reserved by a previous RSEOpenXXX() operation.
This API will return the same return code as VDEClose() with the same
input but it will get the information from a socket to the specified
port that is communicating through RSE. The RSE server is assumed to be
running on the same machine.
If there is a problem communicating with the target port, ADERC_SYS_ERR
will be returned, otherwise the return code will be match that of VDEOpen with
the same inputs.
The protocol for this particular request is:
SEND:
enum RSE_CLOSE
ADE_CB control_block_ptr - this char * is just the handle that was returned from
the previous RSEOpenXXX() call.
RECEIVE:
LONG return_code
ADERC_OK if successfull
ADERC_SYS_ERR if control block is not found
- Throws:
IOException
rseMsgText
protected static void rseMsgText(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- RSE equivalent of VDEMsgText()
This API will return the same return code as VDEMsgText() with the same
input but it will get the information from a socket to the specified
port that is communicating through RSE. The RSE server is assumed to be
running on the same machine.
The protocol for this particular request is:
SEND:
enum RSE_MSG_TEXT
int length
char* msgId - null terminated string of the form "msgID library/msgFile"
ULONG ade_options - an unsigned long containing bit flags, indicating
which options have been selected.
RECEIVE:
LONG return_code
int length of returned buffer
char* buffer
Supported Options:
options = type of information to be retrieved (big flags)
ADEOPT_CODE -- message severity
ADEOPT_FIRST -- primary message text
ADEOPT_SECOND -- secondary message text
Return Codes:
ADERC_OK = successful completion
ADERC_INVALID_ALIAS = server alias not active
ADERC_INVALID_MSG = invalid message identifier
ADERC_SYS_ERR = local system error
ADERC_PROG_ERR = programming error
- Throws:
IOException
rseIsAliasValid
protected static void rseIsAliasValid(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- This API will determine if the specified alias exists,
if the ADEOPT_INACTIVE option is not specified it will also check if it is active.
The protocol for this particular request is:
SEND:
enum RSE_IS_ALIAS_ACTIVE
ALIAS server_alias - null-terminated name of CODE server in 10 char buffer
ULONG ade_options - an unsigned long containing bit flags, indicating
which options have been selected.
RECEIVE:
BOOL return_code - unsigned short - non-zero if true
- Throws:
IOException
rseIsAnyAliasValid
protected static void rseIsAnyAliasValid(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- This API will determine if the any alias exists,
if the ADEOPT_INACTIVE option is not specified it will also check if they are active.
specify VDEALIAS to ignore STRCODE servers (Note: VDEALIAS not supported
for RSE.
The protocol for this particular request is:
SEND:
enum RSE_IS_ANY_ALIAS_ACTIVE
ULONG ade_options - an unsigned long containing bit flags, indicating
which options have been selected.
RECEIVE:
BOOL return_code - unsigned short - non-zero if true
- Throws:
IOException
rseGetDefaultAlias
protected static void rseGetDefaultAlias(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- This API will determine return the first alias that exists,
if the ADEOPT_INACTIVE option is not specified it will return the first active alias.
The return value will be true if an appropriate alias was found.
specify VDEALIAS to ignore STRCODE servers
Semantics:
Case 1: ADEOPT_INACTIVE not specified. (Get an active server)
a. Get the RSE specified default server. If it is not defined or connected, then
b. Return any connected server. (If there is a user-specifiable order on the connections, respect that.)
c. If none connected, fail - return false.
Case 2: ADEOPT_INACTIVE specified. (Get an active server)
a. Get the RSE specified default server. If it is not defined, then
b. Return any defined server. (If there is a user-specifiable order on the connections, respect that.)
c. If none defined, fail.
The protocol for this particular request is:
SEND:
enum RSE_DEFAULT_ALIAS
ULONG ade_options - an unsigned long containing bit flags, indicating
which options have been selected.
RECEIVE:
BOOL return_code - unsigned short - non-zero if a default alias is found
ALIAS server_alias - null-terminated name of CODE server in 10 char buffer
- Throws:
IOException
rseGetSystemInfo
protected static void rseGetSystemInfo(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- RSE equivalent of VDEEditWord() for request '3' (extract system info)
================= VDEEditWord() description ===============================
Function:
Edit word or field.
Input:
alias = alias of the remote host system
pEdin = pointer to EditWord input parameter structure
options = type of information to be retrieved (big flags)
ADEOPT_IMMEDIATE -- do not wait for active request to end
Output:
pEdout = pointer to EditWord output parameter structure
Return:
ADERC_OK = successful completion
ADERC_INVALID = invalid parameter
ADERC_COMM_ERR = communication error
================= End VDEEditWord() description ===========================
This API will return the same return code as VDEEditWord() with the same
input but it will get the information from a socket to the specified
port that is communicating through RSE. The RSE server is assumed to be
running on the same machine.
If there is a problem communicating with the target port, ADERC_SYS_ERR
will be returned.
The protocol for this particular request is:
SEND:
enum RSE_SYS_INFO
ALIAS server_alias - 10 char name of CODE server followed by
terminating null
ULONG ade_options - an unsigned long containing bit flags, indicating
which options have been selected.
RECEIVE:
LONG return_code
EDOUT2 struct where:
typedef struct {
SHORT count; // number of user defined codes
CHAR currencySymbol; // Currency symbol
CHAR systemDate[6]; // Date format
CHAR decimalSeparator; // Decimal separator
CHAR dateSeparator; // Date separator
CHAR timeSeparator; // Time separator
CHAR userId[11]; // User identifier
CHAR jobDescription[11]; // Profile job description
CHAR jobLibrary[11]; // Profile job library
EDCODE editCode[5]; // User defined edit code
} EDOUT2; // Edit code struct for request = 3
typedef struct _EDCODE {
CHAR codeId; // Code identifier
CHAR leading[32]; // Leading static field
CHAR integer[32]; // Integer part of edit word
CHAR decimalSeparator; // Decimal pointer separator
CHAR decimalWord[32]; // Decimal part of edit word
CHAR zeroChar1; // Zero suppressed character
CHAR positive[32]; // Positive right static field
CHAR negative[32]; // Negative right static field
CHAR trailing[32]; // Trailing static field
CHAR zeroChar2; // Zero suppressed character
CHAR floating[16]; // Floating string
} EDCODE; // User defined edit code
- Throws:
IOException
rseGetSortSeqTable
protected static void rseGetSortSeqTable(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseGetSortSeqTable
This api retrieves the host sort sequence table for the specified CCSID.
SEND:
enum RSE_GET_SORT_SEQ_TABLE
ALIAS server_alias - 10 char name of CODE server followed by
terminating null
LONG ccsid
CHARDBIN :
typedef struct { // Character data block (input)
CHAR chTableName[10]; // Table name - 10 characters
CHAR chLibraryName[10]; // Library name - 10 characters
CHAR chLanguageID[10]; // Language ID - 10 characters
CHAR chFormatName[8]; // Format name - 8 characters
} CHARDBIN;
- only support format RSST0100
RECEIVE:
LONG return_code
SSTRECVAR
- Throws:
IOException
rseCheckObjectHelper
protected static void rseCheckObjectHelper(String alias,
String name,
CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseCheckObjectHelper :
A helper method used by rseCheckObject and rseCheckObject 2
The name of the object to check was assumed to be 34 bytes long.
The buffer had been set up in rseCheckObject and on the C side
to 34 bytes. However it is possible to set up queries that are
longer than 34 bytes. rseCheckObject2 has been set up to take in
an expected bufferSize first to correct this. The two functions
should be integrated in version 6. This cannot be done now as the
changes should be made at the same time on the Java side and the
C side.
- Throws:
IOException
rseCheckObject
protected static void rseCheckObject(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseCheckObject :
Check the object condition / status
SEND:
enum RSE_CHECK_OBJECT
ALIAS server_alias - 10 char name of CODE server followed by terminating null
CHAR name[34] library / object [(member | *)]
- library could be:
*LIBL : use the first occurence of the library / file in the library list
if the member is not in this file then ADERC_MBR_NF is returned.
*ALLLIBL :
CHKIN (defined in evfcsys.h) as follows:
typedef struct {
USHORT libAuthority; // Library authority
USHORT objAuthority; // Same as library authority
USHORT type; // Type of checking
USHORT overrides; // Disallow/allow File Overrides
} CHKIN;
RECEIVE:
LONG return_code
CHKOUT
- Throws:
IOException
rseCheckObject2
protected static void rseCheckObject2(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseCheckObject2 :
Check the object condition / status
SEND:
enum RSE_CHECK_OBJECT
ALIAS server_alias - 10 char name of CODE server followed by terminating null
int bufferSize; // The size of the buffer holding the name to check
CHAR name[bufferSize] library / object [(member | *)]
- library could be:
*LIBL : use the first occurence of the library / file in the library list
if the member is not in this file then ADERC_MBR_NF is returned.
*ALLLIBL :
CHKIN (defined in evfcsys.h) as follows:
typedef struct {
USHORT libAuthority; // Library authority
USHORT objAuthority; // Same as library authority
USHORT type; // Type of checking
USHORT overrides; // Disallow/allow File Overrides
} CHKIN;
RECEIVE:
LONG return_code
CHKOUT
- Throws:
IOException
rseOpenList
protected static void rseOpenList(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseOpenList
SEND:
enum RSE_OPEN_LIST
ALIAS server_alias - 10 char name of CODE server followed by terminating null
LONG adeOptions =
ADEOPT_ALL -- ?
ADEOPT_DEFAULT
ADEOPT_TYPE
ADEOPT_ASIS
ADEOPT_MORE
CHAR name[100]
- format from PVs to come
- library / file RCDNAME(*)
RECEIVE:
LONG return_code
ADE_CB control block (4 bytes)
- Throws:
IOException
rseOpenDBF
protected static void rseOpenDBF(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseOpenDBF
SEND:
enum RSE_OPEN_DBF
ALIAS server_alias - 10 char name of CODE server followed by terminating null
DBIN
RECEIVE:
LONG return_code
ADE_CB control block (4 bytes)
DBOUT
- Throws:
IOException
rseRead
protected static void rseRead(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseRead
SEND:
enum RSE_READ
ADE_CB control_block_ptr - this char * is just the handle that was returned from
the previous RSEOpenXXX() call.
USHORT concat flag
RECEIVE:
LONG return_code
USHORT length of return data
byte[length]
What this return data is still needs to be more defined (by me / Rishi / Nazmin). What
the returnb data is (and its size) depends on what the inital open call was. The supported
open calls followed by an rseRead() are:
rseOpenDBF
rseOpenList
rseOpenGet
- Throws:
IOException
rseOpenGet
protected static void rseOpenGet(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseOpenGet : open a file for reading
The search sequence for the file is as follows (outlined in DCR004576)
1. Check for project version open in editor [project support only]
2. Check for file in a project [project support only]
3. Host version open in editor
4. Host version
a. Cached host version
b. Live host version
SEND:
enum RSE_OPEN_GET
ALIAS server_alias - 10 char name of CODE server followed by terminating null
ULONG adeOptions =
ADEOPT_ALL --
ADEOPT_DATE -- last changed date
ADEOPT_SIZE -- number of members/records
ADEOPT_LENGTH -- record length
ADEOPT_ASIS -- data to be returned in binary format
ADEOPT_EDIT -- read from the edit window
ADEOPT_NOTAG -- remove sequence no and date stamp
CHAR filename[34]
- format lib / file (membername)
RECEIVE:
LONG return_code
ADE_CB control block (4 bytes)
ADE_DATETIME
ULONG fileSize (number of lines)
ULONG recordLength
- Throws:
IOException
rseEditWord
protected static void rseEditWord(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseEditWord
SEND:
enum RSE_EDIT_WORD
ALIAS server_alias - 10 char name of CODE server followed by terminating null
EDIN
- request code = 1 ???
RECEIVE:
LONG return_code
SHORT length (single field for EDOUT1)
Related CODE comm structures:
typedef struct {
SHORT editLength; // Length of edit word
SHORT fieldLength; // Field length for edit code
SHORT decimal; // Decimal position for edit code
CHAR request; // Request code
CHAR code; // Edit code
CHAR symbol; // Float symbol for edit code
CHAR word[256]; // Edit word
} EDIN;
typedef struct {
SHORT length; // Output display length
CHAR word[256]; // Output string
} EDOUT1; // Edit code struct. for request=1/2
- Throws:
IOException
rseDeviceFileInfo
protected static void rseDeviceFileInfo(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseDeviceFileInfo
SEND:
enum RSE_DEVFILE_INFO
ALIAS server_alias - 10 char name of CODE server followed by terminating null
DFIIN
typedef struct {
CHAR library[11]; // Library
CHAR file[11]; // Library authority
} DFIIN;
RECEIVE:
LONG return_code
DFIOUT
typedef struct {
USHORT lowestRespInd; // Lowest response indicator
ULONG bufferSize; // User buffer size
} DFIOUT;
- Throws:
IOException
rseXlate
protected static void rseXlate(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseXlate
XLATE_PUT : ascii to ebcdic
XLATE_GET : ebcdic to ascii
SEND:
enum RSE_XLATE
ALIAS server_alias - 10 char name of CODE server followed by terminating null (for job CCSID)
LONG options [ XLATE_PUT | XLATE_GET ]
XLATE_PUT : PC -> host conversion
XLATE_GET : host -> PC conversion
LONG length
CHAR string[length]
RECEIVE:
LONG return_code
LONG length
CHAR string[length]
- Throws:
IOException
rseGetEncodingScheme
protected static void rseGetEncodingScheme(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseGetEncodingScheme
host api QTQGESP
SEND:
enum RSE_GET_ENCODING_SCHEME
ALIAS server_alias - 10 char name of CODE server followed by terminating null
int ccsid
RECEIVE:
LONG return_code
int encodingScheme
- Throws:
IOException
rseCheckCCSID
protected static void rseCheckCCSID(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- *
Function: *
rseCheckCCSID : Check if the specified CCSID is valid *
*
Input: *
USHORT ccsid = coded character set identifier *
*
Return: *
LONG returnCode *
ADERC_OK = successful completion *
ADERC_CCSID_NF = CCSID not found *
*
/
- Throws:
IOException
rseCheckObjectIFS
protected static void rseCheckObjectIFS(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseCheckObjectIFS
SEND:
enum RSE_CHECK_OBJECT_IFS
ALIAS server_alias - 10 char name of CODE server followed by terminating null
ULONG ifsFileName length
CHAR *ifsFileName
- null terminated fully qualified IFS file name
RECEIVE:
LONG return_code
ADERC_OK
ADERC_OBJ_NF for file not found
ADERC_SYS_ERR for communications errors
- Throws:
IOException
rseOpenGetIFS
protected static void rseOpenGetIFS(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseOpenGetIFS
SEND:
enum RSE_OPEN_GET_IFS
ALIAS server_alias - 10 char name of CODE server followed by terminating null
ULONG ifsFileName length
CHAR *ifsFileName
- null terminated fully qualified IFS file name
RECEIVE:
LONG return_code
ADE_CB control block (4 bytes)
ULONG fileSize (number of lines)
- Throws:
IOException
rseReadIFS
protected static void rseReadIFS(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseReadIFS
SEND:
enum RSE_READ_IFS
ADE_CB control block (4 bytes)
RECEIVE:
LONG return_code
USHORT *pLength // length of incoming buffer
buffer[] // actual data
- Throws:
IOException
rseGetEnvironmentVariable
protected static void rseGetEnvironmentVariable(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseGetEnvIFS
SEND:
enum RSE_GET_ENV_IFS
ALIAS server_alias - 10 char name of CODE server followed by terminating null
ULONG varNameLength length
CHAR *variableName - null terminated environment variable name
ULONG maxLength
RECEIVE:
LONG return_code
if (rc == OK)
{
ULONG length (length of environment data + 1 for null terminator)
buffer[] (actual environment data, null terminated)
}
else if (rc == BUFFER_SMALL)
{
ULONG realLength+ 1 (includes null terminator)
}
else
{
// nothing else is sent for other return codes
}
Change history:
yantzi:5.1.2 added incoming maxLength variable and check to see if the environment variable
is longer than the specified path lengh
- Throws:
IOException
rseGetCurrentWorkingDirectory
protected static void rseGetCurrentWorkingDirectory(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseGetCWDIFS
SEND:
enum RSE_GET_CWD_IFS
ALIAS server_alias - 10 char name of CODE server followed by terminating null
ULONG length
RECEIVE:
LONG return_code
if (rc == OK)
{
ULONG realLength + 1 (includes null terminator)
buffer[] realLength + 1 (null terminated)
}
else if (rc == BUFFER_SMALL)
{
ULONG realLength+ 1 (includes null terminator)
}
else
{
// nothing else is sent for other return codes
}
Change history:
yantzi:5.1.2 added incoming pathNameLenght variable and check to see if the current working
directory is longer than the specified path lengh
- Throws:
IOException
rseSyntaxCheckSQL
protected static void rseSyntaxCheckSQL(CToJavaInputStream in,
JavaToCOutputStream out)
throws IOException
- rseSyntaxCheckSQL
This api Syntax Checks the SQL statements.
SEND:
enum RSE_SYNTAX_CHECK_SQL
ALIAS server_alias - 10 char name of CODE server name followed by terminating null
int - Length of each SQL Statement
int - Number of Records
CHAR * - SQL statements (Length * Number of records)
CHAR[10] - Language in which the SQL statements are coded
int - Number of Keys
CHAR * - options of the form {key, length of data, data} repeated for number of keys
RECEIVE:
LONG - return_code
int - Length of the information returned
CHAR * - Information returned
int - number of messages
int - for each message - the length
CHAR * - message
- Throws:
IOException
resetSignonPrompts
protected static void resetSignonPrompts()
- Re-enable future signon prompts for all connections.
Copyright © 2011 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.