$Curfile: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 10: | Line 10: | ||
<p>You cannot use an IN clause that includes both MEMBER and $CURFILE. See [[Files, groups, and reference context#IN GROUP MEMBER clause|IN GROUP MEMBER clause]] for more information about the IN GROUP MEMBER clause. </p> | <p>You cannot use an IN clause that includes both MEMBER and $CURFILE. See [[Files, groups, and reference context#IN GROUP MEMBER clause|IN GROUP MEMBER clause]] for more information about the IN GROUP MEMBER clause. </p> | ||
==See also== | |||
<ul> | |||
<li>The <var>[[CURFILE parameter|CURFILE]]</var> parameter; <code>$view('CURFILE')</code> returns the same value as <code>$Curfile</code>. | |||
<li>The <var>[[DEFCNTX parameter|DEFCNTX]]</var> parameter (which is quite similar to <var>CURFILE</var> but provides more information) and the <var>[[APDFCNTX parameter|APDFCNTX]]</var> parameter. | |||
<li>The <var>[[DEFAULT command|DEFAULT]]</var> and <var>[[OPEN file command|OPEN]]</var> commands, which reset the file/group context. | |||
<li>The <var>[[OPENC command|OPENC</var>]] command does <b>not</b> reset the file/group context. | |||
<li>The <var>[[CLOSE command|CLOSE</var>]] command, which might reset the file/group context. | |||
</ul> | |||
[[Category:SOUL $functions]] | [[Category:SOUL $functions]] |
Revision as of 20:45, 7 April 2015
The $CURFILE function returns the name of the file from which the current record has been selected. If the file is remote, $CURFILE also returns the location of the file (in the form filename AT location). $CURFILE takes no arguments.
You can use $CURFILE in two places:
- In arithmetic and PRINT specifications within a record loop
- In an IN clause to override a default file or group in a STORE RECORD statement
See $CURFILE and $UPDATE functions for a discussion of default files and for examples of requests using $CURFILE.
You cannot use an IN clause that includes both MEMBER and $CURFILE. See IN GROUP MEMBER clause for more information about the IN GROUP MEMBER clause.
See also
- The CURFILE parameter;
$view('CURFILE')
returns the same value as$Curfile
. - The DEFCNTX parameter (which is quite similar to CURFILE but provides more information) and the APDFCNTX parameter.
- The DEFAULT and OPEN commands, which reset the file/group context.
- The OPENC command does not reset the file/group context.
- The CLOSE command, which might reset the file/group context.