Display a list of the OPSLOG records with attributes that are defined in the search query from the specified OPSLOG. This command is only available when connected to the OPS/MVS REST API server.
Usage
zowe ops show records [options]
Options
-
--logName | --log (string)
- The name of the OPSLOG to search. If 'logName' is not specified, the current live OPSLOG is used. The value 'LIVE' is also valid to select the currently live OPSLOG.
-
--findString | --fs (string)
- A text string to search for in the OPSLOG column specified by 'findColumnName' (defaults to TEXT). The records that are returned are the next or previous records in OPSLOG that match your 'findString', in the direction specified by 'findDirection'. The length of the string cannot exceed 80 characters.
-
--findDirection | --fd (string)
- When 'findString' is specified, controls the direction in which OPSLOG is searched. Valid values are FIRST, LAST, NEXT, PREV. For NEXT and PREV, the search starts from the record specified by the 'msgNoStart' or 'utcStartTime' parameters. For FIRST and LAST, the search starts from the first or last record in OPSLOG. Default is NEXT. If 'findString' is not specified, this parameter is ignored and the direction of the search is controlled by the 'direction' parameter (defaults to FORWARD).
-
--findColumnName | --fcn (string)
- When 'findString' is specified, the OPSLOG column to search for the specified 'findString'. Valid values are COLOR, EVENT, JOBNAME, MSGID, SYSNAME, TEXT and USER. The default is TEXT. If 'findString' is not specified, this parameter is ignored.
-
--findMaxEvents | --fme (string)
-
--findRangeStart | --frs (string)
- When 'findString' is specified and 'findColumnName' is TEXT, specifies the start of a range of text columns within the OPSLOG TEXT column that is specified by 'findColumnName'. Must be less than or equal to the value of 'findRangeEnd'. The search for the string that is specified by 'findString' is restricted to this range of text columns. Valid ranges are within columns 1 to 128. If 'findString' is not specified, this parameter is ignored.
-
--findRangeEnd | --fre (string)
- When 'findString' is specified and 'findColumnName' is TEXT and 'findColumnName' is TEXT, specifies the end of a range of text columns within the OPSLOG TEXT column that is specified by 'findColumnName'. Must be greater than or equal to the value of 'findRangeStart'. The search for the string that is specified by 'findString' is restricted to this range of text columns. Valid ranges are within columns 1 to 128. If 'findString' is not specified, this parameter is ignored.
-
--findStringIsPrefix | --fsip (string)
- When 'findString' is specified, specifies whether or not 'findString' is used as a prefix when searching one of these OPSLOG columns, specified by 'findColumnName': JOBNAME, MSGID, SYSNAME, and USER. To search for the prefix specified by 'findString' in text column one of the specified OPSLOG column, specify 'true'. To search for an exact match between 'findString' and the entire contents of the specified OPSLOG column, specify 'false'. If 'findString' is not specified, this parameter is ignored. Note: This parameter is also ignored when searching these OPSLOG columns: COLOR, EVENT, and TEXT. When searching the COLOR or EVENT columns, the specified 'findString' must match the entire contents of the column. When searching the TEXT column, the presence of 'findString' anywhere within column is considered a match.
-
--maxRecords | --mr (string)
-
--direction | --dir (string)
- When 'findString' is not specified, controls the direction in which OPSLOG is searched. Valid values are FORWARD and BACKWARD. Default is FORWARD. The search starts from the record specified by 'msgNoStart' or 'utcStartTime'. To search FORWARD starting from the first record in OPSLOG, specify zero for 'msgNoStart'. To search BACKWARD starting from the last record in OPSLOG, specify zero for 'msgNoStart'. If 'findString' is specified, this parameter is ignored and the direction of the search is controlled by the 'findDirection' parameter (defaults to NEXT).
-
--msgNoStart | --mns (string)
- Indicates the location in OPSLOG from which to start this search request. This is the absolute message sequence number of a record in OPSLOG that is assigned by OPS/MVS and appears in the MSGNO column of an OPSLOG display. This number is not a relative position in the log. Valid range is 0 to 4294967295. (The next record in OPSLOG after the record with the sequence number 4294967295 is assigned the sequence number 1.) This parameter is mutually exclusive with the 'utcStartTime' parameter. Note: For special use cases of the value 0, see the 'direction' parameter. If no record in OPSLOG has the specified message number, the search starts from the message with the message number closest to the specified number. When searching FORWARD, NEXT, or FIRST, the closest record going forward in time is used. When searching BACKWARD, PREV, or LAST, the closest record going backward in time is used.
-
--utcStartTime | --ust (string)
- Indicates the location in OPSLOG from which to start this search request. This is a date and time specified as Universal Coordinated Time (UTC) in the format "yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ". This parameter is mutually exclusive with the 'msgNoStart' parameter. If no record in OPSLOG has the specified timestamp, the search starts from the message with the timestamp closest to the specified timestamp. When searching FORWARD, NEXT, or FIRST, the closest record going forward in time is used. When searching BACKWARD, PREV, or LAST, the closest record going backward in time is used.
-
--format | -f (string)
-
Format of the displayed output.
Default value: namevalue
Allowed values: namevalue, namevaluecolor, csv, json
OPS/MVS Web Services / REST API connection options
-
--user (string)
- Your z/OS user name that is used to authenticate to OPS/MVS Web Services / REST API.
-
--password | --pass (string)
- Your z/OS password that is used to authenticate to OPS/MVS Web Services / REST API.
-
--host (string)
- The hostname of the server where OPS/MVS Web Services / REST API is running.
-
--port | -p (number)
- The port number for OPS/MVS Web Services / REST API.
-
--reject-unauthorized | --ru (boolean)
-
--protocol | --prot (string)
-
The protocol that is used for connecting to OPS/MVS Web Services / REST API.
Default value: https
Allowed values: http, https
-
--subsystem | --subs (string)
-
--rest-api | --ra (boolean)
-
--base-path | --bp (string)
- NOTE: This parameter can only be used with the REST API server. Specifies the base path for your Zowe API Mediation Layer instance. Specify this option to prepend the base path to all resources when making REST requests. Only specify this option if you are using an Zowe API Mediation Layer.
Profile Options
Base Connection Options
-
--token-type | --tt (string)
- The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'.
-
--token-value | --tv (string)
- The value of the token to pass to the API.
-
--cert-file (local file path)
-
The file path to a certificate file to use for authentication.
Note: The CLI does not support certificate files that require a password. For more information, search Troubleshooting PEM Certificates in Zowe Docs.
-
--cert-key-file (local file path)
- The file path to a certificate key file to use for authentication
Examples
-
Show up to 100 records for the live OPSLOG for the "OPSS" subsystem:
zowe ops show records --subsystem OPSS
-
Show up to 50 records matching the message ID IEF403I for OPSLOG1 on the "OPSS" subsystem:
zowe ops show records --subsystem OPSS --logName OPSLOG1 --maxRecords 50 --findString IEF403I --findColumnName MSGID
-
Show up to 50 records matching the message ID IEF403I for OPSLOG1 on the "OPSS" subsystem with shorthand parameters:
zowe ops show records --subs OPSS --log OPSLOG --mr 50 --fs IEF403I --fcn MSGID