Determining the Outcome of a Process
The select statistics command is used to examine Process statistics from the Connect:Direct® statistics file. The type of information in the statistics report includes copy status and execution events.
The search criteria provide flexibility in selecting information you want to display. The parameters used with the select statistics command determine search criteria and the form in which the information is presented. You can specify records to select by condition code, Process name, Process number, identification type, category, secondary node, start time, stop time, and submitter node specification and user ID.
There are no required parameters for this command. If you do not indicate a search requirement with an optional parameter, Connect:Direct selects all statistics records; however, the volume of records can be excessive. Following are parameters for the select statistics command:
| Parameter | Description | Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ccode | Selects statistics records based on the completion code operator and return code values associated with Step Termination. You must specify the return code. | operator, nn operator—Specifies the completion code operator. Following are the valid completion code operators: eq or = or == (equal) This is the default. ge or >= or => (greater than or equal) gt or > (greater than) le or <= or =< (less than or equal) lt or < (less than) ne or != (not equal) The return code is the exit status of the UNIX command or the Connect:Direct Process or command. nn—Specifies the return code value associated with Step Termination. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| destfile | Selects statistics based on a destination file name. This parameter can be abbreviated as dest. | dest=/path/file name For example: sel stat dest=/sci/payroll/june.payroll; This parameter can be used in combination with the srcfile parameter to select statistics based on a source file name and a destination file name, for example: sel stat srcf=/sci/accounting/june.payroll dest=/sci/payroll/june.payroll |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pname | Locate the statistics to select by Process name. The Process name is limited to 8 characters on Connect:Direct for Microsoft Windows and Connect:Direct for z/OS®. |
name | generic | (list) name—Specifies the Process name, up to 8 alphanumeric characters. generic—Specifies a nonspecific value for the Process name. This generic value, containing pattern-matching characters, evaluates to a list of zero or more pname strings. list—Specifies a list of Process names. Enclose the list in parentheses, and separate each value with a comma. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnumber | Locate the statistics to select by Process number. Connect:Direct assigns the Process number when the Process is submitted. | number from 1–99,999 | (list) number—Specifies the Process number. list—Specifies a list of Process numbers. Enclose the list in parentheses, and separate each value with a comma. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reccat | Specifies whether the selection of statistics file records is based on events or related to a Process or is from an external source. | CAEV | CAPR | CAEX (CAEV, CAPR, CAEX) CAEV—Specifies that the selection of statistics file records is related to an event, such as a IBM® Connect:Direct shutdown. CAPR—Specifies that the selection of statistics file records is related to one or more IBM Connect:Direct Processes. CAEX—Specifies that the selection of statistics file records is related to an external source like Integrated File Agent. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| recids | Specifies the statistics file records to be selected by record ID. This parameter identifies particular types of statistics records, such as a copy termination records or Connect:Direct initialization event records. | record id | (list) record id—Selects statistics file records for the specified record ID. list—Specifies a list of Process names. Enclose the list in parentheses, and separate each value with a comma. Some of the most common Rec ID (Identifiers) are listed below. Other Rec IDs are typically derived from the first 4 letters of a message ID. The message text will provide the necessary details.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| snode | Locate the statistics file record by the secondary node name. This parameter can
be used to specify a specific remote node, a generic value for matching remote node names (using
pattern matching), or a list of multiple remote node names. The secondary node name typically contains the 1–16 character remote Connect:Direct node name, but can be any string up to 256 alphanumeric characters long. You can also specify a remote node name as an IP address or hostname and a port number. |
remote node specification | generic |
(list) remote node specification—Identifies a specific remote node name. generic—Specifies a nonspecific value for the remote node name. This generic value, containing pattern-matching characters, evaluates to a list of zero or more remote node names. list—Specifies a list of remote node specifications. Enclose the list in parentheses, and separate each value with a comma. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| srcfile | Selects statistics based on a source file name. This parameter can be abbreviated as srcf. | srcf=/path/file name For example: sel stat srcf=/sci/accounting/june.payroll; This parameter can be used in combination with the destfile parameter to select statistics based on a source file name and a destination file name, for example: sel stat srcf=/sci/accounting/june.payroll dest=/sci/payroll/june.payroll |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| startt | Selects records produced both at and since the specified time. The date or day and time are positional. If you do not specify date or day, a comma must precede time. | [date | day] [, hh:mm:ss [am|pm]] date—Specifies the day (dd), month (mm), and year (yy), which you can code as mm/dd/yyyy or mm-dd-yyyy. If you only specify date, the time defaults to 00:00:00. The current date is the default. day—Specifies the day of the week. Values are today, monday, tuesday, wednesday, thursday, friday, saturday, and sunday. hh:mm:ss [am | pm]—Specifies the time of day in hours (hh), minutes (mm), and seconds (ss). You can specify the hour in either 12- or 24-hour format. If you use 12-hour format, then you must specify am or pm. The default is the 24-hour format. The default value is 00:00:00, which indicates midnight. If you specify only the day value, the time defaults to 00:00:00. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| stopt | Specifies that Connect:Direct searches for statistics records up to and including the designated date, day, and time positional parameters. If you do not specify date or day, a comma must precede time. | [date | day] [, hh:mm:ss [am|pm]] date—Specifies the day (dd), month (mm), and year (yy), which you can code as mm/dd/yyyy or mm-dd-yyyy. If you only specify date, the time defaults to 00:00:00. The current date is the default. day—Specifies the day of the week. Values are today, monday, tuesday, wednesday, thursday, friday, saturday, and sunday. hh:mm:ss [am | pm]—Specifies the time of day in hours (hh), minutes (mm), and seconds (ss). You can specify the hour in either 12- or 24-hour format. If you use 12-hour format, then you must specify am or pm. The default is the 24-hour format. The default value is 00:00:00, which indicates midnight. If you specify only the day value, the time defaults to 00:00:00. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| submitter | Locate the statistics records to select by the node specification (the Connect:Direct node name) and user ID of the Process owner. The character length of the parameter is unlimited. | (node specification, userid) | generic | (list) node specification, userid—Specifies the node specification (the Connect:Direct node name) and user ID. generic—Specifies a nonspecific value for node specification and user ID. This generic value, containing pattern-matching characters, evaluates to a list of zero or more node specifications and user IDs. list—Specifies a list of node specification and user ID pairs. Enclose the list in parentheses, and separate each value with a comma. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| detail | Specifies the type of report (short or detailed) that Connect:Direct generates for the selected Processes. | yes | no yes—Generates a detailed report. no—Generates a short report. This is the default. |
Receiving Responses Using ndmapi_recvresp() or ndmapi_recvresp_c()
Use ndmapi_recvresp() or ndmapi_recvresp_c() to receive responses that are associated with a previous command sent from the application. Following is the format for ndmapi_recvresp() or ndmapi_recvresp_c():
int32 ndmapi_recvresp ERROR_H error int32 * resp_length, char * resp_buffer,
int32 * resp_moreflag
Following are the parameters for ndmapi_recvresp() or ndmapi_recvresp_c():
| Parameter | Description | Value |
|---|---|---|
| error | A pointer to a IBM Connect:Direct-defined structure that contains error information or status information. | Pointer |
| resp_length | A pointer to the length, in bytes, of the application buffer to receive the response. The API sets this parameter to the number of bytes returned. | Pointer to number of bytes returned or 0 if you no longer want to receive responses. Setting this field to zero purges all queued responses. |
| resp_buffer | A pointer to the application buffer that receives the command
or submit response. This buffer should allocate 4096 bytes. The format of resp_buffer is a free-form text record structure. Field names are four characters long and all uppercase. The data can be any length and can include blanks. The structure is: field name=data | field name=data |... For example: SUBM = username | PNUM = 12 | PNAM = proc1 |... |
A local buffer, with a size greater than or equal to that set
by resp_length and filled in by
ndmapi_recvresp() or ndmapi_recvresp_c().
The CLI passes the resp_buffer to AWK for parsing. Valid values include: ADMN—IBM Connect:Direct administrator name ADPH—IBM Connect:Direct administrator phone number CCOD—Completion code CKPT—Checkpoint CLAS—Class CSDS—Copy step start timestamp CSPE—Secure+ enabled indicator CSPP—Secure+ protocol CSPS—Secure+ cipher suite |
|
DBLW—Destination file blocks received DBYW—Bytes written DBYX—Bytes received DCOD—Destination completion code DDAY—Submit date DDS1—Destination disposition 1 DDS2—Destination disposition 2 DDS3—Destination disposition 3 DESC—IBM Connect:Direct administrator description DFIL—Destination file DLDR—Download directory restriction DMSG—Destination message ID DNVL—Destination number of volumes DRCW—Records written DRUX—RUs received DVCN—Destination file volume count DVOL—Destination volume array DVSQ—Destination file volume sequence number ECMP—Extended compression ON or OFF ECPR—Extended compression percentage ECTP—Extended compression type ETMC—Ela[sed clock time ETMK—Elapsed kernal time ETMU—Elapsed user time FROM—Copy sending node |
||
|
ICRC—CRC indicator LCCD—Local completion code LCLP—Local IP address and port number LKFL—Link fail LMSG—Local message ID LNOD—Local node MSGI—Message ID MSGT—Message text MSST—Short text OCCD—Other completion code OERR—Other node in error OMSG—Other message ID PACC—PNODE account PCRC—CRC indicator PFIL—Process file PNAM—Process name PNOD—PNODE PNUM—Process number PPMN—PDS member name PRTY—Priority QUEU—Queue RECC—Record category RECI—Record ID RETA—Retain Process RMTP—Remote IP address and port number RSTR—Process restarted RUSZ—RU Size SACC—SNODE account SBID—Submitter node ID SBLR—Source file blocks sent |
||
|
SBND—Submitter node name SBYR—Bytes read SBYX—Bytes sent SCMP—Standard compression SCOD—Source completion code SCPR—Standard compression percentage SDDY—Schedule date SDS1—Source disposition 1 SDS2—Source disposition 1 SDS2—Source disposition 2 SDS3—Source disposition 3 SELA—Elapsed time of the event SFIL—Source file SFSZ—source file size SMSG—Source message ID SNAM—Step name SNOD—SNODE SNVL—Source number of volumes SOPT—SYSOPTS record SRCR—Records read SRUX—RUs sent SSTA—Start time of the event
Note: SSTA is deprecated and shall be
removed in the future release. Use use STRT instead.
STAR—Start log date/time for record STAT—Process status STDL—Copy termination record (CTRC) log time STIM—Schedule time STOP—Stop time of the event
Note: STOP is deprecated and shall be
removed in the future release. Use STPT instead.
STPT—Stop time of the event STRT—Start time of the event |
||
|
SUBM—Submitter ID SUBN—Submitter node SUMM—Summary output selector SVCN—Source file volume count SVOL—Source volume array SVSQ—Source file volume sequence number TIME—Submit time TZDI—Local time zone delta from GMT XLAT—Translation ZLVL—Zlib compress level Zlib—memory level Zlib—window size |
||
| resp_moreflag | Indicates that more ndmapi_recvresp() or ndmapi_recvresp_c() calls must be issued for more information. This flag occurs only on select process and select statistics commands. | None |
The ndmapi_recvresp() or ndmapi_recvresp_c() function has the folliowing return codes:
| Return Code | Description |
|---|---|
| NDM_NO_ERROR |
The function completed successfully. |
| NDM_ERROR |
An error occurred. Consult the error structure for detailed error status. |
| TRUNCATED |
Data is truncated because the receiving buffer is too small. |
Following is a sample ndmapi_recvresp() function:
int32 rc, resp_length;
int32 resp_moreflag;
char resp_buffer[makbuf];
rc= ndmapi_recvresp (error,
&resp_length,
resp_buffer,
&resp_moreflag
);