Statement syntax: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 63: Line 63:
==User Language statements==
==User Language statements==
   
   
<p class="syntaxUL"><b><sup>(**)</sup></b>ADD <span class="term">fieldname</span> = <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> (<span class="term">expression</span>)<span class="squareb">}</span>
<p class="syntaxUL"><b><sup>(**)</sup></b>ADD <span class="term">fieldname</span> = <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> (<span class="term">expression</span>)<span class="squareb">}</span>
   
   
   ADD <span class="term">lob-name</span>=BUFFER,<span class="term">position</span>,<span class="term">length</span>[RESERVE <span class="term">n</span> [BYTES]]
   ADD <span class="term">lob-name</span>=BUFFER,<span class="term">position</span>,<span class="term">length</span><span class="squareb">[</span>RESERVE <span class="term">n</span> <span class="squareb">[</span>BYTES<span class="squareb">]</span><span class="squareb">]</span>
</p>
</p>
   
   
Line 84: Line 83:
<hr>
<hr>
   
   
<p class="syntaxUL">AUDIT ALL FIELDGROUP INFORMATION [CTOFIELDS]</p>
<p class="syntaxUL">AUDIT ALL FIELDGROUP INFORMATION <span class="squareb">[</span>CTOFIELDS<span class="squareb">]</span></p>
   
   
<hr>
<hr>
Line 102: Line 101:
   
   
<p class="syntaxUL">CALL <span class="squareb">{</span><span class="term">label</span> <span class="squareb">|</span> <span class="term">subname</span>  
<p class="syntaxUL">CALL <span class="squareb">{</span><span class="term">label</span> <span class="squareb">|</span> <span class="term">subname</span>  
  [(<span class="squareb">[</span><span class="term">expression</span> <span class="squareb">|</span> <span class="term">%variable</span> <span class="squareb">|</span> [LIST] <span class="term">listname</span><span class="squareb">]</span> [,...])]<span class="squareb">}</span>
  <span class="squareb">[</span>(<span class="squareb">[</span><span class="term">expression</span> <span class="squareb">|</span> <span class="term">%variable</span> <span class="squareb">|</span> <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">]</span> <span class="squareb">[</span>,...<span class="squareb">]</span>)<span class="squareb">]</span><span class="squareb">}</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="syntaxUL"><b><sup>(**)</sup></b>CHANGE <span class="term">fieldname</span> <span class="squareb">[</span>(<span class="term">subscript</span>)<span class="squareb">]</span> [= <span class="term">value1</span> <span class="squareb">|</span> (<span class="term">expression</span>)] TO (<span class="term">value2</span> <span class="squareb">|</span> (<span class="term">expression</span>))
<p class="syntaxUL"><b><sup>(**)</sup></b>CHANGE <span class="term">fieldname</span> <span class="squareb">[</span>(<span class="term">subscript</span>)<span class="squareb">]</span> <span class="squareb">[</span>= <span class="term">value1</span> <span class="squareb">|</span> (<span class="term">expression</span>)<span class="squareb">]</span> TO (<span class="term">value2</span> <span class="squareb">|</span> (<span class="term">expression</span>))
   
   
   CHANGE <span class="term">lob-fieldname</span>,<span class="term">position1</span>,<span class="term">length</span> TO BUFFER,<span class="term">position2</span>,<span class="term">length</span>[RESERVE <span class="term">n</span> [BYTES]]
   CHANGE <span class="term">lob-fieldname</span>,<span class="term">position1</span>,<span class="term">length</span> TO BUFFER,<span class="term">position2</span>,<span class="term">length</span><span class="squareb">[</span>RESERVE <span class="term">n</span> <span class="squareb">[</span>BYTES<span class="squareb">]</span><span class="squareb">]</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="syntaxUL">CLEAR <span class="squareb">{</span>[[ALL <span class="squareb">|</span> TEMP <span class="squareb">|</span> LISTFDST <span class="squareb">|</span> POSITION] [GLOBAL]] OBJECTS  
<p class="syntaxUL">CLEAR <span class="squareb">{</span><span class="squareb">[</span><span class="squareb">[</span>ALL <span class="squareb">|</span> TEMP <span class="squareb">|</span> LISTFDST <span class="squareb">|</span> POSITION<span class="squareb">]</span> <span class="squareb">[</span>GLOBAL<span class="squareb">]</span><span class="squareb">]</span> OBJECTS  
  <span class="squareb">|</span> GLOBALS  
  <span class="squareb">|</span> GLOBALS  
  <span class="squareb">|</span> GLOBAL <span class="squareb">{</span>IMAGE <span class="squareb">|</span> SCREEN <span class="squareb">|</span> MENU <span class="squareb">|</span> LIST <span class="squareb">|</span> FOUNDSET  
  <span class="squareb">|</span> GLOBAL <span class="squareb">{</span>IMAGE <span class="squareb">|</span> SCREEN <span class="squareb">|</span> MENU <span class="squareb">|</span> LIST <span class="squareb">|</span> FOUNDSET  
  <span class="squareb">|</span> POSITION [PERM <span class="squareb">|</span> TEMP]<span class="squareb">}</span>  
  <span class="squareb">|</span> POSITION <span class="squareb">[</span>PERM <span class="squareb">|</span> TEMP<span class="squareb">]</span><span class="squareb">}</span>  
  <span class="squareb">{</span>'<span class="term">objectname</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>
  <span class="squareb">{</span>'<span class="term">objectname</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>
</p>
</p>
Line 142: Line 141:
<p class="syntaxUL">CLOSE  
<p class="syntaxUL">CLOSE  
  <span class="squareb">{</span>DATASET <span class="squareb">{</span><span class="term">ext-filename</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  <span class="squareb">{</span>DATASET <span class="squareb">{</span><span class="term">ext-filename</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  <span class="squareb">|</span> [EXTERNAL] <span class="squareb">{</span><span class="term">ext-filename</span> <span class="squareb">|</span> TERMINAL <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>  
  <span class="squareb">|</span> <span class="squareb">[</span>EXTERNAL<span class="squareb">]</span> <span class="squareb">{</span><span class="term">ext-filename</span> <span class="squareb">|</span> TERMINAL <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>  
</p>
</p>


Line 149: Line 148:
<p class="syntaxUL"><b><sup>(+C)</sup></b>CLOSE PROCESS  
<p class="syntaxUL"><b><sup>(+C)</sup></b>CLOSE PROCESS  
     <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
     <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
     [SYNCLEVEL <span class="squareb">|</span> FLUSH <span class="squareb">|</span> <span class="term">%variable</span>]
     <span class="squareb">[</span>SYNCLEVEL <span class="squareb">|</span> FLUSH <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">]</span>
</p>
</p>
   
   
Line 156: Line 155:
<p class="syntaxUL">CLOSE PROCESS  
<p class="syntaxUL">CLOSE PROCESS  
  <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  [SYNCLEVEL <span class="squareb">|</span> CONFIRM <span class="squareb">|</span> FLUSH <span class="squareb">|</span> ERROR <span class="squareb">|</span> <span class="term">%variable</span>]
  <span class="squareb">[</span>SYNCLEVEL <span class="squareb">|</span> CONFIRM <span class="squareb">|</span> FLUSH <span class="squareb">|</span> ERROR <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">]</span>
</p>
</p>
   
   
Line 183: Line 182:
<hr>
<hr>
   
   
<p class="syntaxUL">COUNT RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname</span><span class="squareb">}</span></p>
<p class="syntaxUL">COUNT RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">}</span></p>
   
   
<hr>
<hr>
Line 195: Line 194:
   
   
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li>LABEL <i>labelname</i> [GLOBAL <span class="squareb">|</span> COMMON]
<li>LABEL <i>labelname</i> <span class="squareb">[</span>GLOBAL <span class="squareb">|</span> COMMON<span class="squareb">]</span>
   
   
<li>LIST listname [IN [FILE <span class="squareb">|</span> [PERM <span class="squareb">|</span> TEMP] GROUP]] <i>name</i>] [GLOBAL <span class="squareb">|</span> COMMON]
<li>LIST listname <span class="squareb">[</span>IN <span class="squareb">[</span>FILE <span class="squareb">|</span> <span class="squareb">[</span>PERM <span class="squareb">|</span> TEMP<span class="squareb">]</span> GROUP<span class="squareb">]</span><span class="squareb">]</span> <i>name</i><span class="squareb">]</span> <span class="squareb">[</span>GLOBAL <span class="squareb">|</span> COMMON<span class="squareb">]</span>
   
   
<li>IMAGE <i>imagename</i>[AT <span class="squareb">{</span><i>itemname</i> <span class="squareb">|</span> <i>imagename1</i> <span class="squareb">|</span> <i>arrayname</i><span class="squareb">}</span> <br>
<li>IMAGE <i>imagename</i><span class="squareb">[</span>AT <span class="squareb">{</span><i>itemname</i> <span class="squareb">|</span> <i>imagename1</i> <span class="squareb">|</span> <i>arrayname</i><span class="squareb">}</span> <br>
       <span class="squareb">|</span> GLOBAL [PERMANENT <span class="squareb">|</span> TEMPORARY] <br>
       <span class="squareb">|</span> GLOBAL <span class="squareb">[</span>PERMANENT <span class="squareb">|</span> TEMPORARY<span class="squareb">]</span> <br>
       <span class="squareb">|</span> [PERMANENT <span class="squareb">|</span> TEMPORARY] GLOBAL <span class="squareb">|</span> COMMON]
       <span class="squareb">|</span> <span class="squareb">[</span>PERMANENT <span class="squareb">|</span> TEMPORARY<span class="squareb">]</span> GLOBAL <span class="squareb">|</span> COMMON<span class="squareb">]</span>
   
   
<li>MENU <i>menuname</i> [GLOBAL [PERMANENT <span class="squareb">|</span> TEMPORARY] <br>
<li>MENU <i>menuname</i> <span class="squareb">[</span>GLOBAL <span class="squareb">[</span>PERMANENT <span class="squareb">|</span> TEMPORARY<span class="squareb">]</span> <br>
       <span class="squareb">|</span> [PERMANENT <span class="squareb">|</span> TEMPORARY] GLOBAL <span class="squareb">|</span> COMMON]
       <span class="squareb">|</span> <span class="squareb">[</span>PERMANENT <span class="squareb">|</span> TEMPORARY<span class="squareb">]</span> GLOBAL <span class="squareb">|</span> COMMON<span class="squareb">]</span>
   
   
<li>SCREEN <i>screenname</i> [GLOBAL [PERMANENT <span class="squareb">|</span> TEMPORARY] <br>
<li>SCREEN <i>screenname</i> <span class="squareb">[</span>GLOBAL <span class="squareb">[</span>PERMANENT <span class="squareb">|</span> TEMPORARY<span class="squareb">]</span> <br>
         <span class="squareb">|</span> [PERMANENT <span class="squareb">|</span> TEMPORARY] GLOBAL <span class="squareb">|</span> COMMON]
         <span class="squareb">|</span> <span class="squareb">[</span>PERMANENT <span class="squareb">|</span> TEMPORARY<span class="squareb">]</span> GLOBAL <span class="squareb">|</span> COMMON<span class="squareb">]</span>
   
   
<li><i>%variable</i> [IS] <span class="squareb">{</span>FIXED [DP <i>n</i>] <span class="squareb">|</span> FLOAT<span class="squareb">}</span> [ARRAY (<i>d1</i> [,<i>d2</i> [,<i>d3</i>]])] <br>
<li><i>%variable</i> <span class="squareb">[</span>IS<span class="squareb">]</span> <span class="squareb">{</span>FIXED <span class="squareb">[</span>DP <i>n</i><span class="squareb">]</span> <span class="squareb">|</span> FLOAT<span class="squareb">}</span> <span class="squareb">[</span>ARRAY (<i>d1</i> <span class="squareb">[</span>,<i>d2</i> <span class="squareb">[</span>,<i>d3</i><span class="squareb">]</span><span class="squareb">]</span>)<span class="squareb">]</span> <br>
           [INITIAL(<i>numeric-expression</i>)] [STATIC] [COMMON]
           <span class="squareb">[</span>INITIAL(<i>numeric-expression</i>)<span class="squareb">]</span> <span class="squareb">[</span>STATIC<span class="squareb">]</span> <span class="squareb">[</span>COMMON<span class="squareb">]</span>
   
   
<li><i>%variable</i> [IS] STRING [LEN <i>n</i>] [DP <span class="squareb">{</span><i>n</i> <span class="squareb">|</span> *<span class="squareb">}</span>] [ARRAY (<i>d1</i> [,<i>d2</i>[,<i>d3</i>]])] <br>
<li><i>%variable</i> <span class="squareb">[</span>IS<span class="squareb">]</span> STRING <span class="squareb">[</span>LEN <i>n</i><span class="squareb">]</span> <span class="squareb">[</span>DP <span class="squareb">{</span><i>n</i> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>ARRAY (<i>d1</i> <span class="squareb">[</span>,<i>d2</i><span class="squareb">[</span>,<i>d3</i><span class="squareb">]</span><span class="squareb">]</span>)<span class="squareb">]</span> <br>
           [NO FIELD SAVE] [COMMON] <br>
           <span class="squareb">[</span>NO FIELD SAVE<span class="squareb">]</span> <span class="squareb">[</span>COMMON<span class="squareb">]</span> <br>
           [INITIAL('<i>EBCDIC-string</i>' <span class="squareb">|</span> <i>expression</i>)] [STATIC]
           <span class="squareb">[</span>INITIAL('<i>EBCDIC-string</i>' <span class="squareb">|</span> <i>expression</i>)<span class="squareb">]</span> <span class="squareb">[</span>STATIC<span class="squareb">]</span>
   
   
<li>SUBROUTINE <i>subname</i> [(<i>type</i> [INPUT <span class="squareb">|</span> OUTPUT <span class="squareb">|</span> INPUT OUTPUT] [,...])]
<li>SUBROUTINE <i>subname</i> <span class="squareb">[</span>(<i>type</i> <span class="squareb">[</span>INPUT <span class="squareb">|</span> OUTPUT <span class="squareb">|</span> INPUT OUTPUT<span class="squareb">]</span> <span class="squareb">[</span>,...<span class="squareb">]</span>)<span class="squareb">]</span>
</ul>
</ul>
   
   
Line 226: Line 225:
<li>Scalar %variable of the following format:
<li>Scalar %variable of the following format:
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li><span class="squareb">{</span>STRING [LEN] <i>n</i> [DP <span class="squareb">{</span><i>n</i> <span class="squareb">|</span> *<span class="squareb">}</span>] <span class="squareb">|</span> [FIXED [DP <i>n</i>] <span class="squareb">|</span> FLOAT]<span class="squareb">}</span> </li></ul>
<li><span class="squareb">{</span>STRING <span class="squareb">[</span>LEN<span class="squareb">]</span> <i>n</i> <span class="squareb">[</span>DP <span class="squareb">{</span><i>n</i> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">|</span> <span class="squareb">[</span>FIXED <span class="squareb">[</span>DP <i>n</i><span class="squareb">]</span> <span class="squareb">|</span> FLOAT<span class="squareb">]</span><span class="squareb">}</span> </li></ul>
</li>
</li>
   
   
<li>Array %variable of the following format:
<li>Array %variable of the following format:
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li><span class="squareb">{</span>STRING [LEN <i>n</i>] [DP [<i>n</i> <span class="squareb">|</span> *<span class="squareb">}</span>] [ARRAY (* [,*[,*]]) [NO FIELD SAVE]] <br>
<li><span class="squareb">{</span>STRING <span class="squareb">[</span>LEN <i>n</i><span class="squareb">]</span> <span class="squareb">[</span>DP <span class="squareb">[</span><i>n</i> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>ARRAY (* <span class="squareb">[</span>,*<span class="squareb">[</span>,*<span class="squareb">]</span><span class="squareb">]</span>) <span class="squareb">[</span>NO FIELD SAVE<span class="squareb">]</span><span class="squareb">]</span> <br>
  <span class="squareb">|</span> [FIXED [DP <i>n</i>] <span class="squareb">|</span> FLOAT] [ARRAY (* [,*[,*]])]<span class="squareb">}</span> </li></ul>
  <span class="squareb">|</span> <span class="squareb">[</span>FIXED <span class="squareb">[</span>DP <i>n</i><span class="squareb">]</span> <span class="squareb">|</span> FLOAT<span class="squareb">]</span> <span class="squareb">[</span>ARRAY (* <span class="squareb">[</span>,*<span class="squareb">[</span>,*<span class="squareb">]</span><span class="squareb">]</span>)<span class="squareb">]</span><span class="squareb">}</span> </li></ul>
</li>
</li>
   
   
<li>A list of records of the following format:
<li>A list of records of the following format:
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li>[LIST] [IN <span class="squareb">{</span>FILE <span class="squareb">|</span> [PERM <span class="squareb">|</span> TEMP] GROUP<span class="squareb">}</span> <i>name</i>] </li></ul>
<li><span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="squareb">[</span>IN <span class="squareb">{</span>FILE <span class="squareb">|</span> <span class="squareb">[</span>PERM <span class="squareb">|</span> TEMP<span class="squareb">]</span> GROUP<span class="squareb">}</span> <i>name</i><span class="squareb">]</span> </li></ul>
</li>
</li>
</ul>
</ul>
Line 245: Line 244:
<hr>
<hr>
   
   
<p class="syntaxUL">DEFAULT CURSOR [READ <span class="squareb">|</span> REREAD <span class="squareb">|</span> PRINT]  
<p class="syntaxUL">DEFAULT CURSOR <span class="squareb">[</span>READ <span class="squareb">|</span> REREAD <span class="squareb">|</span> PRINT<span class="squareb">]</span>
               <span class="squareb">{</span>ITEMID <span class="term">n</span> <span class="squareb">|</span> <span class="term">itemname</span> <span class="squareb">|</span> ROW <span class="term">n</span> COLUMN <span class="term">m</span><span class="squareb">}</span>
               <span class="squareb">{</span>ITEMID <span class="term">n</span> <span class="squareb">|</span> <span class="term">itemname</span> <span class="squareb">|</span> ROW <span class="term">n</span> COLUMN <span class="term">m</span><span class="squareb">}</span>
</p>
</p>
Line 253: Line 252:
<p class="syntaxUL">DEFAULT <span class="squareb">{</span>TITLE  
<p class="syntaxUL">DEFAULT <span class="squareb">{</span>TITLE  
         <span class="squareb">|</span> PROMPT  
         <span class="squareb">|</span> PROMPT  
         <span class="squareb">|</span> INPUT [DEBLANK <span class="squareb">|</span> NODEBLANK] [PAD WITH '<span class="term">c</span>'] [LEN <span class="term">m</span> [DP [<span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span>]] [UPCASE <span class="squareb">|</span> NOCASE]  
         <span class="squareb">|</span> INPUT <span class="squareb">[</span>DEBLANK <span class="squareb">|</span> NODEBLANK<span class="squareb">]</span> <span class="squareb">[</span>PAD WITH '<span class="term">c</span>'<span class="squareb">]</span> <span class="squareb">[</span>LEN <span class="term">m</span> <span class="squareb">[</span>DP <span class="squareb">[</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span><span class="squareb">]</span> <span class="squareb">[</span>UPCASE <span class="squareb">|</span> NOCASE<span class="squareb">]</span>
         <span class="squareb">|</span> [TAG [<span class="term">attributes</span>] [WITH '<span class="term">c</span>']<span class="squareb">}</span>  
         <span class="squareb">|</span> <span class="squareb">[</span>TAG <span class="squareb">[</span><span class="term">attributes</span><span class="squareb">]</span> <span class="squareb">[</span>WITH '<span class="term">c</span>'<span class="squareb">]</span><span class="squareb">}</span>  
         [[READ] <span class="term">attributes</span>] [REREAD <span class="term">attributes</span>] [PRINT <span class="term">attributes</span>]
         <span class="squareb">[</span><span class="squareb">[</span>READ<span class="squareb">]</span> <span class="term">attributes</span><span class="squareb">]</span> <span class="squareb">[</span>REREAD <span class="term">attributes</span><span class="squareb">]</span> <span class="squareb">[</span>PRINT <span class="term">attributes</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>


<p class="syntaxUL">DEFAULT SKIP <span class="term">n</span> POSITIONS[S]  
<p class="syntaxUL">DEFAULT SKIP <span class="term">n</span> POSITIONS<span class="squareb">[</span>S<span class="squareb">]</span>
             [INITIAL <span class="squareb">{</span>NULL <span class="squareb">|</span> <span class="term">character</span> <span class="squareb">|</span> BLANK<span class="squareb">}</span>]
             <span class="squareb">[</span>INITIAL <span class="squareb">{</span>NULL <span class="squareb">|</span> <span class="term">character</span> <span class="squareb">|</span> BLANK<span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">DEFAULT [TYPE]  
<p class="syntaxUL">DEFAULT <span class="squareb">[</span>TYPE<span class="squareb">]</span>
  <span class="squareb">{</span>STRING <span class="squareb">|</span> BINARY <span class="squareb">|</span> PACKED <span class="squareb">|</span> ZONED <span class="squareb">|</span> FLOAT <span class="squareb">|</span> EFORMAT<span class="squareb">}</span>  
  <span class="squareb">{</span>STRING <span class="squareb">|</span> BINARY <span class="squareb">|</span> PACKED <span class="squareb">|</span> ZONED <span class="squareb">|</span> FLOAT <span class="squareb">|</span> EFORMAT<span class="squareb">}</span>  
  <span class="squareb">{</span>LEN <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> UNKNOWN<span class="squareb">}</span> <span class="squareb">|</span> BITS <span class="term">n</span> <span class="squareb">|</span> DIGITS <span class="term">n</span><span class="squareb">}</span>  
  <span class="squareb">{</span>LEN <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> UNKNOWN<span class="squareb">}</span> <span class="squareb">|</span> BITS <span class="term">n</span> <span class="squareb">|</span> DIGITS <span class="term">n</span><span class="squareb">}</span>  
  [DP <span class="squareb">{</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span>] [BP <span class="term">n</span>]  
  <span class="squareb">[</span>DP <span class="squareb">{</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>BP <span class="term">n</span><span class="squareb">]</span>
  [SIGNED <span class="squareb">|</span> UNSIGNED] [PAD <span class="squareb">{</span>BLANK <span class="squareb">|</span> <span class="term">character</span> <span class="squareb">|</span> NULL<span class="squareb">}</span>]  
  <span class="squareb">[</span>SIGNED <span class="squareb">|</span> UNSIGNED<span class="squareb">]</span> <span class="squareb">[</span>PAD <span class="squareb">{</span>BLANK <span class="squareb">|</span> <span class="term">character</span> <span class="squareb">|</span> NULL<span class="squareb">}</span><span class="squareb">]</span>
  [STRIP <span class="squareb">|</span> NOSTRIP] [JUSTIFY <span class="squareb">{</span>LEFT <span class="squareb">|</span> RIGHT<span class="squareb">}</span>]  
  <span class="squareb">[</span>STRIP <span class="squareb">|</span> NOSTRIP<span class="squareb">]</span> <span class="squareb">[</span>JUSTIFY <span class="squareb">{</span>LEFT <span class="squareb">|</span> RIGHT<span class="squareb">}</span><span class="squareb">]</span>
  [INITIAL <span class="squareb">{</span>BLANK <span class="squareb">|</span> ZERO <span class="squareb">|</span> NULL <span class="squareb">|</span> <span class="term">literal</span><span class="squareb">}</span>]
  <span class="squareb">[</span>INITIAL <span class="squareb">{</span>BLANK <span class="squareb">|</span> ZERO <span class="squareb">|</span> NULL <span class="squareb">|</span> <span class="term">literal</span><span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL"><b><sup>(**)</sup></b>DELETE <span class="term">fieldname</span> <span class="squareb">[</span>(<span class="term">subscript</span>)<span class="squareb">]</span> <span class="squareb">[</span><b></b>= <span class="term">value</span> |(<span class="term">expression</span>)<span class="squareb">]</span>
<p class="syntaxUL"><b><sup>(**)</sup></b>DELETE <span class="term">fieldname</span> <span class="squareb">[</span>(<span class="term">subscript</span>)<span class="squareb">]</span> <span class="squareb">[</span><b></b>= <span class="term">value</span> <span class="squareb">|</span> (<span class="term">expression</span>)<span class="squareb">]</span>
</p>
</p>


Line 290: Line 289:
<hr>
<hr>
   
   
<p class="syntaxUL">DELETE [ALL] RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname</span><span class="squareb">}</span>
<p class="syntaxUL">DELETE <span class="squareb">[</span>ALL<span class="squareb">]</span> RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">}</span>
</p>
</p>
   
   
Line 299: Line 298:
<hr>
<hr>
   
   
<p class="syntaxUL">END <span class="squareb">{</span>FIND <span class="squareb">|</span> IF <span class="squareb">|</span> FOR <span class="squareb">|</span> ON <span class="squareb">|</span> REPEAT <span class="squareb">|</span> STORE <span class="squareb">|</span> SUBROUTINE<span class="squareb">}</span> [<span class="term">label</span>]
<p class="syntaxUL">END <span class="squareb">{</span>FIND <span class="squareb">|</span> IF <span class="squareb">|</span> FOR <span class="squareb">|</span> ON <span class="squareb">|</span> REPEAT <span class="squareb">|</span> STORE <span class="squareb">|</span> SUBROUTINE<span class="squareb">}</span> [<span class="term">label</span><span class="squareb">]</span>
</p>
</p>
   
   
Line 308: Line 307:
<hr>
<hr>
   
   
<p class="syntaxUL">END [MORE <span class="squareb">|</span> NORUN <span class="squareb">|</span> USE]...</p>
<p class="syntaxUL">END <span class="squareb">[</span>MORE <span class="squareb">|</span> NORUN <span class="squareb">|</span> USE<span class="squareb">]</span>...</p>
   
   
<hr>
<hr>
Line 316: Line 315:
<hr>
<hr>
   
   
<p class="syntaxUL">FILE RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname</span><span class="squareb">}</span>  
<p class="syntaxUL">FILE RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">}</span>  
             UNDER <span class="term">fieldname</span> = <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> (<span class="term">expression</span>)<span class="squareb">}</span>
             UNDER <span class="term">fieldname</span> = <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> (<span class="term">expression</span>)<span class="squareb">}</span>
</p>
</p>
Line 322: Line 321:
<hr>
<hr>
   
   
<p class="syntaxUL"><b><sup>(*)</sup></b>FIND [AND RESERVE] [ALL] RECORDS  
<p class="syntaxUL"><b><sup>(*)</sup></b>FIND <span class="squareb">[</span>AND RESERVE<span class="squareb">]</span> <span class="squareb">[</span>ALL<span class="squareb">]</span> RECORDS  
     [IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname</span>]  
     <span class="squareb">[</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">]</span>
     [FOR WHICH <span class="squareb">|</span> WITH] <span class="term">[[#Retrieval condition syntax|retrieval-conditions]]</span></p>
     <span class="squareb">[</span>FOR WHICH <span class="squareb">|</span> WITH<span class="squareb">]</span> <span class="term">[[#Retrieval condition syntax|retrieval-conditions]]</span></p>


<hr>
<hr>
Line 335: Line 334:
<hr>
<hr>
   
   
<p class="syntaxUL"><b><sup>(*)</sup></b>FIND AND PRINT COUNT <span class="squareb">[</span><span class="term">[[#Retrieval condition syntax|retrieval-conditions]]</span><span class="squareb">]</span>
<p class="syntaxUL"><b><sup>(*)</sup></b>FIND AND PRINT COUNT <span class="squareb">[</span><span class="term">[[#Retrieval condition syntax|retrieval-conditions]]</span>
</p>
</p>
   
   
Line 341: Line 340:
   
   
<p class="syntaxUL"><b><sup>(*)</sup></b><span class="squareb">{</span>FIND WITHOUT LOCKS <span class="squareb">|</span> FDWOL<span class="squareb">}</span>  
<p class="syntaxUL"><b><sup>(*)</sup></b><span class="squareb">{</span>FIND WITHOUT LOCKS <span class="squareb">|</span> FDWOL<span class="squareb">}</span>  
     [ALL] RECORDS [IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname</span>]  
     <span class="squareb">[</span>ALL<span class="squareb">]</span> RECORDS <span class="squareb">[</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">]</span>
     [FOR WHICH <span class="squareb">|</span> WITH] <span class="term">[[#Retrieval condition syntax|retrieval-conditions]]</span>
     <span class="squareb">[</span>FOR WHICH <span class="squareb">|</span> WITH<span class="squareb">]</span> <span class="term">[[#Retrieval condition syntax|retrieval-conditions]]</span>
</p>
</p>
   
   
Line 357: Line 356:
   
   
<p class="syntaxUL"><b><sup>(*)</sup></b>FOR <span class="squareb">{</span>EACH <span class="squareb">|</span> <span class="term">k</span><span class="squareb">}</span> <span class="squareb">{</span>RECORD <span class="squareb">|</span> RECORDS<span class="squareb">}</span>  
<p class="syntaxUL"><b><sup>(*)</sup></b>FOR <span class="squareb">{</span>EACH <span class="squareb">|</span> <span class="term">k</span><span class="squareb">}</span> <span class="squareb">{</span>RECORD <span class="squareb">|</span> RECORDS<span class="squareb">}</span>  
     [IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname</span>]  
     <span class="squareb">[</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">]</span>
     IN [ASCENDING <span class="squareb">|</span> DESCENDING] [SORTKEY] ORDER [BY [EACH] <span class="term">fieldname</span>]  
     IN <span class="squareb">[</span>ASCENDING <span class="squareb">|</span> DESCENDING<span class="squareb">]</span> <span class="squareb">[</span>SORTKEY<span class="squareb">]</span> ORDER <span class="squareb">[</span>BY <span class="squareb">[</span>EACH<span class="squareb">]</span> <span class="term">fieldname</span><span class="squareb">]</span>
     [FROM <span class="squareb">{</span><span class="term">value1</span> <span class="squareb">|</span> (<span class="term">expression1</span>)<span class="squareb">}</span>] [TO <span class="squareb">{</span><span class="term">value2</span> <span class="squareb">|</span> (<span class="term">expression2</span>)<span class="squareb">}</span>] [BY <span class="squareb">{</span><span class="term">%variable</span> <span class="squareb">|</span> <span class="term">literal</span><span class="squareb">}</span>]
     <span class="squareb">[</span>FROM <span class="squareb">{</span><span class="term">value1</span> <span class="squareb">|</span> (<span class="term">expression1</span>)<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>TO <span class="squareb">{</span><span class="term">value2</span> <span class="squareb">|</span> (<span class="term">expression2</span>)<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>BY <span class="squareb">{</span><span class="term">%variable</span> <span class="squareb">|</span> <span class="term">literal</span><span class="squareb">}</span><span class="squareb">]</span>
     [OPTIMIZING FNV]  
     <span class="squareb">[</span>OPTIMIZING FNV<span class="squareb">]</span>
     [<span class="squareb">{</span>WHERE <span class="squareb">|</span> WITH<span class="squareb">}</span> <span class="term"><span class="term">retrieval-conditions</span></span>]
     [<span class="squareb">{</span>WHERE <span class="squareb">|</span> WITH<span class="squareb">}</span> <span class="term">[[#Retrieval condition syntax|retrieval-conditions]]</span>
</p>
</p>


Line 367: Line 366:
   
   
<p class="syntaxUL"><b><sup>(*)</sup></b>FOR <span class="squareb">{</span>EACH <span class="squareb">|</span> <span class="term">k</span><span class="squareb">}</span> <span class="squareb">{</span>VALUE <span class="squareb">|</span> VALUES<span class="squareb">}</span> <span class="term">OF fieldname</span>
<p class="syntaxUL"><b><sup>(*)</sup></b>FOR <span class="squareb">{</span>EACH <span class="squareb">|</span> <span class="term">k</span><span class="squareb">}</span> <span class="squareb">{</span>VALUE <span class="squareb">|</span> VALUES<span class="squareb">}</span> <span class="term">OF fieldname</span>
     [FROM <span class="squareb">{</span><span class="term">value1</span> <span class="squareb">|</span> (<span class="term">expression1</span>)<span class="squareb">}</span>] [TO <span class="squareb">{</span><span class="term">value2</span> <span class="squareb">|</span> (<span class="term">expression2</span>)<span class="squareb">}</span>] [[NOT] LIKE <span class="term">pattern</span>]  
     <span class="squareb">[</span>FROM <span class="squareb">{</span><span class="term">value1</span> <span class="squareb">|</span> (<span class="term">expression1</span>)<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>TO <span class="squareb">{</span><span class="term">value2</span> <span class="squareb">|</span> (<span class="term">expression2</span>)<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span><span class="squareb">[</span>NOT<span class="squareb">]</span> LIKE <span class="term">pattern</span><span class="squareb">]</span>
     [IN [ASCENDING <span class="squareb">|</span> DESCENDING] [CHARACTER <span class="squareb">|</span> NUMERICAL] [RIGHT-ADJUSTED] ORDER]
     <span class="squareb">[</span>IN <span class="squareb">[</span>ASCENDING <span class="squareb">|</span> DESCENDING<span class="squareb">]</span> <span class="squareb">[</span>CHARACTER <span class="squareb">|</span> NUMERICAL<span class="squareb">]</span> <span class="squareb">[</span>RIGHT-ADJUSTED<span class="squareb">]</span> ORDER<span class="squareb">]</span>
</p>
</p>


Line 382: Line 381:
<hr>
<hr>
   
   
<p class="syntaxUL">FOR RECORD NUMBER <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> IN <span class="term">label</span><span class="squareb">}</span> [OPTIMIZING FNV]
<p class="syntaxUL">FOR RECORD NUMBER <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> IN <span class="term">label</span><span class="squareb">}</span> <span class="squareb">[</span>OPTIMIZING FNV<span class="squareb">]</span>
</p>
</p>


Line 388: Line 387:
   
   
<p class="syntaxUL">FOR <span class="term">%variable</span> FROM <span class="term">expression1</span>  
<p class="syntaxUL">FOR <span class="term">%variable</span> FROM <span class="term">expression1</span>  
  <span class="squareb">{</span>TO <span class="term">expression2</span> [BY <span class="term">expression3</span>]  
  <span class="squareb">{</span>TO <span class="term">expression2</span> <span class="squareb">[</span>BY <span class="term">expression3</span><span class="squareb">]</span>
  <span class="squareb">|</span> [BY <span class="term">expression3</span>] TO <span class="term">expression2</span><span class="squareb">}</span>
  <span class="squareb">|</span> <span class="squareb">[</span>BY <span class="term">expression3</span><span class="squareb">]</span> TO <span class="term">expression2</span><span class="squareb">}</span>
</p>
</p>


Line 397: Line 396:
   
   
<p class="syntaxUL">IDENTIFY  
<p class="syntaxUL">IDENTIFY  
  <span class="squareb">{</span>[IMAGE] <span class="term">imagename</span>  
  <span class="squareb">{</span><span class="squareb">[</span>IMAGE<span class="squareb">]</span> <span class="term">imagename</span>  
  <span class="squareb">|</span> <span class="term">%imagename</span>:<span class="term">itemname</span> LEN <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  <span class="squareb">|</span> <span class="term">%imagename</span>:<span class="term">itemname</span> LEN <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  <span class="squareb">|</span> <span class="term">%imagename</span>:<span class="term">arrayname</span> OCCURS <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>
  <span class="squareb">|</span> <span class="term">%imagename</span>:<span class="term">arrayname</span> OCCURS <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>
Line 405: Line 404:
   
   
<p class="syntaxUL"><b><sup>(C)</sup></b>IF <span class="term">expression</span> THEN <span class="term">statements</span>  
<p class="syntaxUL"><b><sup>(C)</sup></b>IF <span class="term">expression</span> THEN <span class="term">statements</span>  
     [ELSE <span class="term">statements</span> <span class="squareb">|</span> ELSEIF <span class="term">expression</span> THEN <span class="term">statements</span>]  
     <span class="squareb">[</span>ELSE <span class="term">statements</span> <span class="squareb">|</span> ELSEIF <span class="term">expression</span> THEN <span class="term">statements</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">[DECLARE] IMAGE <span class="term">imagename</span>  
<p class="syntaxUL"><span class="squareb">[</span>DECLARE<span class="squareb">]</span> IMAGE <span class="term">imagename</span>  
  [GLOBAL [PERMANENT <span class="squareb">|</span> TEMPORARY]  
  <span class="squareb">[</span>GLOBAL <span class="squareb">[</span>PERMANENT <span class="squareb">|</span> TEMPORARY<span class="squareb">]</span>
  <span class="squareb">|</span> [PERMANENT <span class="squareb">|</span> TEMPORARY] GLOBAL  
  <span class="squareb">|</span> <span class="squareb">[</span>PERMANENT <span class="squareb">|</span> TEMPORARY<span class="squareb">]</span> GLOBAL  
  <span class="squareb">|</span> COMMON [AT [<span class="term">itemname</span> <span class="squareb">|</span> <span class="term">imagename1</span> <span class="squareb">|</span> <span class="term">arrayname</span><span class="squareb">}</span>]]  
  <span class="squareb">|</span> COMMON <span class="squareb">[</span>AT <span class="squareb">[</span><span class="term">itemname</span> <span class="squareb">|</span> <span class="term">imagename1</span> <span class="squareb">|</span> <span class="term">arrayname</span><span class="squareb">}</span><span class="squareb">]</span><span class="squareb">]</span>
</p>
</p>


Line 422: Line 421:
<hr>
<hr>
   
   
<p class="syntaxUL">INPUT <span class="term">inputname</span> [AT [COLUMN] <span class="term">n</span>]  
<p class="syntaxUL">INPUT <span class="term">inputname</span> <span class="squareb">[</span>AT <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">n</span><span class="squareb">]</span>
  [TO [COLUMN] <span class="term">m</span> <span class="squareb">|</span> [LEN <span class="term">m</span>] DP <span class="squareb">{</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span>]]  
  <span class="squareb">[</span>TO <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">m</span> <span class="squareb">|</span> <span class="squareb">[</span>LEN <span class="term">m</span><span class="squareb">]</span> DP <span class="squareb">{</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span><span class="squareb">]</span>
  [UPCASE <span class="squareb">|</span> NOCASE] [DEFAULT '<span class="term">value</span>']  
  <span class="squareb">[</span>UPCASE <span class="squareb">|</span> NOCASE<span class="squareb">]</span> <span class="squareb">[</span>DEFAULT '<span class="term">value</span>'<span class="squareb">]</span>
  [DEBLANK <span class="squareb">|</span> NODEBLANK] [PAD WITH '<span class="term">c</span>']  
  <span class="squareb">[</span>DEBLANK <span class="squareb">|</span> NODEBLANK<span class="squareb">]</span> <span class="squareb">[</span>PAD WITH '<span class="term">c</span>'<span class="squareb">]</span>
  [REQUIRED <span class="squareb">|</span> ALPHA <span class="squareb">|</span> ALPHANUM <span class="squareb">|</span> MUSTFILL  
  <span class="squareb">[</span>REQUIRED <span class="squareb">|</span> ALPHA <span class="squareb">|</span> ALPHANUM <span class="squareb">|</span> MUSTFILL  
  <span class="squareb">|</span> ONEOF <span class="term">literal</span> [, <span class="term">literal</span>]...  
  <span class="squareb">|</span> ONEOF <span class="term">literal</span> <span class="squareb">[</span>, <span class="term">literal</span><span class="squareb">]</span>...  
  <span class="squareb">|</span> [NUMERIC] [RANGE <span class="term">lo</span> [TO] <span class="term">hi</span> [AND <span class="term">lo</span> [TO] <span class="term">hi</span>] ...]  
  <span class="squareb">|</span> <span class="squareb">[</span>NUMERIC<span class="squareb">]</span> <span class="squareb">[</span>RANGE <span class="term">lo</span> <span class="squareb">[</span>TO<span class="squareb">]</span> <span class="term">hi</span> <span class="squareb">[</span>AND <span class="term">lo</span> <span class="squareb">[</span>TO<span class="squareb">]</span> <span class="term">hi</span><span class="squareb">]</span> ...<span class="squareb">]</span>
  <span class="squareb">|</span> VERIFY '<span class="term">characters</span>']...  
  <span class="squareb">|</span> VERIFY '<span class="term">characters</span>'<span class="squareb">]</span>...  
  [[READ] <span class="term">attributes</span>] [REREAD <span class="term">attributes</span>] [PRINT <span class="term">attributes</span>]  
  <span class="squareb">[</span><span class="squareb">[</span>READ<span class="squareb">]</span> <span class="term">attributes</span><span class="squareb">]</span> <span class="squareb">[</span>REREAD <span class="term">attributes</span><span class="squareb">]</span> <span class="squareb">[</span>PRINT <span class="term">attributes</span><span class="squareb">]</span>
  <span class="squareb">{</span>TAG [<span class="term">attributes</span>] [WITH '<span class="term">c</span>']] [ITEMID <span class="term">n</span>]
  <span class="squareb">{</span>TAG <span class="squareb">[</span><span class="term">attributes</span><span class="squareb">]</span> <span class="squareb">[</span>WITH '<span class="term">c</span>'<span class="squareb">]</span><span class="squareb">]</span> <span class="squareb">[</span>ITEMID <span class="term">n</span><span class="squareb">]</span>
</p>
</p>
   
   
Line 442: Line 441:
   
   
<p class="syntaxUL"><b><sup>(+)</sup></b>INVITE <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
<p class="syntaxUL"><b><sup>(+)</sup></b>INVITE <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
     [SYNCLEVEL <span class="squareb">|</span> FLUSH <span class="squareb">|</span> CONFIRM]<var> </var>
     <span class="squareb">[</span>SYNCLEVEL <span class="squareb">|</span> FLUSH <span class="squareb">|</span> CONFIRM<span class="squareb">]</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="syntaxUL"><span class="term">itemname</span> IS [TYPE]  
<p class="syntaxUL"><span class="term">itemname</span> IS <span class="squareb">[</span>TYPE<span class="squareb">]</span>
  <span class="squareb">{</span>STRING <span class="squareb">|</span> BINARY <span class="squareb">|</span> PACKED <span class="squareb">|</span> ZONED <span class="squareb">|</span> FLOAT <span class="squareb">|</span> EFORMAT<span class="squareb">}</span>  
  <span class="squareb">{</span>STRING <span class="squareb">|</span> BINARY <span class="squareb">|</span> PACKED <span class="squareb">|</span> ZONED <span class="squareb">|</span> FLOAT <span class="squareb">|</span> EFORMAT<span class="squareb">}</span>  
  <span class="squareb">{</span>LEN <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> UNKNOWN<span class="squareb">}</span> <span class="squareb">|</span> BITS <span class="term">n</span> <span class="squareb">|</span> DIGITS <span class="term">n</span>  
  <span class="squareb">{</span>LEN <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> UNKNOWN<span class="squareb">}</span> <span class="squareb">|</span> BITS <span class="term">n</span> <span class="squareb">|</span> DIGITS <span class="term">n</span>  
  <span class="squareb">|</span> TO <span class="term">position</span><span class="squareb">}</span>  
  <span class="squareb">|</span> TO <span class="term">position</span><span class="squareb">}</span>  
  [DP <span class="squareb">{</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span>] [BP <span class="term">n</span>] [SIGNED <span class="squareb">|</span> UNSIGNED]  
  <span class="squareb">[</span>DP <span class="squareb">{</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>BP <span class="term">n</span><span class="squareb">]</span> <span class="squareb">[</span>SIGNED <span class="squareb">|</span> UNSIGNED<span class="squareb">]</span>
  [PAD <span class="squareb">{</span>BLANK <span class="squareb">|</span> <span class="term">character</span> <span class="squareb">|</span> NULL<span class="squareb">}</span>] [STRIP <span class="squareb">|</span> NOSTRIP]  
  <span class="squareb">[</span>PAD <span class="squareb">{</span>BLANK <span class="squareb">|</span> <span class="term">character</span> <span class="squareb">|</span> NULL<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>STRIP <span class="squareb">|</span> NOSTRIP<span class="squareb">]</span>
  [ALIGN]  
  <span class="squareb">[</span>ALIGN<span class="squareb">]</span>
  [JUSTIFY <span class="squareb">{</span>LEFT <span class="squareb">|</span> RIGHT<span class="squareb">}</span>]  
  <span class="squareb">[</span>JUSTIFY <span class="squareb">{</span>LEFT <span class="squareb">|</span> RIGHT<span class="squareb">}</span><span class="squareb">]</span>
  [INITIAL <span class="squareb">{</span>BLANK <span class="squareb">|</span> ZERO <span class="squareb">|</span> NULL <span class="squareb">|</span> <span class="term">value</span><span class="squareb">}</span>]  
  <span class="squareb">[</span>INITIAL <span class="squareb">{</span>BLANK <span class="squareb">|</span> ZERO <span class="squareb">|</span> NULL <span class="squareb">|</span> <span class="term">value</span><span class="squareb">}</span><span class="squareb">]</span>
  [AFTER <span class="squareb">{</span><span class="term">itemname</span> <span class="squareb">|</span> <span class="term">arrayname</span><span class="squareb">}</span>  
  <span class="squareb">[</span>AFTER <span class="squareb">{</span><span class="term">itemname</span> <span class="squareb">|</span> <span class="term">arrayname</span><span class="squareb">}</span>  
  <span class="squareb">|</span> AT <span class="squareb">{</span><span class="term">position</span> <span class="squareb">|</span> <span class="term">itemname</span> <span class="squareb">|</span> <span class="term">imagename1</span> <span class="squareb">|</span> <span class="term">arrayname</span><span class="squareb">}</span>]
  <span class="squareb">|</span> AT <span class="squareb">{</span><span class="term">position</span> <span class="squareb">|</span> <span class="term">itemname</span> <span class="squareb">|</span> <span class="term">imagename1</span> <span class="squareb">|</span> <span class="term">arrayname</span><span class="squareb">}</span><span class="squareb">]</span>
  [OCCURS <span class="squareb">{</span><span class="term">n</span> [DEPENDING ON <span class="squareb">{</span><span class="term">itemname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>]
  <span class="squareb">[</span>OCCURS <span class="squareb">{</span><span class="term">n</span> <span class="squareb">[</span>DEPENDING ON <span class="squareb">{</span><span class="term">itemname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">]</span>
  <span class="squareb">|</span> UNKNOWN<span class="squareb">}</span>]
  <span class="squareb">|</span> UNKNOWN<span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>


Line 480: Line 479:
<hr>
<hr>
   
   
<p class="syntaxUL">[DECLARE] MENU <span class="term">menuname</span>  
<p class="syntaxUL"><span class="squareb">[</span>DECLARE<span class="squareb">]</span> MENU <span class="term">menuname</span>  
  [GLOBAL [PERMANENT <span class="squareb">|</span> TEMPORARY]  
  <span class="squareb">[</span>GLOBAL <span class="squareb">[</span>PERMANENT <span class="squareb">|</span> TEMPORARY<span class="squareb">]</span>
  <span class="squareb">|</span> [PERMANENT <span class="squareb">|</span> TEMPORARY] GLOBAL  
  <span class="squareb">|</span> <span class="squareb">[</span>PERMANENT <span class="squareb">|</span> TEMPORARY<span class="squareb">]</span> GLOBAL  
  <span class="squareb">|</span> COMMON]
  <span class="squareb">|</span> COMMON<span class="squareb">]</span>
</p>
</p>


Line 489: Line 488:
   
   
<p class="syntaxUL">MODIFY <span class="squareb">{</span><span class="term">%menuname</span>:<span class="term">itemname</span> <span class="squareb">|</span> <span class="term">%screenname</span>:<span class="term">itemname</span><span class="squareb">}</span>
<p class="syntaxUL">MODIFY <span class="squareb">{</span><span class="term">%menuname</span>:<span class="term">itemname</span> <span class="squareb">|</span> <span class="term">%screenname</span>:<span class="term">itemname</span><span class="squareb">}</span>
  [TO] <span class="term">attributes</span> [[FOR] <span class="squareb">{</span>ALL <span class="squareb">|</span> READ <span class="squareb">|</span> REREAD <span class="squareb">|</span> TAB  
  <span class="squareb">[</span>TO<span class="squareb">]</span> <span class="term">attributes</span> <span class="squareb">[</span><span class="squareb">[</span>FOR<span class="squareb">]</span> <span class="squareb">{</span>ALL <span class="squareb">|</span> READ <span class="squareb">|</span> REREAD <span class="squareb">|</span> TAB  
  <span class="squareb">|</span> PRINT<span class="squareb">}</span>]
  <span class="squareb">|</span> PRINT<span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">MODIFY BUFFER [SIZE=<span class="term">n</span>  
<p class="syntaxUL">MODIFY BUFFER <span class="squareb">[</span>SIZE=<span class="term">n</span>  
  <span class="squareb">|</span> <span class="term">%variable</span> [PRESERVE <span class="squareb">|</span> NOPRESERVE]]  
  <span class="squareb">|</span> <span class="term">%variable</span> <span class="squareb">[</span>PRESERVE <span class="squareb">|</span> NOPRESERVE<span class="squareb">]</span><span class="squareb">]</span>
  [FILL [X'<span class="term">nn</span>'] <span class="squareb">|</span> CLEAR]
  <span class="squareb">[</span>FILL <span class="squareb">[</span>X'<span class="term">nn</span>'<span class="squareb">]</span> <span class="squareb">|</span> CLEAR<span class="squareb">]</span>
</p>
</p>
   
   
Line 506: Line 505:
<hr>
<hr>
   
   
<p class="syntaxUL"><b><sup>(**)</sup></b>NOTE <var><span class="squareb">{</span></var><span class="term">fieldname</span> <span class="squareb">[</span>(<span class="term">subscript</span>)<var>]<span class="squareb">}</span></var>
<p class="syntaxUL"><b><sup>(**)</sup></b>NOTE <span class="squareb">{</span><span class="term">fieldname</span> <span class="squareb">[</span>(<span class="term">subscript</span>)<span class="squareb">]</span><span class="squareb">}</span>
</p>
</p>


Line 521: Line 520:
<hr>
<hr>
   
   
<p class="syntaxUL">OPEN <span class="squareb">{</span>[DATASET <span class="squareb">|</span> EXTERNAL] <span class="squareb">{</span><span class="term">ext-filename</span>  
<p class="syntaxUL">OPEN <span class="squareb">{</span><span class="squareb">[</span>DATASET <span class="squareb">|</span> EXTERNAL<span class="squareb">]</span> <span class="squareb">{</span><span class="term">ext-filename</span>  
   <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
   <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
   <span class="squareb">|</span> [EXTERNAL] <span class="squareb">{</span>TERMINAL <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>  
   <span class="squareb">|</span> <span class="squareb">[</span>EXTERNAL<span class="squareb">]</span> <span class="squareb">{</span>TERMINAL <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>  
   FOR <span class="squareb">{</span>INPUT [OUTPUT] <span class="squareb">|</span> OUTPUT [INPUT] <span class="squareb">|</span> INOUT<span class="squareb">}</span>  
   FOR <span class="squareb">{</span>INPUT <span class="squareb">[</span>OUTPUT<span class="squareb">]</span> <span class="squareb">|</span> OUTPUT <span class="squareb">[</span>INPUT<span class="squareb">]</span> <span class="squareb">|</span> INOUT<span class="squareb">}</span>  
   [PASSWORD <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>]
   <span class="squareb">[</span>PASSWORD <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="syntaxUL"><b><sup>(C)</sup></b>OPEN [C] [[PERM <span class="squareb">|</span> TEMP] GROUP <span class="squareb">|</span> FILE]  
<p class="syntaxUL"><b><sup>(C)</sup></b>OPEN <span class="squareb">[</span>C<span class="squareb">]</span> <span class="squareb">[</span><span class="squareb">[</span>PERM <span class="squareb">|</span> TEMP<span class="squareb">]</span> GROUP <span class="squareb">|</span> FILE<span class="squareb">]</span>
     <span class="squareb">{</span><span class="term">name</span> [AT <span class="squareb">{</span><span class="term">location</span> <span class="squareb">|</span> <span class="term">%variable</span> <span class="squareb">|</span> =<span class="squareb">}</span>] <span class="squareb">|</span> %variable<span class="squareb">}</span>  
     <span class="squareb">{</span><span class="term">name</span> <span class="squareb">[</span>AT <span class="squareb">{</span><span class="term">location</span> <span class="squareb">|</span> <span class="term">%variable</span> <span class="squareb">|</span> =<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">|</span> %variable<span class="squareb">}</span>  
     [PASSWORD <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>]
     <span class="squareb">[</span>PASSWORD <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>
   
   
Line 538: Line 537:
   
   
<p class="syntaxUL">OPEN PROCESS <span class="squareb">{</span><span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
<p class="syntaxUL">OPEN PROCESS <span class="squareb">{</span><span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  [CID <span class="squareb">{</span><span class="term">name</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>]
  <span class="squareb">[</span>CID <span class="squareb">{</span><span class="term">name</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>
   
   
Line 544: Line 543:
   
   
<p class="syntaxUL"><b><sup>(+)</sup></b>OPEN PROCESS <span class="squareb">{</span><span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
<p class="syntaxUL"><b><sup>(+)</sup></b>OPEN PROCESS <span class="squareb">{</span><span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
     [CID <span class="squareb">{</span><span class="term">name</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>]  
     <span class="squareb">[</span>CID <span class="squareb">{</span><span class="term">name</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">]</span>
     <span class="squareb">{</span><span class="term">outbound-options</span> <span class="squareb">|</span> <span class="term">inbound-options</span><span class="squareb">}</span>
     <span class="squareb">{</span><span class="term">outbound-options</span> <span class="squareb">|</span> <span class="term">inbound-options</span><span class="squareb">}</span>
</p>
</p>
Line 552: Line 551:
where <var class="term">outbound-options</var> are:</p>
where <var class="term">outbound-options</var> are:</p>
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li>[AT DESTINATION] [WITH] [USERID <span class="squareb">{</span><i>%variable</i> <span class="squareb">|</span> '<i>string</i>'<span class="squareb">}</span>]
<li><span class="squareb">[</span>AT DESTINATION<span class="squareb">]</span> <span class="squareb">[</span>WITH<span class="squareb">]</span> <span class="squareb">[</span>USERID <span class="squareb">{</span><i>%variable</i> <span class="squareb">|</span> '<i>string</i>'<span class="squareb">}</span><span class="squareb">]</span>
   
   
<li>[PASSWORD <span class="squareb">{</span><i>%variable</i> <span class="squareb">|</span> '<i>string</i>'<span class="squareb">}</span>]
<li><span class="squareb">[</span>PASSWORD <span class="squareb">{</span><i>%variable</i> <span class="squareb">|</span> '<i>string</i>'<span class="squareb">}</span><span class="squareb">]</span>
   
   
<li>[<span class="squareb">{</span>ACCOUNT <span class="squareb">|</span> PROFILE <span class="squareb">{</span>%<i>%variable</i> <span class="squareb">|</span> '<i>string</i>'<span class="squareb">}</span>]
<li>[<span class="squareb">{</span>ACCOUNT <span class="squareb">|</span> PROFILE <span class="squareb">{</span>%<i>%variable</i> <span class="squareb">|</span> '<i>string</i>'<span class="squareb">}</span><span class="squareb">]</span>
   
   
<li>[INITIAL <span class="squareb">{</span>DATA '<i>string</i>' <span class="squareb">|</span> DATA <i>%variable</i> <span class="squareb">|</span> IMAGE <i>imagename</i>] ...]
<li><span class="squareb">[</span>INITIAL <span class="squareb">{</span>DATA '<i>string</i>' <span class="squareb">|</span> DATA <i>%variable</i> <span class="squareb">|</span> IMAGE <i>imagename</i><span class="squareb">]</span> ...<span class="squareb">]</span>
</ul>
</ul>
   
   
Line 565: Line 564:
   
   
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li>ACCEPT [INITIAL <span class="squareb">{</span>DATA <i>%variable</i> <span class="squareb">|</span> IMAGE <i>image</i><span class="squareb">}</span> ...] </li>
<li>ACCEPT <span class="squareb">[</span>INITIAL <span class="squareb">{</span>DATA <i>%variable</i> <span class="squareb">|</span> IMAGE <i>image</i><span class="squareb">}</span> ...<span class="squareb">]</span> </li>
</ul>
</ul>
   
   
Line 582: Line 581:
<hr>
<hr>
   
   
<p class="syntaxUL">PLACE RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname1</span><span class="squareb">}</span> ON [LIST] <span class="term">listname2</span>
<p class="syntaxUL">PLACE RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname1</span><span class="squareb">}</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname2</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="syntaxUL">POSITION <span class="squareb">{</span>FOUNDSET <span class="term">foundsortset_name</span> <span class="squareb">|</span> LIST <span class="term">list_name</span><span class="squareb">}</span> [AT] <span class="term">position_name</span></p>
<p class="syntaxUL">POSITION <span class="squareb">{</span>FOUNDSET <span class="term">foundsortset_name</span> <span class="squareb">|</span> LIST <span class="term">list_name</span><span class="squareb">}</span> <span class="squareb">[</span>AT<span class="squareb">]</span> <span class="term">position_name</span></p>


<p class="note"><b>Note:</b> Use this form of the POSITION statement with FOR loop processing; see [[Global features#POSITION statement|POSITION statement]].</p>
<p class="note"><b>Note:</b> Use this form of the POSITION statement with FOR loop processing; see [[Global features#POSITION statement|POSITION statement]].</p>
Line 600: Line 599:
   
   
<p class="syntaxUL">PREPARE  
<p class="syntaxUL">PREPARE  
  <span class="squareb">{</span>[IMAGE] <span class="term">imagename</span> <span class="squareb">|</span> [MENU] <span class="term">menuname</span>  
  <span class="squareb">{</span><span class="squareb">[</span>IMAGE<span class="squareb">]</span> <span class="term">imagename</span> <span class="squareb">|</span> <span class="squareb">[</span>MENU<span class="squareb">]</span> <span class="term">menuname</span>  
  <span class="squareb">|</span> [SCREEN] <span class="term">screenname</span><span class="squareb">}</span>
  <span class="squareb">|</span> <span class="squareb">[</span>SCREEN<span class="squareb">]</span> <span class="term">screenname</span><span class="squareb">}</span>
</p>
</p>


Line 611: Line 610:
   
   
<p class="syntaxUL"><b><sup>(**)</sup></b><span class="squareb">{</span>PAI <span class="squareb">|</span> PRINT ALL INFORMATION<span class="squareb">}</span>  
<p class="syntaxUL"><b><sup>(**)</sup></b><span class="squareb">{</span>PAI <span class="squareb">|</span> PRINT ALL INFORMATION<span class="squareb">}</span>  
     INTO <span class="term">array1</span>, <span class="term">array2</span> [, <span class="term">array3</span>] [FROM <span class="term">start</span>] [COUNT <span class="term">ct</span>]
     INTO <span class="term">array1</span>, <span class="term">array2</span> <span class="squareb">[</span>, <span class="term">array3</span><span class="squareb">]</span> <span class="squareb">[</span>FROM <span class="term">start</span><span class="squareb">]</span> <span class="squareb">[</span>COUNT <span class="term">ct</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">PRINT [MENU] <span class="term">menuname</span> [ALERT]  
<p class="syntaxUL">PRINT <span class="squareb">[</span>MENU<span class="squareb">]</span> <span class="term">menuname</span> <span class="squareb">[</span>ALERT<span class="squareb">]</span>
  [TITLE <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> [AT [COLUMN] <span class="term">n</span>]  
  <span class="squareb">[</span>TITLE <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> <span class="squareb">[</span>AT <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">n</span><span class="squareb">]</span>
  [TO [COLUMN] <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span>] [<span class="term">attributes</span>]]
  <span class="squareb">[</span>TO <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span><span class="squareb">]</span> <span class="squareb">[</span><span class="term">attributes</span><span class="squareb">]</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">PRINT SCREEN <span class="term">screenname</span> [ALERT] [[WITH] CURSOR]  
<p class="syntaxUL">PRINT SCREEN <span class="term">screenname</span> <span class="squareb">[</span>ALERT<span class="squareb">]</span> <span class="squareb">[</span><span class="squareb">[</span>WITH<span class="squareb">]</span> CURSOR<span class="squareb">]</span>
  [TITLE <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> [AT [COLUMN] <span class="term">n</span>]  
  <span class="squareb">[</span>TITLE <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> <span class="squareb">[</span>AT <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">n</span><span class="squareb">]</span>
  [TO [COLUMN] <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span>] [<span class="term">attributes</span>]]
  <span class="squareb">[</span>TO <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span><span class="squareb">]</span> <span class="squareb">[</span><span class="term">attributes</span><span class="squareb">]</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">PROMPT <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">promptname</span><span class="squareb">}</span> [AT [COLUMN] <span class="term">n</span>]  
<p class="syntaxUL">PROMPT <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">promptname</span><span class="squareb">}</span> <span class="squareb">[</span>AT <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">n</span><span class="squareb">]</span>
  [TO [COLUMN] <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span>] [DP <span class="squareb">{</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span>]] [DEFAULT '<span class="term">value</span>']  
  <span class="squareb">[</span>TO <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span><span class="squareb">]</span> <span class="squareb">[</span>DP <span class="squareb">{</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span><span class="squareb">]</span> <span class="squareb">[</span>DEFAULT '<span class="term">value</span>'<span class="squareb">]</span>
  [[READ] <span class="term">attributes</span>] [REREAD <span class="term">attributes</span>]  
  <span class="squareb">[</span><span class="squareb">[</span>READ<span class="squareb">]</span> <span class="term">attributes</span><span class="squareb">]</span> <span class="squareb">[</span>REREAD <span class="term">attributes</span><span class="squareb">]</span>
  [PRINT <span class="term">attributes</span>] [ITEMID <span class="term">n</span>]
  <span class="squareb">[</span>PRINT <span class="term">attributes</span><span class="squareb">]</span> <span class="squareb">[</span>ITEMID <span class="term">n</span><span class="squareb">]</span>
</p>
</p>


Line 659: Line 658:
<hr>
<hr>
   
   
<p class="syntaxUL">READ [IMAGE] <span class="term">imagename</span>  
<p class="syntaxUL">READ <span class="squareb">[</span>IMAGE<span class="squareb">]</span> <span class="term">imagename</span>  
  FROM <span class="squareb">{</span><span class="term">ext-filename</span> <span class="squareb">|</span> TERMINAL <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  FROM <span class="squareb">{</span><span class="term">ext-filename</span> <span class="squareb">|</span> TERMINAL <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  [PROMPT <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>]  
  <span class="squareb">[</span>PROMPT <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">]</span>
  [NEXT <span class="squareb">|</span> KEY <span class="term">operator</span> <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>]  
  <span class="squareb">[</span>NEXT <span class="squareb">|</span> KEY <span class="term">operator</span> <span class="squareb">{</span><span class="term">value</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">READ [IMAGE] <span class="term">imagename</span> FROM BUFFER  
<p class="syntaxUL">READ <span class="squareb">[</span>IMAGE<span class="squareb">]</span> <span class="term">imagename</span> FROM BUFFER  
   [POSITION=<span class="squareb">{</span><span class="term">%pvariable</span> <span class="squareb">|</span> <span class="term">n</span><span class="squareb">}</span>]  
   <span class="squareb">[</span>POSITION=<span class="squareb">{</span><span class="term">%pvariable</span> <span class="squareb">|</span> <span class="term">n</span><span class="squareb">}</span><span class="squareb">]</span>
   [MAXLEN=<span class="squareb">{</span><span class="term">%lvariable</span> <span class="squareb">|</span> <span class="term">n</span><span class="squareb">}</span>]  
   <span class="squareb">[</span>MAXLEN=<span class="squareb">{</span><span class="term">%lvariable</span> <span class="squareb">|</span> <span class="term">n</span><span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">READ [MENU] <span class="term">menuname</span> [ALERT]  
<p class="syntaxUL">READ <span class="squareb">[</span>MENU<span class="squareb">]</span> <span class="term">menuname</span> <span class="squareb">[</span>ALERT<span class="squareb">]</span>
  [TITLE ['<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> [AT [COLUMN] <span class="term">n</span>]  
  <span class="squareb">[</span>TITLE <span class="squareb">[</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> <span class="squareb">[</span>AT <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">n</span><span class="squareb">]</span>
  [TO [COLUMN] <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span>] [<span class="term">attributes</span>]]
  <span class="squareb">[</span>TO <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span><span class="squareb">]</span> <span class="squareb">[</span><span class="term">attributes</span><span class="squareb">]</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">READ <span class="squareb">[</span>SCREEN<span class="squareb">]</span> <span class="term">screenname</span> <span class="squareb">[</span>ALERT<span class="squareb">]</span> <span class="squareb">[</span>NO REREAD<span class="squareb">]</span> <var>[ [</var>WITH<span class="squareb">]</span> CURSOR<span class="squareb">]</span>  
<p class="syntaxUL">READ <span class="squareb">[</span>SCREEN<span class="squareb">]</span> <span class="term">screenname</span> <span class="squareb">[</span>ALERT<span class="squareb">]</span> <span class="squareb">[</span>NO REREAD<span class="squareb">]</span> <span class="squareb">[</span> <span class="squareb">[</span>WITH<span class="squareb">]</span> CURSOR<span class="squareb">]</span>  
  [TITLE <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> [AT [COLUMN] <span class="term">n</span>]  
  <span class="squareb">[</span>TITLE <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> <span class="squareb">[</span>AT <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">n</span><span class="squareb">]</span>
  [TO [COLUMN] <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span>] [<span class="term">attributes</span>]]
  <span class="squareb">[</span>TO <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span><span class="squareb">]</span> <span class="squareb">[</span><span class="term">attributes</span><span class="squareb">]</span><span class="squareb">]</span>
</p>
</p>


Line 689: Line 688:
   
   
<p class="syntaxUL">RECEIVE <span class="squareb">{</span>IMAGE <span class="term">imagename</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
<p class="syntaxUL">RECEIVE <span class="squareb">{</span>IMAGE <span class="term">imagename</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  FROM <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> [RESULT <span class="term">%variable</span>]
  FROM <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> <span class="squareb">[</span>RESULT <span class="term">%variable</span><span class="squareb">]</span>
</p>
</p>
   
   
Line 710: Line 709:
<hr>
<hr>
   
   
<p class="syntaxUL">RELEASE RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname</span><span class="squareb">}</span>
<p class="syntaxUL">RELEASE RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">}</span>
</p>
</p>
   
   
Line 716: Line 715:
   
   
<p class="syntaxUL"><b><sup>(**)</sup></b>REMEMBER <span class="squareb">[</span>GLOBAL<span class="squareb">]</span> <span class="term">position_name</span>  
<p class="syntaxUL"><b><sup>(**)</sup></b>REMEMBER <span class="squareb">[</span>GLOBAL<span class="squareb">]</span> <span class="term">position_name</span>  
     [IN <span class="term">foundsortset_name</span> <span class="squareb">|</span> ON <span class="term">list_name</span>]
     <span class="squareb">[</span>IN <span class="term">foundsortset_name</span> <span class="squareb">|</span> ON <span class="term">list_name</span><span class="squareb">]</span>
</p>
</p>
   
   
Line 726: Line 725:
<hr>
<hr>
   
   
<p class="syntaxUL">REMOVE RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname</span><span class="squareb">}</span>  
<p class="syntaxUL">REMOVE RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">}</span>  
  FROM [LIST] <span class="term">listname2</span>
  FROM <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname2</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="syntaxUL">REPEAT [FOREVER <span class="squareb">|</span> <span class="term">n</span> TIMES <span class="squareb">|</span> WHILE <span class="term">expression</span>]
<p class="syntaxUL">REPEAT <span class="squareb">[</span>FOREVER <span class="squareb">|</span> <span class="term">n</span> TIMES <span class="squareb">|</span> WHILE <span class="term">expression</span><span class="squareb">]</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="syntaxUL">REREAD [SCREEN] <span class="term">screenname</span> [ALERT] [[WITH] CURSOR]  
<p class="syntaxUL">REREAD <span class="squareb">[</span>SCREEN<span class="squareb">]</span> <span class="term">screenname</span> <span class="squareb">[</span>ALERT<span class="squareb">]</span> <span class="squareb">[</span><span class="squareb">[</span>WITH<span class="squareb">]</span> CURSOR<span class="squareb">]</span>
  [TITLE <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> [AT [COLUMN] <span class="term">n</span>]  
  <span class="squareb">[</span>TITLE <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> <span class="squareb">[</span>AT <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">n</span><span class="squareb">]</span>
  [TO [COLUMN] <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span>] [<span class="term">attributes</span>]]
  <span class="squareb">[</span>TO <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">m</span> <span class="squareb">|</span> LEN <span class="term">m</span><span class="squareb">]</span> <span class="squareb">[</span><span class="term">attributes</span><span class="squareb">]</span><span class="squareb">]</span>
</p>
</p>


Line 759: Line 758:
<hr>
<hr>
   
   
<p class="syntaxUL">[DECLARE] SCREEN <span class="term">screenname</span>  
<p class="syntaxUL"><span class="squareb">[</span>DECLARE<span class="squareb">]</span> SCREEN <span class="term">screenname</span>  
  [GLOBAL [<u><b>PERM</b>ANENT</u> <span class="squareb">|</span> <b>TEMP</b>ORARY]  
  <span class="squareb">[</span>GLOBAL [<u><b>PERM</b>ANENT</u> <span class="squareb">|</span> <b>TEMP</b>ORARY<span class="squareb">]</span>
  <span class="squareb">|</span> [<u><b>PERM</b>ANENT</u> <span class="squareb">|</span> <b>TEMP</b>ORARY] GLOBAL  
  <span class="squareb">|</span> [<u><b>PERM</b>ANENT</u> <span class="squareb">|</span> <b>TEMP</b>ORARY<span class="squareb">]</span> GLOBAL  
  <span class="squareb">|</span> COMMON]
  <span class="squareb">|</span> COMMON<span class="squareb">]</span>
</p>
</p>


Line 769: Line 768:
<p class="syntaxUL">SEND <span class="squareb">{</span>IMAGE <span class="term">imagename</span> <span class="squareb">|</span> '<span class="term">string</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
<p class="syntaxUL">SEND <span class="squareb">{</span>IMAGE <span class="term">imagename</span> <span class="squareb">|</span> '<span class="term">string</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  TO <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  TO <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  [REQSEND <span class="term">%variable</span>]  
  <span class="squareb">[</span>REQSEND <span class="term">%variable</span><span class="squareb">]</span>
  [FLUSH]
  <span class="squareb">[</span>FLUSH<span class="squareb">]</span>
</p>
</p>


Line 777: Line 776:
<p class="syntaxUL"><b><sup>(+)</sup></b>SEND <span class="squareb">{</span>IMAGE <span class="term">imagename</span> <span class="squareb">|</span> '<span class="term">string</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
<p class="syntaxUL"><b><sup>(+)</sup></b>SEND <span class="squareb">{</span>IMAGE <span class="term">imagename</span> <span class="squareb">|</span> '<span class="term">string</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
     TO <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
     TO <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
     [FLUSH <span class="squareb">|</span> CONFIRM]  
     <span class="squareb">[</span>FLUSH <span class="squareb">|</span> CONFIRM<span class="squareb">]</span>
     [REQSEND <span class="term">%variable</span>]
     <span class="squareb">[</span>REQSEND <span class="term">%variable</span><span class="squareb">]</span>
</p>
</p>


Line 811: Line 810:
<hr>
<hr>
   
   
<p class="syntaxUL">[<span class="term">itemname</span> IS] SKIP <span class="term">n</span> POSITION[S]  
<p class="syntaxUL">[<span class="term">itemname</span> IS<span class="squareb">]</span> SKIP <span class="term">n</span> POSITION<span class="squareb">[</span>S<span class="squareb">]</span>
  [INITIAL <span class="squareb">{</span>NULL <span class="squareb">|</span> <span class="term">character</span> <span class="squareb">|</span> BLANK<span class="squareb">}</span>]
  <span class="squareb">[</span>INITIAL <span class="squareb">{</span>NULL <span class="squareb">|</span> <span class="term">character</span> <span class="squareb">|</span> BLANK<span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">SORT [<span class="term">k</span>] RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname</span><span class="squareb">}</span>  
<p class="syntaxUL">SORT [<span class="term">k</span><span class="squareb">]</span> RECORDS <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">}</span>  
  BY <span class="term">key</span> [AND <span class="term">key</span>] ...
  BY <span class="term">key</span> <span class="squareb">[</span>AND <span class="term">key</span><span class="squareb">]</span> ...
</p>
</p>
   
   
Line 826: Line 825:
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li><i>key</i> = <i>fieldname</i> <br>
<li><i>key</i> = <i>fieldname</i> <br>
       [VALUE <span class="squareb">{</span>[ASCENDING <span class="squareb">|</span> DESCENDING] <br>
       <span class="squareb">[</span>VALUE <span class="squareb">{</span><span class="squareb">[</span>ASCENDING <span class="squareb">|</span> DESCENDING<span class="squareb">]</span> <br>
       [CHARACTER <span class="squareb">|</span> NUMERICAL] <span class="squareb">|</span> RIGHT-ADJUSTED]<span class="squareb">}</span> ...] </li>
       <span class="squareb">[</span>CHARACTER <span class="squareb">|</span> NUMERICAL<span class="squareb">]</span> <span class="squareb">|</span> RIGHT-ADJUSTED<span class="squareb">]</span><span class="squareb">}</span> ...<span class="squareb">]</span> </li>
</ul>
</ul>
   
   
Line 834: Line 833:
<hr>
<hr>
   
   
<p class="syntaxUL">SORT [<span class="term">k</span>] RECORD KEYS
<p class="syntaxUL">SORT [<span class="term">k</span><span class="squareb">]</span> RECORD KEYS
  <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON [LIST] <span class="term">listname</span><span class="squareb">}</span>  
  <span class="squareb">{</span>IN <span class="term">label</span> <span class="squareb">|</span> ON <span class="squareb">[</span>LIST<span class="squareb">]</span> <span class="term">listname</span><span class="squareb">}</span>  
  BY <span class="term">key</span> [AND <span class="term">key</span>] ...
  BY <span class="term">key</span> <span class="squareb">[</span>AND <span class="term">key</span><span class="squareb">]</span> ...
</p>
</p>
   
   
Line 844: Line 843:
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li><i>key</i> = <i>fieldname</i> <br>
<li><i>key</i> = <i>fieldname</i> <br>
       [VALUE <span class="squareb">{</span>[ASCENDING <span class="squareb">|</span> DESCENDING] <br>
       <span class="squareb">[</span>VALUE <span class="squareb">{</span><span class="squareb">[</span>ASCENDING <span class="squareb">|</span> DESCENDING<span class="squareb">]</span> <br>
       [CHARACTER <span class="squareb">|</span> NUMERICAL] <span class="squareb">|</span> [RIGHT-ADJUSTED]<span class="squareb">}</span> ...] </li>
       <span class="squareb">[</span>CHARACTER <span class="squareb">|</span> NUMERICAL<span class="squareb">]</span> <span class="squareb">|</span> <span class="squareb">[</span>RIGHT-ADJUSTED<span class="squareb">]</span><span class="squareb">}</span> ...<span class="squareb">]</span> </li>
</ul>
</ul>
   
   
Line 852: Line 851:
<hr>
<hr>
   
   
<p class="syntaxUL">SORT VALUE IN <span class="term">label</span> [IN [ASCENDING <span class="squareb">|</span> DESCENDING]  
<p class="syntaxUL">SORT VALUE IN <span class="term">label</span> <span class="squareb">[</span>IN <span class="squareb">[</span>ASCENDING <span class="squareb">|</span> DESCENDING<span class="squareb">]</span>
  [<u>CHARACTER</u> <span class="squareb">|</span> NUMERICAL] <span class="squareb">|</span> [RIGHT-ADJUSTED] ORDER]
  [<u>CHARACTER</u> <span class="squareb">|</span> NUMERICAL<span class="squareb">]</span> <span class="squareb">|</span> <span class="squareb">[</span>RIGHT-ADJUSTED<span class="squareb">]</span> ORDER<span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">STOP [IF COUNT IN <span class="term">label</span> EXCEEDS <span class="term">n</span>]
<p class="syntaxUL">STOP <span class="squareb">[</span>IF COUNT IN <span class="term">label</span> EXCEEDS <span class="term">n</span><span class="squareb">]</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="syntaxUL"><b><sup>(*)</sup></b>STORE RECORD [<span class="term">sort or hash key value</span>]  
<p class="syntaxUL"><b><sup>(*)</sup></b>STORE RECORD [<span class="term">sort or hash key value</span><span class="squareb">]</span>
   <span class="term">fieldname1</span>=[<span class="term">value1</span> <span class="squareb">|</span> (<span class="term">expression1</span>)]  
   <span class="term">fieldname1</span>=[<span class="term">value1</span> <span class="squareb">|</span> (<span class="term">expression1</span>)<span class="squareb">]</span>
   [<span class="term">fieldname2</span>=(<span class="term">expression</span>)]  
   [<span class="term">fieldname2</span>=(<span class="term">expression</span>)<span class="squareb">]</span>
   ...  
   ...  
   [THEN CONTINUE  
   <span class="squareb">[</span>THEN CONTINUE  
       <span class="term">statement</span>  
       <span class="term">statement</span>  
       <span class="term">statement</span>  
       <span class="term">statement</span>  
       ...]  
       ...<span class="squareb">]</span>
   END STORE
   END STORE
</p>
</p>
Line 882: Line 881:
   
   
<p class="syntaxUL">SUBROUTINE <span class="term">subname</span>  
<p class="syntaxUL">SUBROUTINE <span class="term">subname</span>  
  [(<span class="term">formal-parameter</span> [INPUT <span class="squareb">|</span> OUTPUT <span class="squareb">|</span> INPUT OUTPUT] [,...])]
  <span class="squareb">[</span>(<span class="term">formal-parameter</span> <span class="squareb">[</span>INPUT <span class="squareb">|</span> OUTPUT <span class="squareb">|</span> INPUT OUTPUT<span class="squareb">]</span> <span class="squareb">[</span>,...<span class="squareb">]</span>)<span class="squareb">]</span>
</p>
</p>
   
   
Line 889: Line 888:
where <var class="term">formal-parameter</var> is one of the following:</p>
where <var class="term">formal-parameter</var> is one of the following:</p>
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li><i>%variable</i> [IS STRING [LEN <i>n</i>] [DP <span class="squareb">{</span><i>n</i> <span class="squareb">|</span> *<span class="squareb">}</span>] [ARRAY (*[,*[,*]]) [NO FS]] <br>
<li><i>%variable</i> <span class="squareb">[</span>IS STRING <span class="squareb">[</span>LEN <i>n</i><span class="squareb">]</span> <span class="squareb">[</span>DP <span class="squareb">{</span><i>n</i> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>ARRAY (*<span class="squareb">[</span>,*<span class="squareb">[</span>,*<span class="squareb">]</span><span class="squareb">]</span>) <span class="squareb">[</span>NO FS<span class="squareb">]</span><span class="squareb">]</span> <br>
           <span class="squareb">|</span> IS <span class="squareb">{</span>FIXED [DP <i>n</i>] <span class="squareb">|</span> FLOAT<span class="squareb">}</span> [ARRAY (*[,*[,*]])]]
           <span class="squareb">|</span> IS <span class="squareb">{</span>FIXED <span class="squareb">[</span>DP <i>n</i><span class="squareb">]</span> <span class="squareb">|</span> FLOAT<span class="squareb">}</span> <span class="squareb">[</span>ARRAY (*<span class="squareb">[</span>,*<span class="squareb">[</span>,*<span class="squareb">]</span><span class="squareb">]</span>)<span class="squareb">]</span><span class="squareb">]</span>
   
   
<li>LIST <i>listname</i> [IN [FILE <span class="squareb">|</span> [PERM <span class="squareb">|</span> TEMP] GROUP] <i>name</i>]
<li>LIST <i>listname</i> <span class="squareb">[</span>IN <span class="squareb">[</span>FILE <span class="squareb">|</span> <span class="squareb">[</span>PERM <span class="squareb">|</span> TEMP<span class="squareb">]</span> GROUP<span class="squareb">]</span> <i>name</i><span class="squareb">]</span>
</ul>
</ul>
</div>
</div>
Line 903: Line 902:
<hr>
<hr>
   
   
<p class="syntaxUL"><b><sup>(+)</sup></b>TEST [FOR]  
<p class="syntaxUL"><b><sup>(+)</sup></b>TEST <span class="squareb">[</span>FOR<span class="squareb">]</span>
     <span class="squareb">{</span>ANY RECEIPT RETURN <span class="term">%variable</span>  
     <span class="squareb">{</span>ANY RECEIPT RETURN <span class="term">%variable</span>  
     <span class="squareb">|</span> RECEIPT <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>
     <span class="squareb">|</span> RECEIPT <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>
Line 911: Line 910:
   
   
<p class="syntaxUL">TITLE <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">promptname</span><span class="squareb">}</span>  
<p class="syntaxUL">TITLE <span class="squareb">{</span>'<span class="term">text</span>' <span class="squareb">|</span> <span class="term">promptname</span><span class="squareb">}</span>  
  [AT [COLUMN] <span class="term">n</span>]  [TO [COLUMN] <span class="term">m</span> <span class="squareb">|</span> [LEN <span class="term">m</span>]   
  <span class="squareb">[</span>AT <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">n</span><span class="squareb">]</span> <span class="squareb">[</span>TO <span class="squareb">[</span>COLUMN<span class="squareb">]</span> <span class="term">m</span> <span class="squareb">|</span> <span class="squareb">[</span>LEN <span class="term">m</span><span class="squareb">]</span>  
  [DP <span class="squareb">{</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span>]]  
  <span class="squareb">[</span>DP <span class="squareb">{</span><span class="term">k</span> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span><span class="squareb">]</span>
  [DEFAULT '<span class="term">value</span>']  
  <span class="squareb">[</span>DEFAULT '<span class="term">value</span>'<span class="squareb">]</span>
  [[READ] <span class="term">attributes</span>]  [REREAD <span class="term">attributes</span>]  [PRINT <span class="term">attributes</span>]  
  <span class="squareb">[</span><span class="squareb">[</span>READ<span class="squareb">]</span> <span class="term">attributes</span><span class="squareb">]</span> <span class="squareb">[</span>REREAD <span class="term">attributes</span><span class="squareb">]</span> <span class="squareb">[</span>PRINT <span class="term">attributes</span><span class="squareb">]</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="syntaxUL">TRANSFER [CONTROL] TO PROCESS <span class="squareb">{</span><span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
<p class="syntaxUL">TRANSFER <span class="squareb">[</span>CONTROL<span class="squareb">]</span> TO PROCESS <span class="squareb">{</span><span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>  
  [WITH] [USERID <span class="squareb">{</span><span class="term">string</span> <span class="squareb">|</span> '<span class="term">%variable</span>'<span class="squareb">}</span>]  
  <span class="squareb">[</span>WITH<span class="squareb">]</span> <span class="squareb">[</span>USERID <span class="squareb">{</span><span class="term">string</span> <span class="squareb">|</span> '<span class="term">%variable</span>'<span class="squareb">}</span><span class="squareb">]</span>
  [PASSWORD <span class="squareb">{</span><span class="term">variable</span> <span class="squareb">|</span> '<span class="term">string</span>'<span class="squareb">}</span>]  
  <span class="squareb">[</span>PASSWORD <span class="squareb">{</span><span class="term">variable</span> <span class="squareb">|</span> '<span class="term">string</span>'<span class="squareb">}</span><span class="squareb">]</span>
  [ACCOUNT <span class="squareb">{</span><span class="term">%variable</span> <span class="squareb">|</span> '<span class="term">string</span>'<span class="squareb">}</span>]  
  <span class="squareb">[</span>ACCOUNT <span class="squareb">{</span><span class="term">%variable</span> <span class="squareb">|</span> '<span class="term">string</span>'<span class="squareb">}</span><span class="squareb">]</span>
  [PASSING <span class="squareb">{</span>IMAGE <span class="term">imagename</span> <span class="squareb">|</span> '<span class="term">string</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>]
  <span class="squareb">[</span>PASSING <span class="squareb">{</span>IMAGE <span class="term">imagename</span> <span class="squareb">|</span> '<span class="term">string</span>' <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>


Line 933: Line 932:
   
   
<p class="syntaxUL">VARIABLES ARE  
<p class="syntaxUL">VARIABLES ARE  
  <span class="squareb">{</span>FIXED [DP <span class="term">n</span>]  <span class="squareb">|</span> FLOAT  
  <span class="squareb">{</span>FIXED <span class="squareb">[</span>DP <span class="term">n</span><span class="squareb">]</span> <span class="squareb">|</span> FLOAT  
  <span class="squareb">|</span> STRING [LEN <span class="term">n</span>]  [DP <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> *<span class="squareb">}</span>]  
  <span class="squareb">|</span> STRING <span class="squareb">[</span>LEN <span class="term">n</span><span class="squareb">]</span> <span class="squareb">[</span>DP <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span>
  <span class="squareb">|</span> UNDEFINED<span class="squareb">}</span>  
  <span class="squareb">|</span> UNDEFINED<span class="squareb">}</span>  
</p>
</p>
Line 940: Line 939:
<hr>
<hr>
   
   
<p class="syntaxUL">[DECLARE] <span class="term">%variable</span> [IS]  
<p class="syntaxUL"><span class="squareb">[</span>DECLARE<span class="squareb">]</span> <span class="term">%variable</span> <span class="squareb">[</span>IS<span class="squareb">]</span>
  <span class="squareb">{</span>FIXED [DP <span class="term">n</span>]  <span class="squareb">|</span> FLOAT<span class="squareb">}</span> [ARRAY (<span class="term">d1</span>[,<span class="term">d2</span>[,<span class="term">d3</span>]])]  
  <span class="squareb">{</span>FIXED <span class="squareb">[</span>DP <span class="term">n</span><span class="squareb">]</span> <span class="squareb">|</span> FLOAT<span class="squareb">}</span> <span class="squareb">[</span>ARRAY (<span class="term">d1</span><span class="squareb">[</span>,<span class="term">d2</span><span class="squareb">[</span>,<span class="term">d3</span><span class="squareb">]</span><span class="squareb">]</span>)<span class="squareb">]</span>
  [COMMON]
  <span class="squareb">[</span>COMMON<span class="squareb">]</span>
</p>
</p>


<hr>
<hr>
   
   
<p class="syntaxUL">[DECLARE] <span class="term">%variable</span> [IS]  
<p class="syntaxUL"><span class="squareb">[</span>DECLARE<span class="squareb">]</span> <span class="term">%variable</span> <span class="squareb">[</span>IS<span class="squareb">]</span>
  STRING [LEN <span class="term">n</span>]  [DP <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> *<span class="squareb">}</span>] [ARRAY (<span class="term">d1</span>[,<span class="term">d2</span>[<span class="term">d3</span>]])]  
  STRING <span class="squareb">[</span>LEN <span class="term">n</span><span class="squareb">]</span> <span class="squareb">[</span>DP <span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> *<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>ARRAY (<span class="term">d1</span><span class="squareb">[</span>,<span class="term">d2</span>[<span class="term">d3</span><span class="squareb">]</span><span class="squareb">]</span>)<span class="squareb">]</span>
  [NO FIELD SAVE] [COMMON]  
  <span class="squareb">[</span>NO FIELD SAVE<span class="squareb">]</span> <span class="squareb">[</span>COMMON<span class="squareb">]</span>
  <span class="term">%variable</span> [(<span class="term">subscript</span>)] = <span class="term">expression</span>
  <span class="term">%variable</span> <span class="squareb">[</span>(<span class="term">subscript</span>)<span class="squareb">]</span> = <span class="term">expression</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="syntaxUL"><b><sup>(+)</sup></b>WAIT [<span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> SEC[S]] [FOR]  
<p class="syntaxUL"><b><sup>(+)</sup></b>WAIT [<span class="squareb">{</span><span class="term">n</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span> SEC<span class="squareb">[</span>S<span class="squareb">]</span><span class="squareb">]</span> <span class="squareb">[</span>FOR<span class="squareb">]</span>
     <span class="squareb">{</span>ANY RECEIPT RETURN <span class="term">%variable</span>  
     <span class="squareb">{</span>ANY RECEIPT RETURN <span class="term">%variable</span>  
     <span class="squareb">|</span> RECEIPT <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>
     <span class="squareb">|</span> RECEIPT <span class="squareb">{</span><span class="term">cid</span> <span class="squareb">|</span> <span class="term">processname</span> <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span><span class="squareb">}</span>
Line 962: Line 961:
<hr>
<hr>
   
   
<p class="syntaxUL">WRITE [IMAGE] <span class="term">imagename</span>  
<p class="syntaxUL">WRITE <span class="squareb">[</span>IMAGE<span class="squareb">]</span> <span class="term">imagename</span>  
  ON <span class="squareb">{</span><span class="term">seq-filename</span> <span class="squareb">|</span> TERMINAL <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>
  ON <span class="squareb">{</span><span class="term">seq-filename</span> <span class="squareb">|</span> TERMINAL <span class="squareb">|</span> <span class="term">%variable</span><span class="squareb">}</span>
</p>
</p>
Line 969: Line 968:
   
   
<p class="syntaxUL">WRITE IMAGE <span class="term">imagename</span> ON BUFFER  
<p class="syntaxUL">WRITE IMAGE <span class="term">imagename</span> ON BUFFER  
   [POSITION=<span class="term">%pvariable</span> <span class="squareb">|</span> <span class="term">n</span>]  [MAXLEN=<span class="squareb">{</span><span class="term">%lvariable</span> <span class="squareb">|</span> <span class="term">n</span><span class="squareb">}</span>]
   <span class="squareb">[</span>POSITION=<span class="term">%pvariable</span> <span class="squareb">|</span> <span class="term">n</span><span class="squareb">]</span> <span class="squareb">[</span>MAXLEN=<span class="squareb">{</span><span class="term">%lvariable</span> <span class="squareb">|</span> <span class="term">n</span><span class="squareb">}</span><span class="squareb">]</span>
</p>
</p>



Revision as of 04:12, 22 January 2014

Overview

This topic summarizes User Language syntax and conventions, many of which are also discussed throughout this manual.

The statements are listed in alphabetical order. Later sections in this topic provide other User Language syntax information.

All of the User Language statements listed can be used between a BEGIN (or MORE) command and an END (or END MORE) statement.

All system control commands are presented in the List of Model 204 commands.

Notation conventions

This page uses the following syntax notation conventions:

Syntax notation Indicates that...
Single asterisk (*) Statements can be preceded by an IN clause, if there is no reference to a previous set (label or list). See IN clause syntax for more discussion.
Two asterisks (**) Construct can appear only within a record loop.
Plus sign (+) Construct requires the optional Horizon feature.
Two plus signs (++) Construct requires the optional User Language to Database 2 feature.
C The syntax applies to a Model 204 command as well as a User Language statement, except any %variable options or clauses.

Model 204 commands are listed alphabetically and documented in List of Model 204 commands.

Lowercase italic Constructs are replaced with variable information.
  • A field name (%%) variable can be used anywhere fieldname appears. The %%variable can contain its own subscript, separate from the field name subscript.

    Note: The subscript of an array element must be specified before a field name subscript.

  • The lowercase constructs — retrieval-conditions, print-specifications, expression, subscript, attribute, and type — are discussed separately following the syntax summaries, beginning with Value specification syntax.

User Language statements

(**)ADD fieldname = {value | (expression)} ADD lob-name=BUFFER,position,length[RESERVE n [BYTES]]


ARRAY [arrayname] OCCURS {n | UNKNOWN} DEPENDING ON {itemname | %variable} [AFTER {itemname | arrayname} | AT {position | itemname | imagename1 | arrayname}]


AUDIT print-specifications


AUDIT ALL FIELDGROUP INFORMATION [CTOFIELDS]


{AUDIT ALL INFORMATION | AAI}


(C)BACKOUT


BYPASS [PENDING STATEMENT]


CALL {label | subname [([expression | %variable | [LIST] listname] [,...])]}


(**)CHANGE fieldname [(subscript)] [= value1 | (expression)] TO (value2 | (expression)) CHANGE lob-fieldname,position1,length TO BUFFER,position2,length[RESERVE n [BYTES]]


CLEAR {[[ALL | TEMP | LISTFDST | POSITION] [GLOBAL]] OBJECTS | GLOBALS | GLOBAL {IMAGE | SCREEN | MENU | LIST | FOUNDSET | POSITION [PERM | TEMP]} {'objectname' | %variable}}


(*)CLEAR LIST listname


CLEAR ON {ATTENTION | ERROR | FIELD CONSTRAINT CONFLICT | FIND CONFLICT | RECORD LOCKING CONFLICT | MISSING FILE | MISSING MEMBER}


CLEAR TAG {screenname | %screenname:inputname}


CLOSE {DATASET {ext-filename | %variable} | [EXTERNAL] {ext-filename | TERMINAL | %variable}}


(+C)CLOSE PROCESS {cid | processname | %variable} [SYNCLEVEL | FLUSH | %variable]


CLOSE PROCESS {cid | processname | %variable} [SYNCLEVEL | CONFIRM | FLUSH | ERROR | %variable]


COMMIT [RELEASE]


(+)CONFIRM {cid | processname | %variable} REQSEND %variable


(+)CONFIRMED {cid | processname | %variable}


CONTINUE


(**)COUNT OCCURRENCES OF fieldname


COUNT RECORDS {IN label | ON [LIST] listname}


[DECLARE] declaration

where declaration is one of the following:

  • LABEL labelname [GLOBAL | COMMON]
  • LIST listname [IN [FILE | [PERM | TEMP] GROUP]] name] [GLOBAL | COMMON]
  • IMAGE imagename[AT {itemname | imagename1 | arrayname}
    | GLOBAL [PERMANENT | TEMPORARY]
    | [PERMANENT | TEMPORARY] GLOBAL | COMMON]
  • MENU menuname [GLOBAL [PERMANENT | TEMPORARY]
    | [PERMANENT | TEMPORARY] GLOBAL | COMMON]
  • SCREEN screenname [GLOBAL [PERMANENT | TEMPORARY]
    | [PERMANENT | TEMPORARY] GLOBAL | COMMON]
  • %variable [IS] {FIXED [DP n] | FLOAT} [ARRAY (d1 [,d2 [,d3]])]
    [INITIAL(numeric-expression)] [STATIC] [COMMON]
  • %variable [IS] STRING [LEN n] [DP {n | *}] [ARRAY (d1 [,d2[,d3]])]
    [NO FIELD SAVE] [COMMON]
    [INITIAL('EBCDIC-string' | expression)] [STATIC]
  • SUBROUTINE subname [(type [INPUT | OUTPUT | INPUT OUTPUT] [,...])]

where type is one of the following:

  • Scalar %variable of the following format:
    • {STRING [LEN] n [DP {n | *}] | [FIXED [DP n] | FLOAT]}
  • Array %variable of the following format:
    • {STRING [LEN n] [DP [n | *}] [ARRAY (* [,*[,*]]) [NO FIELD SAVE]]
      | [FIXED [DP n] | FLOAT] [ARRAY (* [,*[,*]])]}
  • A list of records of the following format:
    • [LIST] [IN {FILE | [PERM | TEMP] GROUP} name]

DEFAULT CURSOR [READ | REREAD | PRINT] {ITEMID n | itemname | ROW n COLUMN m}


DEFAULT {TITLE | PROMPT | INPUT [DEBLANK | NODEBLANK] [PAD WITH 'c'] [LEN m [DP [k | *}]] [UPCASE | NOCASE] | [TAG [attributes] [WITH 'c']} [[READ] attributes] [REREAD attributes] [PRINT attributes]


DEFAULT SKIP n POSITIONS[S] [INITIAL {NULL | character | BLANK}]


DEFAULT [TYPE] {STRING | BINARY | PACKED | ZONED | FLOAT | EFORMAT} {LEN {n | UNKNOWN} | BITS n | DIGITS n} [DP {k | *}] [BP n] [SIGNED | UNSIGNED] [PAD {BLANK | character | NULL}] [STRIP | NOSTRIP] [JUSTIFY {LEFT | RIGHT}] [INITIAL {BLANK | ZERO | NULL | literal}]


(**)DELETE fieldname [(subscript)] [= value | (expression)]


(**)DELETE EACH fieldname


(**)DELETE RECORD


DELETE [ALL] RECORDS {IN label | ON [LIST] listname}


END BLOCK label


END {FIND | IF | FOR | ON | REPEAT | STORE | SUBROUTINE} [label]


END {ARRAY | IMAGE | MENU | SCREEN}


END [MORE | NORUN | USE]...


END UPDATE


FILE RECORDS {IN label | ON [LIST] listname} UNDER fieldname = {value | (expression)}


(*)FIND [AND RESERVE] [ALL] RECORDS [IN label | ON [LIST] listname] [FOR WHICH | WITH] retrieval-conditions


(*)FIND [ALL] VALUES OF fieldname [FROM {value1 | (expression1)}] [TO {value2 | (expression2)}] [[NOT] LIKE 'pattern']


(*)FIND AND PRINT COUNT [retrieval-conditions


(*){FIND WITHOUT LOCKS | FDWOL} [ALL] RECORDS [IN label | ON [LIST] listname] [FOR WHICH | WITH] retrieval-conditions


FLUSH PROCESS {cid | processname | %variable}


(**)FOR {EACH | k} {OCCURRENCE | OCCURRENCES} OF fieldname


(*)FOR {EACH | k} {RECORD | RECORDS} [IN label | ON [LIST] listname] IN [ASCENDING | DESCENDING] [SORTKEY] ORDER [BY [EACH] fieldname] [FROM {value1 | (expression1)}] [TO {value2 | (expression2)}] [BY {%variable | literal}] [OPTIMIZING FNV] [{WHERE | WITH} retrieval-conditions


(*)FOR {EACH | k} {VALUE | VALUES} OF fieldname [FROM {value1 | (expression1)}] [TO {value2 | (expression2)}] [[NOT] LIKE pattern] [IN [ASCENDING | DESCENDING] [CHARACTER | NUMERICAL] [RIGHT-ADJUSTED] ORDER]


FOR {EACH | k} {VALUE | VALUES} IN label


(*)FOR RECORD NUMBER {value | (expression)}


FOR RECORD NUMBER {value | IN label} [OPTIMIZING FNV]


FOR %variable FROM expression1 {TO expression2 [BY expression3] | [BY expression3] TO expression2}

Note: The BY clause, when omitted, defaults to a value of 1.


IDENTIFY {[IMAGE] imagename | %imagename:itemname LEN {n | %variable} | %imagename:arrayname OCCURS {n | %variable}}


(C)IF expression THEN statements [ELSE statements | ELSEIF expression THEN statements]


[DECLARE] IMAGE imagename [GLOBAL [PERMANENT | TEMPORARY] | [PERMANENT | TEMPORARY] GLOBAL | COMMON [AT [itemname | imagename1 | arrayname}]]


(*)INCLUDE procedurename


INPUT inputname [AT [COLUMN] n] [TO [COLUMN] m | [LEN m] DP {k | *}]] [UPCASE | NOCASE] [DEFAULT 'value'] [DEBLANK | NODEBLANK] [PAD WITH 'c'] [REQUIRED | ALPHA | ALPHANUM | MUSTFILL | ONEOF literal [, literal]... | [NUMERIC] [RANGE lo [TO] hi [AND lo [TO] hi] ...] | VERIFY 'characters']... [[READ] attributes] [REREAD attributes] [PRINT attributes] {TAG [attributes] [WITH 'c']] [ITEMID n]


INSERT fieldname [(subscript)] = {value | (expression)}


(+)INVITE {cid | processname | %variable} [SYNCLEVEL | FLUSH | CONFIRM]


itemname IS [TYPE] {STRING | BINARY | PACKED | ZONED | FLOAT | EFORMAT} {LEN {n | UNKNOWN} | BITS n | DIGITS n | TO position} [DP {k | *}] [BP n] [SIGNED | UNSIGNED] [PAD {BLANK | character | NULL}] [STRIP | NOSTRIP] [ALIGN] [JUSTIFY {LEFT | RIGHT}] [INITIAL {BLANK | ZERO | NULL | value}] [AFTER {itemname | arrayname} | AT {position | itemname | imagename1 | arrayname}] [OCCURS {n [DEPENDING ON {itemname | %variable}] | UNKNOWN}]


JUMP TO label


JUMP TO (label1 [, label2] ...) expression


LOOP END


MAX PFKEY n


[DECLARE] MENU menuname [GLOBAL [PERMANENT | TEMPORARY] | [PERMANENT | TEMPORARY] GLOBAL | COMMON]


MODIFY {%menuname:itemname | %screenname:itemname} [TO] attributes [[FOR] {ALL | READ | REREAD | TAB | PRINT}]


MODIFY BUFFER [SIZE=n | %variable [PRESERVE | NOPRESERVE]] [FILL [X'nn'] | CLEAR]


(C)NEW PAGE


(**)NOTE {fieldname [(subscript)]}


NOTE 'string'


ON {ATTENTION | ERROR | FIELD CONSTRAINT CONFLICT | FIND CONFLICT | MISSING FILE | MISSING MEMBER | RECORD LOCKING CONFLICT} statements


OPEN {[DATASET | EXTERNAL] {ext-filename | %variable} | [EXTERNAL] {TERMINAL | %variable}} FOR {INPUT [OUTPUT] | OUTPUT [INPUT] | INOUT} [PASSWORD {value | %variable}]


(C)OPEN [C] [[PERM | TEMP] GROUP | FILE] {name [AT {location | %variable | =}] | %variable} [PASSWORD {value | %variable}]


OPEN PROCESS {processname | %variable} [CID {name | %variable}]


(+)OPEN PROCESS {processname | %variable} [CID {name | %variable}] {outbound-options | inbound-options}

where outbound-options are:

  • [AT DESTINATION] [WITH] [USERID {%variable | 'string'}]
  • [PASSWORD {%variable | 'string'}]
  • [{ACCOUNT | PROFILE {%%variable | 'string'}]
  • [INITIAL {DATA 'string' | DATA %variable | IMAGE imagename] ...]

and inbound-options are:

  • ACCEPT [INITIAL {DATA %variable | IMAGE image} ...]

PAUSE [n | %variable]


(**)PLACE RECORD ON [LIST] listname


PLACE RECORDS {IN label | ON [LIST] listname1} ON [LIST] listname2


POSITION {FOUNDSET foundsortset_name | LIST list_name} [AT] position_name

Note: Use this form of the POSITION statement with FOR loop processing; see POSITION statement.


POSITION {ext-filename | %variable} AT KEY operator{value | %variable}

Note: Use this form of the POSITION statement with external file processing using images; see POSITION statement.


PREPARE {[IMAGE] imagename | [MENU] menuname | [SCREEN] screenname}


PRINT print-specifications


(**){PAI | PRINT ALL INFORMATION} INTO array1, array2 [, array3] [FROM start] [COUNT ct]


PRINT [MENU] menuname [ALERT] [TITLE {'text' | %variable} [AT [COLUMN] n] [TO [COLUMN] m | LEN m] [attributes]]


PRINT SCREEN screenname [ALERT] [[WITH] CURSOR] [TITLE {'text' | %variable} [AT [COLUMN] n] [TO [COLUMN] m | LEN m] [attributes]]


PROMPT {'text' | promptname} [AT [COLUMN] n] [TO [COLUMN] m | LEN m] [DP {k | *}]] [DEFAULT 'value'] [[READ] attributes] [REREAD attributes] [PRINT attributes] [ITEMID n]


(+)QUERY PROCESS {cid | processname | %variable} options

where options must be one or more of the following:

  • STATE %variable
  • PROCESSGROUP %variable
  • REMOTEID %variable
  • SYNCLEVEL %variable
  • MODENAME %variable

READ [IMAGE] imagename FROM {ext-filename | TERMINAL | %variable} [PROMPT {'text' | %variable}] [NEXT | KEY operator {value | %variable}]


READ [IMAGE] imagename FROM BUFFER [POSITION={%pvariable | n}] [MAXLEN={%lvariable | n}]


READ [MENU] menuname [ALERT] [TITLE ['text' | %variable} [AT [COLUMN] n] [TO [COLUMN] m | LEN m] [attributes]]


READ [SCREEN] screenname [ALERT] [NO REREAD] [ [WITH] CURSOR] [TITLE {'text' | %variable} [AT [COLUMN] n] [TO [COLUMN] m | LEN m] [attributes]]


RECEIVE {IMAGE imagename | %variable} FROM {cid | processname | %variable} [RESULT %variable]


(+)RECEIVE {IMAGE imagename | %variable} FROM {cid | processname | %variable} RESULT %variable


RELEASE ALL RECORDS


RELEASE POSITION {ext-filename | %variable}


RELEASE RECORDS {IN label | ON [LIST] listname}


(**)REMEMBER [GLOBAL] position_name [IN foundsortset_name | ON list_name]


(**)REMOVE RECORD FROM [LIST] listname


REMOVE RECORDS {IN label | ON [LIST] listname} FROM [LIST] listname2


REPEAT [FOREVER | n TIMES | WHILE expression]


REREAD [SCREEN] screenname [ALERT] [[WITH] CURSOR] [TITLE {'text' | %variable} [AT [COLUMN] n] [TO [COLUMN] m | LEN m] [attributes]]


RESET {HEADER | TRAILER} m


RETRY [PENDING STATEMENT]


RETURN


[DECLARE] SCREEN screenname [GLOBAL [PERMANENT | TEMPORARY] | [PERMANENT | TEMPORARY] GLOBAL | COMMON]


SEND {IMAGE imagename | 'string' | %variable} TO {cid | processname | %variable} [REQSEND %variable] [FLUSH]


(+)SEND {IMAGE imagename | 'string' | %variable} TO {cid | processname | %variable} [FLUSH | CONFIRM] [REQSEND %variable]


(+)SEND ERROR TO {cid | processname | %variable} REQSEND %variable


SET {HEADER | TRAILER} m print-specifications


SIGNAL PROCESS {cid | [processname | %variable} {nnn | %variable}


(+)SIGNAL PROCESS {cid | [processname | %variable}


SKIP n LINE[S]


[itemname IS] SKIP n POSITION[S] [INITIAL {NULL | character | BLANK}]


SORT [k] RECORDS {IN label | ON [LIST] listname} BY key [AND key] ...

where key is:

  • key = fieldname
    [VALUE {[ASCENDING | DESCENDING]
    [CHARACTER | NUMERICAL] | RIGHT-ADJUSTED]} ...]

SORT [k] RECORD KEYS {IN label | ON [LIST] listname} BY key [AND key] ...

where key is:

  • key = fieldname
    [VALUE {[ASCENDING | DESCENDING]
    [CHARACTER | NUMERICAL] | [RIGHT-ADJUSTED]} ...]

SORT VALUE IN label [IN [ASCENDING | DESCENDING] [CHARACTER | NUMERICAL] | [RIGHT-ADJUSTED] ORDER]


STOP [IF COUNT IN label EXCEEDS n]


(*)STORE RECORD [sort or hash key value] fieldname1=[value1 | (expression1)] [fieldname2=(expression)] ... [THEN CONTINUE statement statement ...] END STORE


SUBROUTINE


SUBROUTINE subname [(formal-parameter [INPUT | OUTPUT | INPUT OUTPUT] [,...])]

where formal-parameter is one of the following:

  • %variable [IS STRING [LEN n] [DP {n | *}] [ARRAY (*[,*[,*]]) [NO FS]]
    | IS {FIXED [DP n] | FLOAT} [ARRAY (*[,*[,*]])]]
  • LIST listname [IN [FILE | [PERM | TEMP] GROUP] name]

TAG %screenname:inputname [attributes] [WITH 'c']


(+)TEST [FOR] {ANY RECEIPT RETURN %variable | RECEIPT {cid | processname | %variable}}


TITLE {'text' | promptname} [AT [COLUMN] n] [TO [COLUMN] m | [LEN m] [DP {k | *}]] [DEFAULT 'value'] [[READ] attributes] [REREAD attributes] [PRINT attributes]


TRANSFER [CONTROL] TO PROCESS {processname | %variable} [WITH] [USERID {string | '%variable'}] [PASSWORD {variable | 'string'}] [ACCOUNT {%variable | 'string'}] [PASSING {IMAGE imagename | 'string' | %variable}]


UPDATE RECORD


VARIABLES ARE {FIXED [DP n] | FLOAT | STRING [LEN n] [DP {n | *}] | UNDEFINED}


[DECLARE] %variable [IS] {FIXED [DP n] | FLOAT} [ARRAY (d1[,d2[,d3]])] [COMMON]


[DECLARE] %variable [IS] STRING [LEN n] [DP {n | *}] [ARRAY (d1[,d2[d3]])] [NO FIELD SAVE] [COMMON] %variable [(subscript)] = expression


(+)WAIT [{n | %variable} SEC[S]] [FOR] {ANY RECEIPT RETURN %variable | RECEIPT {cid | processname | %variable}}


WRITE [IMAGE] imagename ON {seq-filename | TERMINAL | %variable}


WRITE IMAGE imagename ON BUFFER [POSITION=%pvariable | n] [MAXLEN={%lvariable | n}]

Value specification syntax

For all User Language statements and retrieval conditions, wherever the term value appears in the syntax, it can be any of these:

  • Literal number or string
  • VALUE IN clause of the form:

    VALUE [IN] label

  • %variable

Retrieval condition syntax

A FIND statement can be followed by any number of retrieval conditions separated by an end of line or LINEND parameter character.

Conditions can be constructed as follows:

Syntax

[NOT] phrase [{AND | OR | NOR} [NOT] phrase] ...

Where:

phrase can be constructed as follows:

  • fieldname = [NOT] value
  • fieldname LIKE pattern
  • fieldname IS [NOT] {PRESENT | LIKE 'pattern'}
  • fieldname IS [NOT] {[NUMERICALLY | ALPHABETICALLY]
    [EQ | = | NE | ,= | GREATER THAN | GT | >
    | LESS THAN | LT < | <= | GE | >= | BEFORE | AFTER] value}
  • fieldname IS [NOT] {[NUMERICALLY | ALPHABETICALLY]
    {IN RANGE [FROM | AFTER] value1 {TO | [AND] BEFORE}
    value2 | BETWEEN value1 AND value2}
  • FILES filename
  • FIND$ label
  • LISTS$ listname
  • LOCATION {location | =}
  • POINT$ value
  • SFGE$ value
  • SFL$ value

    where value can be:

    • A literal number or string
    • VALUE {[IN] label} | (expression)
    • A %variable

Notes:

  • The first character (,) of the inequality test (,=) in the fourth of the items in the list above is the EBCDIC "not sign," which has the hexadecimal value 5f.
  • For a description of the pattern in the [IS] LIKE and IS NOT clauses, see the syntax of Is Like patterns.

Omitting repeated first words

If a sequence of phrases in a particular retrieval condition all have the same first word, that word can be omitted from the latter phrases. For example:

LIST$ A AND NOT LIST$ B

can be written:

LIST$ A AND NOT B

And:

X IS 13 OR X IS LESS THAN 7

can be written:

X IS 13 OR IS LESS THAN 7

Omitting duplicated equal signs

Duplicated equal signs can be omitted. For example, the expression:

A = 3 OR A = 5 OR A = 40

is equivalent to:

A = 3 OR 5 OR 40

Use of parentheses

Parentheses can be placed around any sequence of phrases to clarify the condition or force the evaluation to occur in a particular order. For example:

NOT (A = 2 OR LIST$ Y) A = 1 AND (B = 2 OR C = 3)

Use of expressions

Expressions can be used in FIND statements to provide the retrieval condition for the POINT$, SFL$, and SFGE$ conditions, as well as for the EQ VALUE clause.

POINT$

Syntax

POINT$ VALUE(expression)

Where:

expression is a function call, string concatenation, arithmetic operation, User Language construct, or Boolean expression. It is preceded by the keyword VALUE.

Example

This example finds the first MA record on file, and then counts the number of records from this point in the file:

FD1: IN ICSCUST FPC STATE = MA END FIND FOR 1 RECORD IN FD1 PRINT 'CURREC = ' WITH $CURREC PRINT '>= POINT$' FD2: IN ICSCUST FPC POINT$ VALUE($CURREC) END FIND END FOR

SFL$ and SFGE$

Syntax

SFL$ VALUE(expression)

or

SFGE$ VALUE(expression)

Where:

expression is a function call, string concatenation, arithmetic operation, User Language construct, or Boolean expression. It is preceded by the keyword VALUE.

Example

FOR %CT FROM 1 TO 10 IN EXPRESS STORE RECORD ($EDITN(%CT,'999')) ORD1 = (%REC WITH %CT) ORD2 = (%CT * 2) ORD4 = (%CT * 4) END STORE END FOR COMMIT FOR %CT FROM 1 TO 5 PRINT 'LESS THAN ' WITH %CT FD1: IN EXPRESS FPC SFL$ VALUE($EDITN(%CT,'999')) END FIND PRINT 'GREATER THAN OR EQUAL TO ' WITH %CT FD2: IN EXPRESS FPC SFGE$ VALUE($EDITN(%CT,'999')) END FIND END FOR

EQ VALUE

Syntax

fieldname EQ VALUE(expression)

Where:

expression is a function call, string concatenation, arithmetic operation, User Language construct, or Boolean expression.

Example

FD: IN FILE PEOPLE FD LAST EQ VALUE($READ('LAST NAME?') ) END FIND

Print specification syntax

A PRINT, SET, or AUDIT statement contains print specifications of the following form:

Syntax

[term] [AND | TAB | WITH]...[[term] [AND | TAB | WITH] ...] ... [...]

Where:

term can be constructed as follows:

{'string' | %variable | COUNT IN label | OCCURRENCE IN label | VALUE IN term | function} [AT [COLUMN] m] [TO [COLUMN] n]

or, if the statement is within a record loop:

{{EACH | term} fieldname | *RECORD | *ID} [AT [COLUMN] m] [TO [COLUMN] n}

Expression syntax

The following syntax can be used in:

  • Assignment statements
  • Conditional IF statements and ELSEIF clauses

In the simplified syntax for an IF statement, which is:

IF condition THEN statements

condition expands to the syntax described in this section. Be sure to enclose an expression with parentheses.

  • Computed JUMP TO statements
  • Subscripts
  • Function arguments

Syntax

{operand |(expression)} [operator {operand | (expression)}] ...

Where:

operand can be constructed as follows:

[+ | - | NOT] {'string' | %variable | number | fieldname [(subscript)] IS [NOT] PRESENT | COUNT IN label | OCCURRENCE IN label | VALUE IN label | function}

and operator may be one of the following:

+ = EQ AND
- ,= NE OR
* > GT WITH
/ < LT IS PRESENT
  >= GE IS NOT PRESENT
  <= LE IS LIKE
      IS NOT LIKE

Notes:

  • The first character (,) of the inequality test above is the EBCDIC "not sign", which has the hexadecimal value 5f.
  • For a description of the IS LIKE and IS NOT clauses, see the syntax of Is Like patterns.

IN clause syntax

Statements preceded by an asterisk (*), beginning with User Language statements, support the IN clause.

The three basic forms of the IN clause are:

  • IN [PERMANENT | TEMPORARY ] GROUP groupname MEMBER [%member | [filename [AT {location | =}]]

  • IN file1 [,file2] ...

  • IN {$CURFILE | $UPDATE}

    The form IN $CURFILE can be used only within a record loop.

IN GROUP MEMBER limitations

In addition to the three basic forms of the IN clause shown above the IN GROUP MEMBER clause restricts the following statements to one member file in a group context:

  • CLEAR LIST
  • FIND ALL RECORDS (and its variants)
  • FIND ALL VALUES
  • FOR RECORD NUMBER (or FRN)
  • STORE RECORD

You cannot use an IN GROUP MEMBER clause with a FOR EACH RECORD statement or with an ADD, CHANGE, or DELETE RECORD statement. Only the previously listed statements call accept an IN GROUP MEMBER clause.

Using an IN clause in a BEGIN...END block

The file name in the IN clause used within a BEGIN...END block is resolved by the compiler. You can either hard code a file name or use some type of dummy string for the file name. The use of a %variable for the file name is not allowed.

Subscript syntax

A subscript has the format:

Syntax

(subscript1 [,subscript2 [,subscript3]] )

Where:

subscript1, subscript2, and subscript3 can be any expression.

Terminal display attributes

One or more of the following terminal display attributes can replace the term attribute in a full-screen formatting statement, if the display attribute is supported by the installation:

List of attributes
BLINK
BLUE
BRIGHT
DIM
GREEN
INV[IS[BLE]]
NOBLINK
NOREV[ERSE]
NOU[NDER]SCORE
PINK
PROT[ECTED]
RED
REV[ERSE]
TURQUOISE
[UNDER]SCORE
UNPROT[ECTED]
VIS[IBLE]
WHITE
YELLOW

Type syntax for the DECLARE SUBROUTINE statement

The type specification for the DECLARE SUBROUTINE statement has one of the following formats:

{STRING [LEN n] [DP {n | *}] [ARRAY (*[,*[,*]]) [NO FIELD SAVE]] | FIXED [DP n] [ARRAY (*[,*[,*]])] | FLOAT}

or

[LIST] [IN [FILE | [PERM | TEMP] GROUP] name]