$ItsRemote

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The $ItsRemote function (valid in Parallel Query Option/204 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 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