$ItsRemote

From m204wiki
Revision as of 16:39, 17 July 2017 by Admin (talk | contribs) (Admin moved page $Itsremote to $ItsRemote without leaving a redirect: better name)
Jump to navigation Jump to search

The $ITSREMOTE function (valid in PQO only) lets you determine whether a file is remote or whether a group is scattered. The return codes are:

0 the file is not remote or the group is not scattered
1 the file is remote or the group is scattered

Syntax

The format for the $ITSREMOTE function is:

$ITSREMOTE ({[FILE] name [AT location] | [PERM | TEMP] [GROUP] name})

where name is a %variable or a literal name of the file name, file synonym or group name. You must enter the filename in uppercase. If you specify a null for name, Model 204 uses the file or group context at the compilation of the statement containing the $function as the default argument.

Example

BEGIN %NAME IS STRING %NAME = $READ('ENTER THE FILE OR GROUP NAME') IF $ITSREMOTE(%NAME) THEN PRINT %NAME ' IS REMOTE' ELSE PRINT %NAME ' IS NOT REMOTE' END