DEFCNTX and APDFCNTX parameters: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<var>DEFCNTX</var> {{Template:DEFCNTX parameter subtitle}}
<var>DEFCNTX</var> {{Template:DEFCNTX parameter subtitle}}
<var>APDFCNTX</var> {{Template:APDFCNTX parameter subtitle}}
<var>APDFCNTX</var> {{Template:APDFCNTX parameter subtitle}}
 
==Summary==
==Summary==
<dl>
<dl>
Line 15: Line 16:
<dd><var class="product">Model 204 V7.4</var> or earlier
<dd><var class="product">Model 204 V7.4</var> or earlier
</dl>
</dl>
 
==Description==
==Description==
These parameters are better than using <code>$View('CURFILE')</code> because:
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>[[IN clause|IN]] clause.
They are very similar to the <var>[[CURFILE parameter|CURFILE]]</var> parameter, with these differences:
<ul>
<ul>
<li><code>CURFILE</code> returns a null string if the default context is a group.
<li><var>CURFILE</var> returns a null string if the default context is a group.
<li><code>CURFILE</code> is affected by the <var>IN</var> clause prior to a <var>Begin</var> command and
<li>The first word or two returned by <var>DEFCNTX</var> and <var>APDFCNTX</var>
can be affected by the <var>In</var> clause prior to many SOUL statements.
is the type of context: <code>FILE</code>,
<code>TEMP GROUP</code>, or <code>PERM GROUP</code>.
<li>The last word returned by <var>DEFCNTX</var> and <var>APDFCNTX</var>
is the name of the file or group.
<li><var>CURFILE</var> is affected by the <var>IN</var> clause prior to a <var>Begin</var> command and
can be affected by the <var>In</var> clause prior to many SOUL statements; <var>DEFCNTX</var> and
<var>APDFCNTX</var> are not affected by (either form of) the <var>IN</var> clause.
<li><var>DEFCNTX</var> provides information about the default context when the request was compiled.
<li><var>APDFCNTX</var> provides information not about the default context when the request was compiled, but
<li><var>APDFCNTX</var> provides information not about the default context when the request was compiled, but
the 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>
</ul>
</ul>
 
If there is no default context, the value of the parameters is the null string.
If there is no default context, the value of the parameters is the null string.
   
   
Otherwise <code>$View('DEFCNTX')</code> returns the type of context (<code>FILE</code>, <code>TEMP GROUP</code>, or
<blockquote class="note"><b>Notes:</b> In versions 7.4 and 7.5, these parameters are only available using the <var>$View</var> function, for example:
<code>PERM GROUP</code>) followed by the file or group name, with trailing blanks
removed.
<code>$View('APDFCNTX')</code> returns the same information based on the default
context when the APSY was entered, unless that is the same as one of the files or groups in the subsystem's definition; in that case, the null string is returned.
<blockquote class="note"><b>Notes:</b> In versions 7.4 and 7.5, these parameters are only available using the <code>$View</code> function, for example:
<p class="code">print $view('DEFCNTX')</p>
<p class="code">print $view('DEFCNTX')</p>
<ul>
<ul>
<li>Prior to version 7.6, they are not available with the <var>VIEW</var> command.
<li>Prior to version 7.6, they are not available with the <var>VIEW</var> command.
<li>In version 7.4, they were implemented as part of maintenance - Early Warning 740EW159.
<li>In version 7.4, they were implemented as part of maintenance - Early Warning 740EW159.
<li>In version 7.4, they were implemented as part of maintenance - zap 75Z054.
<li>In version 7.5, they were implemented as part of maintenance - zap 75Z054.
</ul>
</ul>
</blockquote>
</blockquote>
 
[[Category:User parameters]]
[[Category:User parameters]]
[[Category:Parameters]]
[[Category:Parameters]]

Revision as of 20:27, 7 April 2015

DEFCNTX Default file or group context

APDFCNTX 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.

They are very similar to the CURFILE parameter, with these differences:

  • CURFILE returns a null string if the default context is a group.
  • The first word or two returned by DEFCNTX and APDFCNTX is the type of context: FILE, TEMP GROUP, or PERM GROUP.
  • The last word returned by DEFCNTX and APDFCNTX is the name of the file or 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.
  • DEFCNTX provides information about the default context when the request was compiled.
  • APDFCNTX provides information not about the default context when the request was compiled, but the 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.

If there is no default context, the value of the parameters is the null string.

Notes: In versions 7.4 and 7.5, these parameters are only available using the $View function, for example:

print $view('DEFCNTX')

  • Prior to version 7.6, they are not 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.