$ItsRemote: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
m (typo)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<p>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: </p>
<p>
<table>
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>
<tr class="head">
<table class="thJustBold">
<th align="right">0</th>
<tr>
<th>the file is not remote or the group is not scattered</th>
<th>0</th>
<td>The file is not remote, or the group is not scattered.</td>
</tr>
</tr>
<tr>
<tr>
<td align="right">1</td>
<th>1</th>
<td>the file is remote or the group is scattered </td>
<td>The file is remote, or the group is scattered. </td>
</tr>
</tr>
</table>
</table>
<b>Syntax</b>
<p>The format for the $ITSREMOTE function is:</p>
<p class="code">$ITSREMOTE ({[FILE] name [AT location]


  | [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 name of the 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&nbsp;204</var> uses the file or group context at the compilation of the statement containing the $function as the default argument.</p>
<p>
<b>Example</b>
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&nbsp;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">BEGIN
 
%NAME IS STRING
==Example==
%NAME = $READ('ENTER THE FILE OR GROUP NAME')
<p class="code">begin
IF $ITSREMOTE(%NAME) THEN
%name is string
     PRINT %NAME ' IS REMOTE'
%name = $read('ENTER THE FILE OR GROUP NAME')
ELSE
if $itsremote(%name) then
     PRINT %NAME ' IS NOT REMOTE'
     print %name ' IS REMOTE'
END
else
     print %name ' IS NOT REMOTE'
end
</p>
</p>
[[Category:SOUL $functions]]
[[Category:SOUL $functions]]

Latest revision as of 16:58, 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