$ItsRemote: Difference between revisions
Jump to navigation
Jump to search
m (Admin moved page $Itsremote to $ItsRemote without leaving a redirect: better name) |
m (misc formatting) |
||
Line 1: | Line 1: | ||
<p>The $ | <p> | ||
The <var>$ItsRemote</var> function (valid in [[PQO|Parallel Query Option/204]] only) lets you determine whether a file is remote or whether a group is scattered. The return codes are: </p> | |||
<table> | <table> | ||
<tr class=" | <tr class="thJustBold"> | ||
<th | <th>0</th> | ||
< | <td>The file is not remote, or the group is not scattered.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
< | <th>1</th> | ||
<td> | <td>The file is remote, or the group is scattered. </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
| [PERM | TEMP] [GROUP] name}) | ==Syntax== | ||
<p> | |||
The format for the <var>$ItsRemote</var> function is:</p> | |||
<p class="syntax">$ItsRemote ({[FILE] <span class="term">name</span> [AT <span class="term">location</span>] | |||
| [PERM | TEMP] [GROUP] <span class="term">name</span>}) | |||
</p> | </p> | ||
<p>where name is a %variable or a literal | <p> | ||
where <var class="term">name</var> is a %variable or a literal file name, file synonym, or group name. You <var class="term">must</var> enter the filename in uppercase. If you specify a null for name, <var class="product">Model 204</var> uses the file or group context at the compilation of the statement containing the $function as the default argument.</p> | |||
<p class="code"> | |||
% | ==Example== | ||
% | <p class="code">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 | |||
</p> | </p> | ||
[[Category:SOUL $functions]] | [[Category:SOUL $functions]] |
Revision as of 16:54, 17 July 2017
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