$Curfile: Difference between revisions
Jump to navigation
Jump to search
m (minor cleanup) |
m (→$CURFILE and $UPDATE functions: use mixed case) |
||
Line 9: | Line 9: | ||
</ul> | </ul> | ||
<p> | <p> | ||
See [[Files, groups, and reference context#$ | See [[Files, groups, and reference context#$Curfile and $Update functions|$Curfile and $Update functions]] for a discussion of default files and for examples of requests using <var>$Curfile</var>. </p> | ||
<p> | <p> | ||
You cannot use an <var>In</var> clause that includes both <var>Member</var> and <var>$Curfile</var>. See [[Files, groups, and reference context#IN GROUP MEMBER clause|IN GROUP MEMBER clause]] for more information about the <var>In Group Member</var> clause. </p> | You cannot use an <var>In</var> clause that includes both <var>Member</var> and <var>$Curfile</var>. See [[Files, groups, and reference context#IN GROUP MEMBER clause|IN GROUP MEMBER clause]] for more information about the <var>In Group Member</var> clause. </p> |
Revision as of 22:07, 13 May 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.
Note: It is recommended that you use
$Curfile
rather than$View('CURFILE')
; in some circumstances $Curfile returns more accurate information than the CURFILE parameter. - The DEFCNTX parameter (which is quite similar to the CURFILE parameter but provides more information and with more accuracy), and see the related APDFCNTX parameter.
- The DEFAULT and OPEN commands, which reset the file/group context.
- The OPENC command, which does not reset the file/group context.
- The CLOSE command, which might reset the file/group context.