$View: Difference between revisions
(Automatically generated page update) |
No edit summary |
||
Line 100: | Line 100: | ||
<td>'SLSTATS'</td> | <td>'SLSTATS'</td> | ||
<td>'ACCOUNT'</td> | <td>'ACCOUNT'</td> | ||
<td>[[$ | <td>[[$Account]]</td> | ||
</tr> | </tr> | ||
<tr> | <tr> |
Revision as of 20:04, 11 June 2014
The $VIEW function returns:
- The value of a parameter (system, file, or user) to the request
- File parameters
- Size and use of journal and checkpoint streams
While $VIEW works for all viewable parameters in local context, it does not work for some file parameters in remote context.
Syntax to view a parameter value
The format of the $VIEW function to view parameter values is:
$VIEW(parameter[,name])
where:
- parameter is a character string that represents the name of a viewable Model 204 parameter or other information. For example:
- name overrides the default file or group context for the function. The format for this argument is:
$VIEW('ERASE')
returns a value of @ if the ERASE parameter is set to the character @. If the parameter name is invalid or the user is not authorized to display parameter values for the file, a null string is returned.
[[FILE | [PERM | TEMP] GROUP] name | $CURFILE | $UPDATE] [AT location]
If this argument is omitted or null, the default context is the context of the statement containing the function. Thus, a default context is required for this function.
You can specify $CURFILE as the name argument in place of a file/group name.
Viewing file-specific information
In addition to viewable parameters, the following file-specific information can also be viewed with $VIEW:
Name used with $VIEW | Description |
---|---|
DTSLBOPR |
Date and time transaction was backed out during roll forward (for TBO files) Date and time partial transaction was applied during roll forward (for non-TBO files) |
DTSLCHKP | Date and time of last checkpoint rolled back to. Will be blank if the file has also been rolled forward. |
DTSLRCVY | Date and time of last recovery |
DTSLUPDT | Date and time of last update |
DTSLDKWR | Date and time of last DKWR |
DTSLRFWD | Date and time of last roll forward |
FIWHEN | Date and time FISTAT was reset |
FIWHO | Terminal ID that reset FISTAT |
For example:
$VIEW ('FIWHEN')
returns:
FIWHEN 94.257 SEP 14 16.40.45. DATE AND TIME FISTAT WAS RESET
Syntax for viewing statistics fields
The first argument is the category, SLSTATS, SYSSTATS, or USRSTATS. The second argument is the name of the Statistic field to return. See the Rocket Model 204 System Managers Guide for the name of the statistics fields.
$VIEW(category, field-to-return)
Where the following categories and fields are valid:
Category | Statistics field-to-return | Equivalent-to or returns-value-of |
---|---|---|
'SLSTATS' | 'USERID' | $USERID |
'SLSTATS' | 'ACCOUNT' | $Account |
'SLSTATS' | 'SUBSYSTEM' | $SUBSYS with no argument |
'SLSTATS' | 'LAST' | LAST=field |
'SLSTATS' | 'PROC-FILE' | Current procedure file |
'SLSTATS' | 'PROC' | Current procedure |
'SLSTATS' | 'sl statistics name' | Statistics field |
'SYSSTATS' | 'system stat name' | Statistics field |
'SYSSTATS' | 'DKBM stat name' | Statistics field |
'USRSTATS' | 'user stat name' | Statistics field |
'USRSTATS' | 'conflict ctr name' | Statistics field |
Usage
The time related Since Last statistics fields, CNCT, CPU, SCHDCPU, and STCPU, are not valid during evaluation time.
Specifying an invalid statistics field name returns a null value with the message:
M204.1463: INVALID PARAMETER: fieldname
Syntax to view the size and use of journal and checkpoint streams
The format of $VIEW for the use and size of journal and checkpoint streams is:
$VIEW('CCAJRNL'|'CCAJLOG'|'CHKPOINT'|'CHKPNTS')
Specify the following:
%STRING = $VIEW('CCAJRNL'|'CCAJLOG'|'CHKPOINT'|'CHKPNTS')
$VIEW returns a string that describes the usage of the specified stream with the following character format:
Describes | LENGTH | Displays |
In use DDNAME | 8 | Alphanumeric characters |
Percentage used | 4 | Integer with percentage sign |
Maximum size | 9 | Number of tracks |
Current size | 9 | Number of tracks |
Unused spaces | 2 | Number of tracks |
VOLSER | 6 | Alphanumeric characters |
Separating back slash | 1 | A back slash |
Data set name | Variable | Data set name |
Separating back slash | 1 | A back slash |
Generation number | Variable | Generation number with a leading plus sign |
You must ensure that the %variable being used to hold the requested information is defined as STRING LEN 80 or greater, for example:
%STRING IS STRING LEN 80 BEGIN %STRING = $VIEW('CCAJRNL') PRINT %STRING END CCAJRNL 0% 37 0 0SU000\OHIO1.ONLINE.JOURNAL