$ItsRemote: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Mlarocca moved page $ITSREMOTE to $Itsremote: Lower case change)
m (Admin moved page $Itsremote to $ItsRemote without leaving a redirect: better name)
(No difference)

Revision as of 16:39, 17 July 2017

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