DEFCNTX and APDFCNTX parameters: Difference between revisions
Line 20: | Line 20: | ||
These parameters provide information about the default file or group context; that is, which file or group is used when a file-based operation is performed without the qualification provided by the <var>[[Basic SOUL statements and commands#IN clauses|IN]] clause. | These parameters provide information about the default file or group context; that is, which file or group is used when a file-based operation is performed without the qualification provided by the <var>[[Basic SOUL statements and commands#IN clauses|IN]] clause. | ||
<var>DEFCNTX</var> shows the default context when the request was compiled. | <ul> | ||
<li><var>DEFCNTX</var> shows the default context when the request was compiled: <br /> | |||
the most recent successful OPEN statement, OPEN command, or DEFAULT command, if the file or group is open. | |||
<p>For a [[New (Daemon constructor)|daemon]] object, DEFCNTX returns the initial value of the file or group open on the master thread if OpenAll is True.</p> | |||
<p>The first word or two returned by <var>DEFCNTX</var> is the type of context: <code>FILE</code>, <code>TEMP GROUP</code>, or <code>PERM GROUP</code>. The last word returned by <var>DEFCNTX</var> is the name of the file or group.</p> | |||
If there is no default context, the value of <var>DEFCNTX</var> is the null string. | |||
</li> | |||
<li> | |||
<var>APDFCNTX</var> shows the default context when the Apsy command was issued. | <var>APDFCNTX</var> shows the default context when the Apsy command was issued. | ||
<p class="note"><b>Note:</b> If the default context when an Apsy command was issued is the same as one of the files or groups in the Apsy's definition, <var>APDFCNTX</var> returns the null string. | <p class="note"><b>Note:</b> If the default context when an Apsy command was issued is the same as one of the files or groups in the Apsy's definition, <var>APDFCNTX</var> returns the null string. | ||
</p> | </p> | ||
The first word or two returned by <var>APDFCNTX</var> is the type of context: <code>FILE</code>, <code>TEMP GROUP</code>, or <code>PERM GROUP</code>. The last word returned by <var>APDFCNTX</var> is the name of the file or group. | |||
<p>If there is no default context, the value of <var>APDFCNTX</var> is the null string.</p></li> | |||
is the type of context: <code>FILE</code>, | |||
<code>TEMP GROUP</code>, or <code>PERM GROUP</code>. | |||
is the | |||
</ul> | </ul> | ||
Revision as of 00:00, 13 July 2017
Default file or group context
and
Default file or group context when APSY command issued
Summary
- Default value
- None
- Parameter type
- User
- Where set
- View-only
- Related products
- All
- Introduced
- Model 204 V7.4 or earlier
Description
These parameters provide information about the default file or group context; that is, which file or group is used when a file-based operation is performed without the qualification provided by the IN clause.
- DEFCNTX shows the default context when the request was compiled:
the most recent successful OPEN statement, OPEN command, or DEFAULT command, if the file or group is open.For a daemon object, DEFCNTX returns the initial value of the file or group open on the master thread if OpenAll is True.
The first word or two returned by DEFCNTX is the type of context:
FILE
,TEMP GROUP
, orPERM GROUP
. The last word returned by DEFCNTX is the name of the file or group.If there is no default context, the value of DEFCNTX is the null string.
-
APDFCNTX shows the default context when the Apsy command was issued.
Note: If the default context when an Apsy command was issued is the same as one of the files or groups in the Apsy's definition, APDFCNTX returns the null string.
The first word or two returned by APDFCNTX is the type of context:
FILE
,TEMP GROUP
, orPERM GROUP
. The last word returned by APDFCNTX is the name of the file or group.If there is no default context, the value of APDFCNTX is the null string.
DEFCNTX and APDFCNTX are very similar to the CURFILE parameter, with these differences:
- CURFILE returns a null string if the default context is a group.
- CURFILE is affected by the IN clause prior to a BEGIN command and can be affected by the In clause prior to many SOUL statements. DEFCNTX and APDFCNTX are not affected by (either form of) the IN clause.
Usage
In versions 7.4 and 7.5 of Model 204, DEFCNTX and APDFCNTX are only available using the $View function. For example:
print $view('DEFCNTX')
- As of version 7.6, they are available with the VIEW command.
- In version 7.4, they were implemented as part of maintenance: Early Warning 740EW159.
- In version 7.5, they were implemented as part of maintenance: zap 75Z054.