$View: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Mlarocca moved page $VIEW to $View: Lower case change)
(Add column "Remarks" to table 27-6.)
Line 73: Line 73:
</table>
</table>
<p>For example:</p>
<p>For example:</p>
<p class="code">$VIEW ('FIWHEN')
<p class="code">$VIEW ('FIWHEN')</p>
</p>
<p>returns:</p>
<p>returns:</p>
<p class="code">FIWHEN  94.257 SEP 14 16.40.45. DATE AND TIME FISTAT WAS RESET
<p class="code">FIWHEN  94.257 SEP 14 16.40.45. DATE AND TIME FISTAT WAS RESET</p>
</p>
<b>Syntax for viewing statistics fields</b>
<b>Syntax for viewing statistics fields</b>
<p>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 <var class="product">Model&nbsp;204</var> System Managers Guide for the name of the statistics fields.</p>
<p>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 <var class="product">Model&nbsp;204</var> System Managers Guide for the name of the statistics fields.</p>
<p class="code">$VIEW(category, field-to-return)
<p class="code">$VIEW(category, field-to-return)</p>
</p>
<p>Where the following categories and fields are valid:</p>
<p>Where the following categories and fields are valid: </p>
<table>
<table>
<caption>Valid categories and fields with $VIEW</caption>
<caption>Valid categories and fields with $VIEW</caption>
<tr class="head">
<tr class="head">
<th>
<th>Category</th>
Category</th>
<th>Statistics field-to-return</th>
<th>Statistics field-to-return</th>
<th>
<th>Equivalent-to or returns-value-of</th>
Equivalent-to or returns-value-of</th>
<th>Remarks</th>
</tr>
</tr>
<tr>
<tr>
Line 96: Line 92:
<td>'USERID'</td>
<td>'USERID'</td>
<td>[[$Userid]]</td>
<td>[[$Userid]]</td>
<td>Padded with blank spaces to 10 bytes</td>
</tr>
</tr>
<tr>
<tr>
Line 101: Line 98:
<td>'ACCOUNT'</td>
<td>'ACCOUNT'</td>
<td>[[$Account]]</td>
<td>[[$Account]]</td>
<td>Padded to 10 bytes</td>
</tr>
</tr>
<tr>
<tr>
Line 106: Line 104:
<td>'SUBSYSTEM'</td>
<td>'SUBSYSTEM'</td>
<td>$SUBSYS with no argument</td>
<td>$SUBSYS with no argument</td>
<td>Padded to 10 bytes</td>
</tr>
</tr>
<tr>
<tr>
Line 111: Line 110:
<td>'LAST'</td>
<td>'LAST'</td>
<td>LAST=field</td>
<td>LAST=field</td>
<td>EVAL etc.</td>
</tr>
</tr>
<tr>
<tr>
Line 116: Line 116:
<td>'PROC-FILE'</td>
<td>'PROC-FILE'</td>
<td>Current procedure file</td>
<td>Current procedure file</td>
<td>Padded to 8 bytes</td>
</tr>
</tr>
<tr>
<tr>
<td>'SLSTATS'</td>
<td>'SLSTATS'</td>
<td>'PROC'</td>
<td>'PROC'</td>
<td>Current procedure </td>
<td>Current procedure</td>
<td>Variable length, or truncated to 21 bytes</td>
</tr>
</tr>
<tr>
<tr>
Line 126: Line 128:
<td>'sl statistics name'</td>
<td>'sl statistics name'</td>
<td>Statistics field</td>
<td>Statistics field</td>
<td>&nbsp;</td>
</tr>
</tr>
<tr>
<tr>
Line 131: Line 134:
<td>'system stat name'</td>
<td>'system stat name'</td>
<td>Statistics field</td>
<td>Statistics field</td>
<td>&nbsp;</td>
</tr>
</tr>
<tr>
<tr>
Line 136: Line 140:
<td>'DKBM stat name'</td>
<td>'DKBM stat name'</td>
<td>Statistics field</td>
<td>Statistics field</td>
<td>&nbsp;</td>
</tr>
</tr>
<tr>
<tr>
Line 141: Line 146:
<td>'user stat name'</td>
<td>'user stat name'</td>
<td>Statistics field</td>
<td>Statistics field</td>
<td>&nbsp;</td>
</tr>
</tr>
<tr>
<tr>
Line 146: Line 152:
<td>'conflict ctr name'</td>
<td>'conflict ctr name'</td>
<td>Statistics field</td>
<td>Statistics field</td>
<td>&nbsp;</td>
</tr>
</tr>
</table>
</table>
Line 151: Line 158:
<p>The time related Since Last statistics fields, CNCT, CPU, SCHDCPU, and STCPU, are not valid during evaluation time.</p>
<p>The time related Since Last statistics fields, CNCT, CPU, SCHDCPU, and STCPU, are not valid during evaluation time.</p>
<p>Specifying an invalid statistics field name returns a null value with the message:</p>
<p>Specifying an invalid statistics field name returns a null value with the message:</p>
<p class="code">M204.1463: INVALID PARAMETER: fieldname
<p class="code">M204.1463: INVALID PARAMETER: fieldname</p>
</p>
<b>Syntax to view the size and use of journal and checkpoint streams</b>
<b>Syntax to view the size and use of journal and checkpoint streams</b>
<p>The format of $VIEW for the use and size of journal and checkpoint streams is:</p>
<p>The format of $VIEW for the use and size of journal and checkpoint streams is:</p>
<p class="code">$VIEW('CCAJRNL'|'CCAJLOG'|'CHKPOINT'|'CHKPNTS')
<p class="code">$VIEW('CCAJRNL'|'CCAJLOG'|'CHKPOINT'|'CHKPNTS')</p>
</p>
<p>Specify the following:</p>
<p>Specify the following:</p>
<p class="code">%STRING = $VIEW('CCAJRNL'|'CCAJLOG'|'CHKPOINT'|'CHKPNTS')
<p class="code">%STRING = $VIEW('CCAJRNL'|'CCAJLOG'|'CHKPOINT'|'CHKPNTS')</p>
</p>
<p>$VIEW returns a string that describes the usage of the specified stream with the following character format:</p>
<p>$VIEW returns a string that describes the usage of the specified stream with the following character format:</p>
<table>
<table>
<tr>
<tr>
<td>Describes </td>
<td>Describes</td>
<td>LENGTH </td>
<td>LENGTH</td>
<td>Displays</td>
<td>Displays</td>
</tr>
</tr>

Revision as of 16:52, 15 August 2014

The $VIEW function returns:

  • The value of a parameter (system, file, or user) to the request
  • File parameters
  • While $VIEW works for all viewable parameters in local context, it does not work for some file parameters in remote context.

  • Size and use of journal and checkpoint streams

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:
  • $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.

  • name overrides the default file or group context for the function. The format for this argument is:
  • [[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:

Valid categories and fields with $VIEW
Category Statistics field-to-return Equivalent-to or returns-value-of Remarks
'SLSTATS' 'USERID' $Userid Padded with blank spaces to 10 bytes
'SLSTATS' 'ACCOUNT' $Account Padded to 10 bytes
'SLSTATS' 'SUBSYSTEM' $SUBSYS with no argument Padded to 10 bytes
'SLSTATS' 'LAST' LAST=field EVAL etc.
'SLSTATS' 'PROC-FILE' Current procedure file Padded to 8 bytes
'SLSTATS' 'PROC' Current procedure Variable length, or truncated to 21 bytes
'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