Reserved words and characters: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
===Rules for reserved words and characters===
===Rules for reserved words and characters===
<p>A number of words and characters have special meaning to <var class="product">Model&nbsp;204</var> and either cannot be used as part of field names or values or can only be used as part of a quoted string.</p>
<p>
<p>The rules for <var class="product">Model&nbsp;204</var> reserved words and characters are as follows:    </p>
A number of words and characters have special meaning to <var class="product">Model&nbsp;204</var> and either cannot be used as part of field names or values or can only be used as part of a quoted string.</p>
<p>
The rules for <var class="product">Model&nbsp;204</var> reserved words and characters are as follows:    </p>
<ul>
<ul>
<li>Any word or character, including the space character, can be used as part of a field name, except the following:</li>
<li>Any word or character, including the space character, can be used as part of a field name, except the following:
<table>
<table>
<tr>
<tr>
<td>??</td>
<td>??</td>
</tr>
</tr>
<tr>
<tr>
<td>?$</td>
<td>?$</td>
</tr>
</tr>
<tr>
<tr>
<td>?&amp;</td>
<td>?&amp;</td>
</tr>
</tr>
<tr>
<tr>
<td>@ (as delete character)</td>
<td>@ (as delete character)</td>
</tr>
</tr>
<tr>
<tr>
<td># (as flush character)</td>
<td># (as flush character)</td>
</tr>
</tr>
<tr>
<tr>
<td>;        </td>
<td>;        </td>
</tr>
</tr>
</table>
</table></li>
</ul>
</ul>


<p class="note"><b>Note:</b> The delete (@) and flush (#) characters used at an installation are controlled by the ERASE and FLUSH parameters (described in the Rocket <var class="product">Model&nbsp;204</var> Parameter and Command Reference Manual). If different symbols are chosen, the restriction on using these characters in field names applies to the new symbols.</p>
<p class="note"><b>Note:</b> The delete (@) and flush (#) characters used at an installation are controlled by the <var>[[ERASE parameter|ERASE]]</var> and <var>[[FLUSH parameter|FLUSH]]</var> parameters. If different symbols are chosen, the restriction on using these characters in field names applies to the new symbols.</p>
<ul>
<ul>
<li>The following list of reserved words or operators can be part of a string-without-quotes as long as they are not surrounded by spaces (ANDIRON is acceptable while AND IRON is not). They can be part of a quoted string as long as they do not stand alone ('A OR B' is acceptable while 'OR' is not). Although field names and values can contain reserved words, requests which reference those fields might not compile, or might produce unexpected results.             </li>
<li>The following list of reserved words or operators can be part of a string-without-quotes as long as they are not surrounded by spaces (ANDIRON is acceptable while AND IRON is not). They can be part of a quoted string as long as they do not stand alone ('A OR B' is acceptable while 'OR' is not). Although field names and values can contain reserved words, requests which reference those fields might not compile, or might produce unexpected results.


<table style="table-layout: fixed;">
<table style="table-layout: fixed;">
Line 98: Line 105:
</li>
</li>


<li>If any of the following reserved characters is embedded in a field name, the character must be part of a quoted string. When creating field names, Rocket Software recommends avoiding the following characters:   </li>
<li>If any of the following reserved characters is embedded in a field name, the character must be part of a quoted string. When creating field names, Rocket Software recommends avoiding the following characters:  


/* note; one char is undecipherable, missing/incorrect for years */
<table>
<table>
<caption>Reserved characters</caption>
<caption>Reserved characters</caption>
Line 117: Line 123:
<td>)</td>
<td>)</td>
<td>*</td>
<td>*</td>
<td></td>  
<td>^</td> <!-- char was undecipherable, missing/incorrect for years -->
</tr>
</tr>
<tr>
<tr>
Line 127: Line 133:
<td>...</td>
<td>...</td>
<td>:</td>
<td>:</td>
<td>%   </td>
<td>% </td>
</tr>
</tr>
</table>
</table>
Line 134: Line 140:


====How to refer to a field name containing reserved words or characters====
====How to refer to a field name containing reserved words or characters====
<p>As in [[#Rules for reserved words and characters]] and [[#Rules for reserved words and characters]], if a field name does contain a reserved word or character, you must enclose it in single quotes when referencing it in a request. For example, the following FIND statement references a field named NOR SLS:</p>
<p>
As in the "Reserved words and operators" and "Reserved characters" tables above, if a field name does contain a reserved word or character, you must enclose it in single quotes when referencing it in a request. For example, the following <var>FIND</var> statement references a field named <code>NOR SLS</code>:</p>
<p class="code">FIND ALL RECORDS FOR WHICH 'NOR SLS' > 0
<p class="code">FIND ALL RECORDS FOR WHICH 'NOR SLS' > 0
</p>
</p>
<p>The following DISPLAY command references a procedure called %SAVINGS:</p>
<p>
The following <var>DISPLAY</var> command references a procedure called <code>%SAVINGS</code>:</p>
<p class="code">DISPLAY PROCEDURE '%SAVINGS'
<p class="code">DISPLAY PROCEDURE '%SAVINGS'
</p>
</p>
[[Category:SOUL]]
[[Category:SOUL]]

Latest revision as of 15:57, 18 August 2014

Rules for reserved words and characters

A number of words and characters have special meaning to Model 204 and either cannot be used as part of field names or values or can only be used as part of a quoted string.

The rules for Model 204 reserved words and characters are as follows:

  • Any word or character, including the space character, can be used as part of a field name, except the following:
    ??
    ?$
    ?&
    @ (as delete character)
    # (as flush character)
    ;

Note: The delete (@) and flush (#) characters used at an installation are controlled by the ERASE and FLUSH parameters. If different symbols are chosen, the restriction on using these characters in field names applies to the new symbols.

  • The following list of reserved words or operators can be part of a string-without-quotes as long as they are not surrounded by spaces (ANDIRON is acceptable while AND IRON is not). They can be part of a quoted string as long as they do not stand alone ('A OR B' is acceptable while 'OR' is not). Although field names and values can contain reserved words, requests which reference those fields might not compile, or might produce unexpected results.
    Reserved words and operators
    AFTER EACH NOT TAB EQ
    ALL EDIT OCC THEN GE
    AND END OCCURRENCE TO GT
    ANDIF FROM ON VALUE LE
    AT IN OR VALUES LT
    BEFORE IS ORIF WHERE NE
    BY LIKE RECORD WITH
    COUNT NOR RECORDS
  • If any of the following reserved characters is embedded in a field name, the character must be part of a quoted string. When creating field names, Rocket Software recommends avoiding the following characters:
    Reserved characters
    $ > +
    ( < - (minus sign/hyphen)
    ) * ^
    = / ,
    ... : %

How to refer to a field name containing reserved words or characters

As in the "Reserved words and operators" and "Reserved characters" tables above, if a field name does contain a reserved word or character, you must enclose it in single quotes when referencing it in a request. For example, the following FIND statement references a field named NOR SLS:

FIND ALL RECORDS FOR WHICH 'NOR SLS' > 0

The following DISPLAY command references a procedure called %SAVINGS:

DISPLAY PROCEDURE '%SAVINGS'