Statement syntax: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (more cleanup)
m (more cleanup)
Line 63: Line 63:
==User Language statements==
==User Language statements==
   
   
<p class="code"><b>**</b> ADD fieldname = {value | (expression)}
<p class="syntax"><b><sup>(**)</sup></b>ADD fieldname = <span class="squareb">{</span>value <span class="squareb">|</span> (expression)<span class="squareb">}</span>
   
   
ADD lob-name=BUFFER,position,length [RESERVE n [BYTES]]
ADD lob-name=BUFFER,position,length [RESERVE n [BYTES]]
Line 70: Line 70:
<hr>
<hr>
   
   
<p class="code">ARRAY [arrayname] OCCURS {n | UNKNOWN}
<p class="syntax">ARRAY [arrayname] OCCURS <span class="squareb">{</span>n <span class="squareb">|</span> UNKNOWN<span class="squareb">}</span>
   
   
  DEPENDING ON {itemname | %variable}
  DEPENDING ON <span class="squareb">{</span>itemname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  [AFTER {itemname | arrayname}
  [AFTER <span class="squareb">{</span>itemname <span class="squareb">|</span> arrayname<span class="squareb">}</span>
   
   
  | AT {position | itemname | imagename1 | arrayname}]
  <span class="squareb">|</span> AT <span class="squareb">{</span>position <span class="squareb">|</span> itemname <span class="squareb">|</span> imagename1 <span class="squareb">|</span> arrayname<span class="squareb">}</span>]
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">AUDIT print-specifications
<p class="syntax">AUDIT print-specifications
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">AUDIT ALL FIELDGROUP INFORMATION [CTOFIELDS]</p>
<p class="syntax">AUDIT ALL FIELDGROUP INFORMATION [CTOFIELDS]</p>
   
   
<hr>
<hr>
   
   
<p class="code">AUDIT ALL INFORMATION
<p class="syntax">AUDIT ALL INFORMATION
   
   
AAI
AAI
Line 96: Line 96:
<hr>
<hr>
   
   
<p class="code"><b>C</b> BACKOUT</p>
<p class="syntax"><b><sup>(C)</sup></b>BACKOUT</p>
   
   
<hr>
<hr>
   
   
<p class="code">BYPASS <var>[</var>PENDING STATEMENT<var>]</var> </p>
<p class="syntax">BYPASS <span class="squareb">[</span>PENDING STATEMENT<span class="squareb">]</span> </p>
   
   
<hr>
<hr>
   
   
<p class="code">CALL {label | subname
<p class="syntax">CALL <span class="squareb">{</span>label <span class="squareb">|</span> subname
   
   
  [([expression | %variable | [LIST] listname] [,...])]}
  [([expression <span class="squareb">|</span> %variable <span class="squareb">|</span> [LIST] listname] [,...])]<span class="squareb">}</span>
   
   
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>**</b> CHANGE fieldname <var>[</var>(subscript)<var>]</var> [= value1 |(expression)] TO (value2 | (expression))
<p class="syntax"><b><sup>(**)</sup></b>CHANGE fieldname <span class="squareb">[</span>(subscript)<span class="squareb">]</span> [= value1 |(expression)] TO (value2 <span class="squareb">|</span> (expression))
   
   
CHANGE lob-fieldname,position1,length TO BUFFER,position2,length [RESERVE n [BYTES]]
CHANGE lob-fieldname,position1,length TO BUFFER,position2,length [RESERVE n [BYTES]]
Line 118: Line 118:
<hr>
<hr>
   
   
<p class="code">CLEAR
<p class="syntax">CLEAR <span class="squareb">{</span>[[ALL <span class="squareb">|</span> TEMP <span class="squareb">|</span> LISTFDST <span class="squareb">|</span> POSITION] [GLOBAL]] OBJECTS
<nowiki>
{[[ALL | TEMP | LISTFDST | POSITION] [GLOBAL]]
</nowiki>
OBJECTS
   
   
  | GLOBALS
  <span class="squareb">|</span> GLOBALS
   
   
  | GLOBAL {IMAGE | SCREEN | MENU | LIST | 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
   
   
  | POSITION [PERM | TEMP]}
  <span class="squareb">|</span> POSITION [PERM <span class="squareb">|</span> TEMP]<span class="squareb">}</span>
{'objectname' | %variable}}
   
   
<span class="squareb">{</span>'objectname' <span class="squareb">|</span> %variable<span class="squareb">}</span><span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>*</b> CLEAR LIST listname </p>
<p class="syntax"><b><sup>(*)</sup></b>CLEAR LIST listname </p>
   
   
<hr>
<hr>
   
   
<p class="code">CLEAR ON
<p class="syntax">CLEAR ON
   
   
  {ATTENTION | ERROR | FIELD CONSTRAINT CONFLICT
  <span class="squareb">{</span>ATTENTION <span class="squareb">|</span> ERROR <span class="squareb">|</span> FIELD CONSTRAINT CONFLICT
   
   
  | FIND CONFLICT | RECORD LOCKING CONFLICT
  <span class="squareb">|</span> FIND CONFLICT <span class="squareb">|</span> RECORD LOCKING CONFLICT
   
   
  | MISSING FILE | MISSING MEMBER}
  <span class="squareb">|</span> MISSING FILE <span class="squareb">|</span> MISSING MEMBER<span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code">CLEAR TAG {screenname | %screenname:inputname}
<p class="syntax">CLEAR TAG <span class="squareb">{</span>screenname <span class="squareb">|</span> %screenname:inputname<span class="squareb">}</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">CLOSE
<p class="syntax">CLOSE
   
   
  {DATASET {ext-filename | %variable}
  <span class="squareb">{</span>DATASET <span class="squareb">{</span>ext-filename <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  | [EXTERNAL] {ext-filename | TERMINAL | %variable}}
  <span class="squareb">|</span> [EXTERNAL] <span class="squareb">{</span>ext-filename <span class="squareb">|</span> TERMINAL <span class="squareb">|</span> %variable<span class="squareb">}</span><span class="squareb">}</span>
   
   
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>+ C</b> CLOSE PROCESS
<p class="syntax"><b><sup>(+C)</sup></b>CLOSE PROCESS
   
   
  {cid | processname | %variable}
  <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  [SYNCLEVEL | FLUSH | %variable]
  [SYNCLEVEL <span class="squareb">|</span> FLUSH <span class="squareb">|</span> %variable]
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">CLOSE PROCESS
<p class="syntax">CLOSE PROCESS
   
   
  {cid | processname | %variable}
  <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  [SYNCLEVEL | CONFIRM | FLUSH | ERROR | %variable]
  [SYNCLEVEL <span class="squareb">|</span> CONFIRM <span class="squareb">|</span> FLUSH <span class="squareb">|</span> ERROR <span class="squareb">|</span> %variable]
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">COMMIT <var>[</var>RELEASE<var>]</var></p>
<p class="syntax">COMMIT <span class="squareb">[</span>RELEASE<span class="squareb">]</span></p>
   
   
<hr>
<hr>
   
   
<p class="code"><b>+</b> CONFIRM {cid | processname | %variable}
<p class="syntax"><b><sup>(+)</sup></b>CONFIRM <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
         REQSEND %variable
         REQSEND %variable
Line 191: Line 187:
<hr>
<hr>
   
   
<p class="code"><b>+</b> CONFIRMED {cid | processname | %variable}
<p class="syntax"><b><sup>(+)</sup></b>CONFIRMED <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">CONTINUE</p>
<p class="syntax">CONTINUE</p>
   
   
<hr>
<hr>
   
   
<p class="code"><b>**</b> COUNT OCCURRENCES OF fieldname</p>
<p class="syntax"><b><sup>(**)</sup></b>COUNT OCCURRENCES OF fieldname</p>
   
   
<hr>
<hr>
   
   
<p class="code">COUNT RECORDS {IN label | ON [LIST] listname}</p>
<p class="syntax">COUNT RECORDS <span class="squareb">{</span>IN label <span class="squareb">|</span> ON [LIST] listname<span class="squareb">}</span></p>
   
   
<hr>
<hr>
   
   
<p class="code"><var>[</var>DECLARE<var>]</var> declaration
<p class="syntax"><span class="squareb">[</span>DECLARE<span class="squareb">]</span> declaration
</p>
</p>
   
   
<div style="margin-left: 20px">
<div style="margin-left: 20px; background-color: #fBfBfB;">
<p>
<p>
where <var class="term">declaration</var> is one of the following: </p>
where <var class="term">declaration</var> is one of the following: </p>
   
   
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li>LABEL labelname [GLOBAL | COMMON]
<li>LABEL labelname [GLOBAL <span class="squareb">|</span> COMMON]
   
   
<li>LIST listname [IN [FILE | [PERM | TEMP] GROUP]] name] [GLOBAL | COMMON]
<li>LIST listname [IN [FILE <span class="squareb">|</span> [PERM <span class="squareb">|</span> TEMP] GROUP]] name] [GLOBAL <span class="squareb">|</span> COMMON]
   
   
<li>IMAGE imagename [AT {itemname | imagename1 | arrayname} <br>
<li>IMAGE imagename [AT <span class="squareb">{</span>itemname <span class="squareb">|</span> imagename1 <span class="squareb">|</span> arrayname<span class="squareb">}</span> <br>
       | GLOBAL [PERMANENT | TEMPORARY] </br>  
       <span class="squareb">|</span> GLOBAL [PERMANENT <span class="squareb">|</span> TEMPORARY] </br>
       | [PERMANENT | TEMPORARY] GLOBAL | COMMON]
       <span class="squareb">|</span> [PERMANENT <span class="squareb">|</span> TEMPORARY] GLOBAL <span class="squareb">|</span> COMMON]
   
   
<li>MENU menuname [GLOBAL [PERMANENT | TEMPORARY] <br>
<li>MENU menuname [GLOBAL [PERMANENT <span class="squareb">|</span> TEMPORARY] <br>
       | [PERMANENT | TEMPORARY] GLOBAL | COMMON]
       <span class="squareb">|</span> [PERMANENT <span class="squareb">|</span> TEMPORARY] GLOBAL <span class="squareb">|</span> COMMON]
   
   
<li>SCREEN screenname [GLOBAL [PERMANENT | TEMPORARY] <br>
<li>SCREEN screenname [GLOBAL [PERMANENT <span class="squareb">|</span> TEMPORARY] <br>
         | [PERMANENT | TEMPORARY] GLOBAL | COMMON]
         <span class="squareb">|</span> [PERMANENT <span class="squareb">|</span> TEMPORARY] GLOBAL <span class="squareb">|</span> COMMON]
   
   
<li>%variable [IS] {FIXED [DP n] | FLOAT} [ARRAY (d1 [,d2 [,d3]])] <br>
<li>%variable [IS] <span class="squareb">{</span>FIXED [DP n] <span class="squareb">|</span> FLOAT<span class="squareb">}</span> [ARRAY (d1 [,d2 [,d3]])] <br>
           [INITIAL(numeric-expression)] [STATIC] [COMMON]
           [INITIAL(numeric-expression)] [STATIC] [COMMON]
   
   
<li>%variable [IS] STRING [LEN n] [DP {n | *}] [ARRAY (d1 [,d2[,d3]])] <br>
<li>%variable [IS] STRING [LEN n] [DP <span class="squareb">{</span>n <span class="squareb">|</span> *<span class="squareb">}</span>] [ARRAY (d1 [,d2[,d3]])] <br>
           [NO FIELD SAVE] [COMMON] <br>
           [NO FIELD SAVE] [COMMON] <br>
           [INITIAL('EBCDIC-string' | expression)] [STATIC]
           [INITIAL('EBCDIC-string' <span class="squareb">|</span> expression)] [STATIC]
   
   
<li>SUBROUTINE subname [(type [INPUT | OUTPUT | INPUT OUTPUT] [,...])]
<li>SUBROUTINE subname [(type [INPUT <span class="squareb">|</span> OUTPUT <span class="squareb">|</span> INPUT OUTPUT] [,...])]
</ul>
</ul>
 
</div> <!-- declaration indent -->
</div> <!-- declaration indent -->
<div style="margin-left: 40px">
<div style="margin-left: 40px; background-color: #fBfBfB;">
<p>
<p>
where <var class="term">type</var> is one of the following:</p>
where <var class="term">type</var> is one of the following:</p>
Line 247: Line 243:
<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>{STRING [LEN] n [DP {n | *}] | [FIXED [DP n] | FLOAT]} </li></ul>
<li><span class="squareb">{</span>STRING [LEN] n [DP <span class="squareb">{</span>n <span class="squareb">|</span> *<span class="squareb">}</span>] <span class="squareb">|</span> [FIXED [DP n] <span class="squareb">|</span> FLOAT]<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>{STRING [LEN n] [DP [n | *}] [ARRAY (* [,*[,*]]) [NO FIELD SAVE]] <br>  
<li><span class="squareb">{</span>STRING [LEN n] [DP [n <span class="squareb">|</span> *<span class="squareb">}</span>] [ARRAY (* [,*[,*]]) [NO FIELD SAVE]] <br>
  | [FIXED [DP n] | FLOAT] [ARRAY (* [,*[,*]])]} </li></ul>
  <span class="squareb">|</span> [FIXED [DP n] <span class="squareb">|</span> FLOAT] [ARRAY (* [,*[,*]])]<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 {FILE | [PERM | TEMP] GROUP} name] </li></ul>
<li>[LIST] [IN <span class="squareb">{</span>FILE <span class="squareb">|</span> [PERM <span class="squareb">|</span> TEMP] GROUP<span class="squareb">}</span> name] </li></ul>
</li>
</li>
</ul>
</ul>
 
</div> <!-- type indentation -->
</div> <!-- type indentation -->
   
   
<hr>
<hr>
   
   
<p class="code">DEFAULT CURSOR [READ | REREAD | PRINT]
<p class="syntax">DEFAULT CURSOR [READ <span class="squareb">|</span> REREAD <span class="squareb">|</span> PRINT]
   
   
               {ITEMID n | itemname | ROW n COLUMN m}
               <span class="squareb">{</span>ITEMID n <span class="squareb">|</span> itemname <span class="squareb">|</span> ROW n COLUMN m<span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
<p class="code">DEFAULT {TITLE
<p class="syntax">DEFAULT <span class="squareb">{</span>TITLE
   
   
         | PROMPT
         <span class="squareb">|</span> PROMPT
   
   
         | INPUT [DEBLANK | NODEBLANK] [PAD WITH 'c']
         <span class="squareb">|</span> INPUT [DEBLANK <span class="squareb">|</span> NODEBLANK] [PAD WITH 'c']
   
   
           [LEN m [DP [k | *}]] [UPCASE | NOCASE]
           [LEN m [DP [k <span class="squareb">|</span> *<span class="squareb">}</span>]] [UPCASE <span class="squareb">|</span> NOCASE]
   
   
         | [TAG [attributes] [WITH 'c']}
         <span class="squareb">|</span> [TAG [attributes] [WITH 'c']<span class="squareb">}</span>
   
   
         [[READ] attributes]
         [[READ] attributes]
Line 288: Line 284:
</p>
</p>
<hr>
<hr>
<p class="code">DEFAULT SKIP n POSITIONS[S]
<p class="syntax">DEFAULT SKIP n POSITIONS[S]
   
   
             [INITIAL {NULL | character | BLANK}]
             [INITIAL <span class="squareb">{</span>NULL <span class="squareb">|</span> character <span class="squareb">|</span> BLANK<span class="squareb">}</span>]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">DEFAULT [TYPE]
<p class="syntax">DEFAULT [TYPE]
   
   
  {STRING | BINARY | PACKED | ZONED | FLOAT | EFORMAT}
  <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>
   
   
  {LEN {n | UNKNOWN} | BITS n | DIGITS n}
  <span class="squareb">{</span>LEN <span class="squareb">{</span>n <span class="squareb">|</span> UNKNOWN<span class="squareb">}</span> <span class="squareb">|</span> BITS n <span class="squareb">|</span> DIGITS n<span class="squareb">}</span>
   
   
  [DP {k | *}] [BP n]
  [DP <span class="squareb">{</span>k <span class="squareb">|</span> *<span class="squareb">}</span>] [BP n]
   
   
  [SIGNED | UNSIGNED] [PAD {BLANK | character | NULL}]
  [SIGNED <span class="squareb">|</span> UNSIGNED] [PAD <span class="squareb">{</span>BLANK <span class="squareb">|</span> character <span class="squareb">|</span> NULL<span class="squareb">}</span>]
   
   
  [STRIP | NOSTRIP] [JUSTIFY {LEFT | RIGHT}]
  [STRIP <span class="squareb">|</span> NOSTRIP] [JUSTIFY <span class="squareb">{</span>LEFT <span class="squareb">|</span> RIGHT<span class="squareb">}</span>]
   
   
  [INITIAL {BLANK | ZERO | NULL | literal}]
  [INITIAL <span class="squareb">{</span>BLANK <span class="squareb">|</span> ZERO <span class="squareb">|</span> NULL <span class="squareb">|</span> literal<span class="squareb">}</span>]
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>**</b> DELETE fieldname <var>[</var>(subscript)<var>]</var> <var>[</var><b></b>= value |(expression)<var>]</var>
<p class="syntax"><b><sup>(**)</sup></b>DELETE fieldname <span class="squareb">[</span>(subscript)<span class="squareb">]</span> <span class="squareb">[</span><b></b>= value |(expression)<span class="squareb">]</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>**</b> DELETE EACH fieldname</p>
<p class="syntax"><b><sup>(**)</sup></b>DELETE EACH fieldname</p>
   
   
<hr>
<hr>
   
   
<p class="code"><b>**</b> DELETE RECORD </p>
<p class="syntax"><b><sup>(**)</sup></b>DELETE RECORD </p>
   
   
<hr>
<hr>
   
   
<p class="code">DELETE [ALL] RECORDS {IN label | ON [LIST] listname}
<p class="syntax">DELETE [ALL] RECORDS <span class="squareb">{</span>IN label <span class="squareb">|</span> ON [LIST] listname<span class="squareb">}</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">END BLOCK label </p>
<p class="syntax">END BLOCK label </p>
   
   
<hr>
<hr>
   
   
<p class="code">END {FIND | IF | FOR | ON | REPEAT | STORE
<p class="syntax">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
   
   
     | SUBROUTINE} [label]
     <span class="squareb">|</span> SUBROUTINE<span class="squareb">}</span> [label]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">END {ARRAY | IMAGE | MENU | SCREEN}</p>
<p class="syntax">END <span class="squareb">{</span>ARRAY <span class="squareb">|</span> IMAGE <span class="squareb">|</span> MENU <span class="squareb">|</span> SCREEN<span class="squareb">}</span></p>
   
   
<hr>
<hr>
   
   
<p class="code">END [MORE | NORUN | USE]...</p>
<p class="syntax">END [MORE <span class="squareb">|</span> NORUN <span class="squareb">|</span> USE]...</p>
   
   
<hr>
<hr>
   
   
<p class="code">END UPDATE</p>
<p class="syntax">END UPDATE</p>
   
   
<hr>
<hr>
   
   
<p class="code">FILE RECORDS {IN label | ON [LIST] listname}
<p class="syntax">FILE RECORDS <span class="squareb">{</span>IN label <span class="squareb">|</span> ON [LIST] listname<span class="squareb">}</span>
   
   
             UNDER fieldname = {value | (expression)}
             UNDER fieldname = <span class="squareb">{</span>value <span class="squareb">|</span> (expression)<span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>*</b> FIND [AND RESERVE] [ALL] RECORDS
<p class="syntax"><b><sup>(*)</sup></b>FIND [AND RESERVE] [ALL] RECORDS
   
   
     [IN label | ON [LIST] listname]
     [IN label <span class="squareb">|</span> ON [LIST] listname]
   
   
     [FOR WHICH | WITH] retrieval-conditions
     [FOR WHICH <span class="squareb">|</span> WITH] retrieval-conditions
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>*</b> FIND <var>[</var>ALL<var>]</var> VALUES OF fieldname
<p class="syntax"><b><sup>(*)</sup></b>FIND <span class="squareb">[</span>ALL<span class="squareb">]</span> VALUES OF fieldname
   
   
<var>             [</var>FROM {value1|(expression1)}<var>]</var> <var>[</var>TO {value2|(expression2)}<var>]</var>
<span class="squareb">[</span>FROM <span class="squareb">{</span>value1 <span class="squareb">|</span> (expression1)<span class="squareb">}</span><span class="squareb">]</span> <span class="squareb">[</span>TO <span class="squareb">{</span>value2 <span class="squareb">|</span> (expression2)<span class="squareb">}</span><span class="squareb">]</span>
   
   
<var>             [[</var>NOT<var>]</var> LIKE 'pattern'<var>]</var>
<span class="squareb">[</span><span class="squareb">[</span>NOT<span class="squareb">]</span> LIKE 'pattern'<span class="squareb">]</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>*</b> FIND AND PRINT COUNT <var>[</var>retrieval-conditions<var>]</var>
<p class="syntax"><b><sup>(*)</sup></b>FIND AND PRINT COUNT <span class="squareb">[</span>retrieval-conditions<span class="squareb">]</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>*</b> {FIND WITHOUT LOCKS | FDWOL}
<p class="syntax"><b><sup>(*)</sup></b><span class="squareb">{</span>FIND WITHOUT LOCKS <span class="squareb">|</span> FDWOL<span class="squareb">}</span>
   
   
  [ALL] RECORDS [IN label | ON [LIST] listname]
  [ALL] RECORDS [IN label <span class="squareb">|</span> ON [LIST] listname]
   
   
  [FOR WHICH | WITH] retrieval-conditions
  [FOR WHICH <span class="squareb">|</span> WITH] retrieval-conditions
</p>
</p>
<hr>
<hr>
   
   
<p class="code">FLUSH PROCESS {cid | processname | %variable}</p>
<p class="syntax">FLUSH PROCESS <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span></p>
   
   
<hr>
<hr>
   
   
<p class="code"><b>**</b> FOR {EACH | k} {OCCURRENCE | OCCURRENCES} OF fieldname
<p class="syntax"><b><sup>(**)</sup></b>FOR <span class="squareb">{</span>EACH <span class="squareb">|</span> k<span class="squareb">}</span> <span class="squareb">{</span>OCCURRENCE <span class="squareb">|</span> OCCURRENCES<span class="squareb">}</span> OF fieldname
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>*</b> FOR {EACH | k} {RECORD | RECORDS}
<p class="syntax"><b><sup>(*)</sup></b>FOR <span class="squareb">{</span>EACH <span class="squareb">|</span> k<span class="squareb">}</span> <span class="squareb">{</span>RECORD <span class="squareb">|</span> RECORDS<span class="squareb">}</span>
   
   
  [IN label | ON [LIST] listname]
  [IN label <span class="squareb">|</span> ON [LIST] listname]
   
   
  IN [ASCENDING | DESCENDING]
  IN [ASCENDING <span class="squareb">|</span> DESCENDING]
   
   
  [SORTKEY] ORDER [BY [EACH] fieldname]
  [SORTKEY] ORDER [BY [EACH] fieldname]
   
   
  [FROM {value1|(expression1)}] [TO {value2|(expression2)}] [BY {%variable | literal}]
  [FROM <span class="squareb">{</span>value1 <span class="squareb">|</span> (expression1)<span class="squareb">}</span>] [TO <span class="squareb">{</span>value2 <span class="squareb">|</span> (expression2)<span class="squareb">}</span>] [BY <span class="squareb">{</span>%variable <span class="squareb">|</span> literal<span class="squareb">}</span>]
   
   
  [OPTIMIZING FNV]
  [OPTIMIZING FNV]
   
   
  [{WHERE | WITH} retrieval-conditions]
  [<span class="squareb">{</span>WHERE <span class="squareb">|</span> WITH<span class="squareb">}</span> retrieval-conditions]
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>*</b> FOR {EACH | k} {VALUE | VALUES} OF fieldname
<p class="syntax"><b><sup>(*)</sup></b>FOR <span class="squareb">{</span>EACH <span class="squareb">|</span> k<span class="squareb">}</span> <span class="squareb">{</span>VALUE <span class="squareb">|</span> VALUES<span class="squareb">}</span> OF fieldname
   
   
  [FROM {value1|(expression1)}] [TO {value2|(expression2)}]
  [FROM <span class="squareb">{</span>value1 <span class="squareb">|</span> (expression1)<span class="squareb">}</span>] [TO <span class="squareb">{</span>value2 <span class="squareb">|</span> (expression2)<span class="squareb">}</span>] [[NOT] LIKE pattern]
[[NOT] LIKE pattern]
   
   
  [IN [ASCENDING | DESCENDING] [CHARACTER | NUMERICAL]
  [IN [ASCENDING <span class="squareb">|</span> DESCENDING] [CHARACTER <span class="squareb">|</span> NUMERICAL] [RIGHT-ADJUSTED] ORDER]
[RIGHT-ADJUSTED] ORDER]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">FOR {EACH | k} {VALUE | VALUES} IN label </p>
<p class="syntax">FOR <span class="squareb">{</span>EACH <span class="squareb">|</span> k<span class="squareb">}</span> <span class="squareb">{</span>VALUE <span class="squareb">|</span> VALUES<span class="squareb">}</span> IN label </p>
   
   
<hr>
<hr>
   
   
<p class="code"><b>*</b> FOR RECORD NUMBER {value | (expression)}
<p class="syntax"><b><sup>(*)</sup></b>FOR RECORD NUMBER <span class="squareb">{</span>value <span class="squareb">|</span> (expression)<span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code">FOR RECORD NUMBER {value | IN label} [OPTIMIZING FNV]
<p class="syntax">FOR RECORD NUMBER <span class="squareb">{</span>value <span class="squareb">|</span> IN label<span class="squareb">}</span> [OPTIMIZING FNV]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">FOR %variable FROM expression1
<p class="syntax">FOR %variable FROM expression1
   
   
  {TO expression2 [BY expression3]
  <span class="squareb">{</span>TO expression2 [BY expression3]
   
   
  | [BY expression3] TO expression2}
  <span class="squareb">|</span> [BY expression3] TO expression2<span class="squareb">}</span>
</p>
</p>
<p class="note"><b>Note:</b> The BY clause, when omitted, defaults to a value of 1.</p>
<p class="note"><b>Note:</b> The BY clause, when omitted, defaults to a value of 1.</p>
Line 440: Line 433:
<hr>
<hr>
   
   
<p class="code">IDENTIFY
<p class="syntax">IDENTIFY
   
   
  {[IMAGE] imagename
  <span class="squareb">{</span>[IMAGE] imagename
   
   
  | %imagename:itemname LEN {n | %variable}
  <span class="squareb">|</span> %imagename:itemname LEN <span class="squareb">{</span>n <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  | %imagename:arrayname OCCURS {n | %variable}}
  <span class="squareb">|</span> %imagename:arrayname OCCURS <span class="squareb">{</span>n <span class="squareb">|</span> %variable<span class="squareb">}</span><span class="squareb">}</span>
   
   
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>C</b> IF expression THEN statements
<p class="syntax"><b><sup>(C)</sup></b>IF expression THEN statements
   
   
  [ELSE statements | ELSEIF expression THEN statements]
  [ELSE statements <span class="squareb">|</span> ELSEIF expression THEN statements]
   
   
</p>
</p>
<hr>
<hr>
   
   
<p class="code">[DECLARE] IMAGE imagename
<p class="syntax">[DECLARE] IMAGE imagename
   
   
  [GLOBAL [PERMANENT | TEMPORARY]
  [GLOBAL [PERMANENT <span class="squareb">|</span> TEMPORARY]
   
   
  | [PERMANENT | TEMPORARY] GLOBAL
  <span class="squareb">|</span> [PERMANENT <span class="squareb">|</span> TEMPORARY] GLOBAL
   
   
  | COMMON [AT [itemname | imagename1 |arrayname}]]
  <span class="squareb">|</span> COMMON [AT [itemname <span class="squareb">|</span> imagename1 |arrayname<span class="squareb">}</span>]]
   
   
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>*</b> INCLUDE procedurename  </p>
<p class="syntax"><b><sup>(*)</sup></b>INCLUDE procedurename  </p>
   
   
<hr>
<hr>
   
   
<p class="code">INPUT inputname [AT [COLUMN] n]
<p class="syntax">INPUT inputname [AT [COLUMN] n]
   
   
  [TO [COLUMN] m | [LEN m] DP {k | *}]]
  [TO [COLUMN] m <span class="squareb">|</span> [LEN m] DP <span class="squareb">{</span>k <span class="squareb">|</span> *<span class="squareb">}</span>]]
   
   
  [UPCASE | NOCASE] [DEFAULT 'value']
  [UPCASE <span class="squareb">|</span> NOCASE] [DEFAULT 'value']
   
   
  [DEBLANK | NODEBLANK] [PAD WITH 'c']
  [DEBLANK <span class="squareb">|</span> NODEBLANK] [PAD WITH 'c']
   
   
  [REQUIRED | ALPHA | ALPHANUM | MUSTFILL
  [REQUIRED <span class="squareb">|</span> ALPHA <span class="squareb">|</span> ALPHANUM <span class="squareb">|</span> MUSTFILL
   
   
  | ONEOF literal [,literal]...
  <span class="squareb">|</span> ONEOF literal [,literal]...
   
   
  | [NUMERIC] [RANGE lo [TO] hi [AND lo [TO] hi] ...]
  <span class="squareb">|</span> [NUMERIC] [RANGE lo [TO] hi [AND lo [TO] hi] ...]
   
   
  | VERIFY 'characters']...
  <span class="squareb">|</span> VERIFY 'characters']...
   
   
  [[READ] attributes] [REREAD attributes]
  [[READ] attributes] [REREAD attributes]
Line 493: Line 486:
  [PRINT attributes]
  [PRINT attributes]
   
   
  {TAG [attributes] [WITH 'c']] [ITEMID n]
  <span class="squareb">{</span>TAG [attributes] [WITH 'c']] [ITEMID n]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">INSERT fieldname <var>[</var>(subscript)<var>]</var> = {value | (expression)}
<p class="syntax">INSERT fieldname <span class="squareb">[</span>(subscript)<span class="squareb">]</span> = <span class="squareb">{</span>value <span class="squareb">|</span> (expression)<span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>+</b> INVITE {cid | processname | %variable}
<p class="syntax"><b><sup>(+)</sup></b>INVITE <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  [SYNCLEVEL | FLUSH | CONFIRM]<var> </var>
  [SYNCLEVEL <span class="squareb">|</span> FLUSH <span class="squareb">|</span> CONFIRM]<var> </var>
</p>
</p>
<hr>
<hr>
   
   
<p class="code">itemname IS [TYPE]
<p class="syntax">itemname IS [TYPE]
   
   
  {STRING | BINARY | PACKED | ZONED | FLOAT | EFORMAT}
  <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>
   
   
  {LEN {n | UNKNOWN} | BITS n | DIGITS n
  <span class="squareb">{</span>LEN <span class="squareb">{</span>n <span class="squareb">|</span> UNKNOWN<span class="squareb">}</span> <span class="squareb">|</span> BITS n <span class="squareb">|</span> DIGITS n
   
   
  | TO position}
  <span class="squareb">|</span> TO position<span class="squareb">}</span>
   
   
  [DP {k | *}] [BP n] [SIGNED | UNSIGNED]
  [DP <span class="squareb">{</span>k <span class="squareb">|</span> *<span class="squareb">}</span>] [BP n] [SIGNED <span class="squareb">|</span> UNSIGNED]
   
   
  [PAD {BLANK | character | NULL}] [STRIP | NOSTRIP]
  [PAD <span class="squareb">{</span>BLANK <span class="squareb">|</span> character <span class="squareb">|</span> NULL<span class="squareb">}</span>] [STRIP <span class="squareb">|</span> NOSTRIP]
   
   
  [ALIGN]
  [ALIGN]
   
   
  [JUSTIFY {LEFT | RIGHT}]
  [JUSTIFY <span class="squareb">{</span>LEFT <span class="squareb">|</span> RIGHT<span class="squareb">}</span>]
   
   
  [INITIAL {BLANK | ZERO | NULL | value}]
  [INITIAL <span class="squareb">{</span>BLANK <span class="squareb">|</span> ZERO <span class="squareb">|</span> NULL <span class="squareb">|</span> value<span class="squareb">}</span>]
   
   
  [AFTER {itemname | arrayname}
  [AFTER <span class="squareb">{</span>itemname <span class="squareb">|</span> arrayname<span class="squareb">}</span>
   
   
  | AT {position | itemname | imagename1 | arrayname}]
  <span class="squareb">|</span> AT <span class="squareb">{</span>position <span class="squareb">|</span> itemname <span class="squareb">|</span> imagename1 <span class="squareb">|</span> arrayname<span class="squareb">}</span>]
   
   
  [OCCURS {n [DEPENDING ON {itemname | %variable}]
  [OCCURS <span class="squareb">{</span>n [DEPENDING ON <span class="squareb">{</span>itemname <span class="squareb">|</span> %variable<span class="squareb">}</span>]
   
   
  | UNKNOWN}]
  <span class="squareb">|</span> UNKNOWN<span class="squareb">}</span>]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">JUMP TO label
<p class="syntax">JUMP TO label
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">JUMP TO (label1 <var>[</var>,label2<var>]</var> ...) expression
<p class="syntax">JUMP TO (label1 <span class="squareb">[</span>,label2<span class="squareb">]</span> ...) expression
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">LOOP END </p>
<p class="syntax">LOOP END </p>
   
   
<hr>
<hr>
   
   
<p class="code">MAX PFKEY n </p>
<p class="syntax">MAX PFKEY n </p>
   
   
<hr>
<hr>
   
   
<p class="code">[DECLARE] MENU menuname
<p class="syntax">[DECLARE] MENU menuname
   
   
  [GLOBAL [PERMANENT | TEMPORARY]
  [GLOBAL [PERMANENT <span class="squareb">|</span> TEMPORARY]
   
   
  | [PERMANENT | TEMPORARY] GLOBAL
  <span class="squareb">|</span> [PERMANENT <span class="squareb">|</span> TEMPORARY] GLOBAL
   
   
  | COMMON]
  <span class="squareb">|</span> COMMON]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">MODIFY {%menuname:itemname | %screenname:itemname}
<p class="syntax">MODIFY <span class="squareb">{</span>%menuname:itemname <span class="squareb">|</span> %screenname:itemname<span class="squareb">}</span>
   
   
  [TO] attributes [[FOR] {ALL | READ | REREAD | TAB
  [TO] attributes [[FOR] <span class="squareb">{</span>ALL <span class="squareb">|</span> READ <span class="squareb">|</span> REREAD <span class="squareb">|</span> TAB
   
   
  | PRINT}]
  <span class="squareb">|</span> PRINT<span class="squareb">}</span>]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">MODIFY BUFFER [SIZE=n
<p class="syntax">MODIFY BUFFER [SIZE=n
   
   
   | %variable [PRESERVE | NOPRESERVE]]
   <span class="squareb">|</span> %variable [PRESERVE <span class="squareb">|</span> NOPRESERVE]]
   
   
   [FILL [X'nn'] | CLEAR]
   [FILL [X'nn'] <span class="squareb">|</span> CLEAR]
   
   
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>C</b> NEW PAGE  </p>
<p class="syntax"><b><sup>(C)</sup></b>NEW PAGE  </p>
   
   
<hr>
<hr>
   
   
<p class="code"><b>**</b> NOTE <var>{</var>fieldname <var>[</var>(subscript)<var>]}</var>
<p class="syntax"><b><sup>(**)</sup></b>NOTE <var><span class="squareb">{</span></var>fieldname <span class="squareb">[</span>(subscript)<var>]<span class="squareb">}</span></var>
</p>
</p>
<hr>
<hr>
   
   
<p class="code">NOTE 'string' </p>
<p class="syntax">NOTE 'string' </p>
   
   
<hr>
<hr>
   
   
<p class="code">ON {ATTENTION | ERROR | FIELD CONSTRAINT CONFLICT
<p class="syntax">ON <span class="squareb">{</span>ATTENTION <span class="squareb">|</span> ERROR <span class="squareb">|</span> FIELD CONSTRAINT CONFLICT
   
   
   | FIND CONFLICT | MISSING FILE | MISSING MEMBER
   <span class="squareb">|</span> FIND CONFLICT <span class="squareb">|</span> MISSING FILE <span class="squareb">|</span> MISSING MEMBER
   
   
   | RECORD LOCKING CONFLICT} statements </p>
   <span class="squareb">|</span> RECORD LOCKING CONFLICT<span class="squareb">}</span> statements </p>
   
   
<hr>
<hr>
   
   
<p class="code">OPEN {[DATASET | EXTERNAL] {ext-filename
<p class="syntax">OPEN <span class="squareb">{</span>[DATASET <span class="squareb">|</span> EXTERNAL] <span class="squareb">{</span>ext-filename
   
   
     | %variable}
     <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
     | [EXTERNAL] {TERMINAL | %variable}}
     <span class="squareb">|</span> [EXTERNAL] <span class="squareb">{</span>TERMINAL <span class="squareb">|</span> %variable<span class="squareb">}</span><span class="squareb">}</span>
   
   
     FOR {INPUT [OUTPUT] | OUTPUT [INPUT] | INOUT}
     FOR <span class="squareb">{</span>INPUT [OUTPUT] <span class="squareb">|</span> OUTPUT [INPUT] <span class="squareb">|</span> INOUT<span class="squareb">}</span>
   
   
     [PASSWORD {value | %variable}]
     [PASSWORD <span class="squareb">{</span>value <span class="squareb">|</span> %variable<span class="squareb">}</span>]
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>C</b> OPEN [C] [[PERM | TEMP] GROUP | FILE]
<p class="syntax"><b><sup>(C)</sup></b>OPEN [C] [[PERM <span class="squareb">|</span> TEMP] GROUP <span class="squareb">|</span> FILE]
   
   
  {name [AT {location | %variable | =}] |%variable}
  <span class="squareb">{</span>name [AT <span class="squareb">{</span>location <span class="squareb">|</span> %variable <span class="squareb">|</span> =<span class="squareb">}</span>] |%variable<span class="squareb">}</span>
   
   
  [PASSWORD {value | %variable}]
  [PASSWORD <span class="squareb">{</span>value <span class="squareb">|</span> %variable<span class="squareb">}</span>]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">OPEN PROCESS {processname | %variable}
<p class="syntax">OPEN PROCESS <span class="squareb">{</span>processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  [CID {name | %variable}]
  [CID <span class="squareb">{</span>name <span class="squareb">|</span> %variable<span class="squareb">}</span>]
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>+</b> OPEN PROCESS {processname | %variable}
<p class="syntax"><b><sup>(+)</sup></b>OPEN PROCESS <span class="squareb">{</span>processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  [CID {name | %variable}]
  [CID <span class="squareb">{</span>name <span class="squareb">|</span> %variable<span class="squareb">}</span>]
   
   
  {outbound-options | inbound-options}
  <span class="squareb">{</span>outbound-options <span class="squareb">|</span> inbound-options<span class="squareb">}</span>
</p>
</p>
   
   
<div style="margin-left: 20px">
<div style="margin-left: 20px; background-color: #fBfBfB;">
<p>
<p>
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 {%variable | 'string'}]  
<li>[AT DESTINATION] [WITH] [USERID <span class="squareb">{</span>%variable <span class="squareb">|</span> 'string'<span class="squareb">}</span>]
 
<li>[PASSWORD {%variable | 'string'}]
<li>[PASSWORD <span class="squareb">{</span>%variable <span class="squareb">|</span> 'string'<span class="squareb">}</span>]
   
   
<li>[{ACCOUNT | PROFILE {%variable | 'string'}]
<li>[<span class="squareb">{</span>ACCOUNT <span class="squareb">|</span> PROFILE <span class="squareb">{</span>%variable <span class="squareb">|</span> 'string'<span class="squareb">}</span>]
   
   
<li>[INITIAL {DATA 'string' | DATA %variable | IMAGE imagename] ...]
<li>[INITIAL <span class="squareb">{</span>DATA 'string' <span class="squareb">|</span> DATA %variable <span class="squareb">|</span> IMAGE imagename] ...]
</ul>
</ul>
   
   
<p>
<p>
and <var class="term">inbound-options</var> are:</p>
and <var class="term">inbound-options</var> are:</p>
 
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li>ACCEPT [INITIAL {DATA %variable | IMAGE image} ...] </li>
<li>ACCEPT [INITIAL <span class="squareb">{</span>DATA %variable <span class="squareb">|</span> IMAGE image<span class="squareb">}</span> ...] </li>
</ul>
</ul>
 
</div> <!-- end indent of options -->
</div> <!-- end indent of options -->
   
   
<hr>
<hr>
   
   
<p class="code">PAUSE <var>[</var>n | %variable<var>]</var>
<p class="syntax">PAUSE <span class="squareb">[</span>n <span class="squareb">|</span> %variable<span class="squareb">]</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>**</b> PLACE RECORD ON <var>[</var>LIST<var>]</var> listname
<p class="syntax"><b><sup>(**)</sup></b>PLACE RECORD ON <span class="squareb">[</span>LIST<span class="squareb">]</span> listname
</p>
</p>
<hr>
<hr>
   
   
<p class="code">PLACE RECORDS {IN label | ON [LIST] listname1}
<p class="syntax">PLACE RECORDS <span class="squareb">{</span>IN label <span class="squareb">|</span> ON [LIST] listname1<span class="squareb">}</span>
   
   
  ON [LIST] listname2
  ON [LIST] listname2
Line 671: Line 664:
<hr>
<hr>
   
   
<p class="code">POSITION {FOUNDSET foundsortset_name | LIST list_name}
<p class="syntax">POSITION <span class="squareb">{</span>FOUNDSET foundsortset_name <span class="squareb">|</span> LIST list_name<span class="squareb">}</span>
   
   
   [AT] position_name
   [AT] position_name
Line 678: Line 671:
<hr>
<hr>
   
   
<p class="code">POSITION {ext-filename | %variable}
<p class="syntax">POSITION <span class="squareb">{</span>ext-filename <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  AT KEY operator {value | %variable}
  AT KEY operator <span class="squareb">{</span>value <span class="squareb">|</span> %variable<span class="squareb">}</span>
</p>
</p>
<p class="note"><b>Note:</b> Use this form of the POSITION statement with external file processing using images; see [[Images#POSITION statement|POSITION statement]].</p>
<p class="note"><b>Note:</b> Use this form of the POSITION statement with external file processing using images; see [[Images#POSITION statement|POSITION statement]].</p>
<hr>
<hr>
   
   
<p class="code">PREPARE
<p class="syntax">PREPARE
   
   
  {[IMAGE] imagename | [MENU] menuname
  <span class="squareb">{</span>[IMAGE] imagename <span class="squareb">|</span> [MENU] menuname
   
   
  | [SCREEN] screenname}
  <span class="squareb">|</span> [SCREEN] screenname<span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code">PRINT print specifications  </p>
<p class="syntax">PRINT print specifications  </p>
   
   
<hr>
<hr>
   
   
<p class="code"><b>**</b> {PAI | PRINT ALL INFORMATION}
<p class="syntax"><b><sup>(**)</sup></b><span class="squareb">{</span>PAI <span class="squareb">|</span> PRINT ALL INFORMATION<span class="squareb">}</span>
   
   
  INTO array1, array2 [,array3] [FROM start] [COUNT ct]
  INTO array1, array2 [,array3] [FROM start] [COUNT ct]
Line 703: Line 696:
<hr>
<hr>
   
   
<p class="code">PRINT [MENU] menuname [ALERT]
<p class="syntax">PRINT [MENU] menuname [ALERT]
   
   
  [TITLE {'text' | %variable} [AT [COLUMN] n]
  [TITLE <span class="squareb">{</span>'text' <span class="squareb">|</span> %variable<span class="squareb">}</span> [AT [COLUMN] n]
   
   
  [TO [COLUMN] m | LEN m] [attributes]]
  [TO [COLUMN] m <span class="squareb">|</span> LEN m] [attributes]]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">PRINT SCREEN screenname [ALERT] [[WITH] CURSOR]
<p class="syntax">PRINT SCREEN screenname [ALERT] [[WITH] CURSOR]
   
   
  [TITLE {'text' | %variable} [AT [COLUMN] n]
  [TITLE <span class="squareb">{</span>'text' <span class="squareb">|</span> %variable<span class="squareb">}</span> [AT [COLUMN] n]
   
   
  [TO [COLUMN] m | LEN m] [attributes]]
  [TO [COLUMN] m <span class="squareb">|</span> LEN m] [attributes]]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">PROMPT {'text' | promptname} [AT [COLUMN] n]
<p class="syntax">PROMPT <span class="squareb">{</span>'text' <span class="squareb">|</span> promptname<span class="squareb">}</span> [AT [COLUMN] n]
   
   
  [TO [COLUMN] m | LEN m] [DP {k | *}]] [DEFAULT 'value']
  [TO [COLUMN] m <span class="squareb">|</span> LEN m] [DP <span class="squareb">{</span>k <span class="squareb">|</span> *<span class="squareb">}</span>]] [DEFAULT 'value']
   
   
  [[READ] attributes] [REREAD attributes]
  [[READ] attributes] [REREAD attributes]
Line 729: Line 722:
<hr>
<hr>
   
   
<p class="code"><b>+</b> QUERY PROCESS {cid | processname | %variable} options
<p class="syntax"><b><sup>(+)</sup></b>QUERY PROCESS <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span> options
</p>
</p>
   
   
<div style="margin-left: 20px">
<div style="margin-left: 20px; background-color: #fBfBfB;">
<p>
<p>
where options must be one or more of the following:</p>
where options must be one or more of the following:</p>
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li>STATE %variable
<li>STATE %variable
 
<li>PROCESSGROUP %variable
<li>PROCESSGROUP %variable
   
   
Line 746: Line 739:
<li>MODENAME %variable
<li>MODENAME %variable
</ul>
</ul>
 
</div> <!-- end options indenting -->
</div> <!-- end options indenting -->
   
   
<hr>
<hr>
   
   
<p class="code">READ [IMAGE] imagename
<p class="syntax">READ [IMAGE] imagename
   
   
  FROM {ext-filename | TERMINAL | %variable}
  FROM <span class="squareb">{</span>ext-filename <span class="squareb">|</span> TERMINAL <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  [PROMPT {'text' | %variable}]
  [PROMPT <span class="squareb">{</span>'text' <span class="squareb">|</span> %variable<span class="squareb">}</span>]
   
   
  [NEXT | KEY operator {value | %variable}]
  [NEXT <span class="squareb">|</span> KEY operator <span class="squareb">{</span>value <span class="squareb">|</span> %variable<span class="squareb">}</span>]
   
   
</p>
</p>
<hr>
<hr>
   
   
<p class="code">READ [IMAGE] imagename FROM BUFFER
<p class="syntax">READ [IMAGE] imagename FROM BUFFER
   
   
   [POSITION={%pvariable | n}]
   [POSITION=<span class="squareb">{</span>%pvariable <span class="squareb">|</span> n<span class="squareb">}</span>]
   
   
   [MAXLEN={%lvariable | n}]
   [MAXLEN=<span class="squareb">{</span>%lvariable <span class="squareb">|</span> n<span class="squareb">}</span>]
   
   
</p>
</p>
<hr>
<hr>
   
   
<p class="code">READ [MENU] menuname [ALERT]
<p class="syntax">READ [MENU] menuname [ALERT]
   
   
  [TITLE ['text' | %variable} [AT [COLUMN] n]
  [TITLE ['text' <span class="squareb">|</span> %variable<span class="squareb">}</span> [AT [COLUMN] n]
   
   
  [TO [COLUMN] m | LEN m] [attributes]]
  [TO [COLUMN] m <span class="squareb">|</span> LEN m] [attributes]]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">READ <var>[</var>SCREEN<var>]</var> screenname <var>[</var>ALERT<var>]</var> <var>[</var>NO REREAD<var>]</var> <var>[ [</var>WITH<var>]</var>
<p class="syntax">READ <span class="squareb">[</span>SCREEN<span class="squareb">]</span> screenname <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>
   
   
  CURSOR<var>]</var>
  [TITLE <span class="squareb">{</span>'text' <span class="squareb">|</span> %variable<span class="squareb">}</span> [AT [COLUMN] n]
   
   
[TITLE {'text' | %variable} [AT [COLUMN] n]
  [TO [COLUMN] m <span class="squareb">|</span> LEN m] [attributes]]
  [TO [COLUMN] m | LEN m] [attributes]]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">RECEIVE {IMAGE imagename | %variable}
<p class="syntax">RECEIVE <span class="squareb">{</span>IMAGE imagename <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  FROM {cid | processname | %variable} [RESULT %variable]
  FROM <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span> [RESULT %variable]
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>+</b> RECEIVE {IMAGE imagename | %variable}
<p class="syntax"><b><sup>(+)</sup></b>RECEIVE <span class="squareb">{</span>IMAGE imagename <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  FROM {cid | processname | %variable}
  FROM <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  RESULT %variable
  RESULT %variable
Line 803: Line 794:
<hr>
<hr>
   
   
<p class="code">RELEASE ALL RECORDS</p>
<p class="syntax">RELEASE ALL RECORDS</p>
   
   
<hr>
<hr>
   
   
<p class="code">RELEASE POSITION {ext-filename | %variable}
<p class="syntax">RELEASE POSITION <span class="squareb">{</span>ext-filename <span class="squareb">|</span> %variable<span class="squareb">}</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">RELEASE RECORDS {IN label | ON [LIST] listname}
<p class="syntax">RELEASE RECORDS <span class="squareb">{</span>IN label <span class="squareb">|</span> ON [LIST] listname<span class="squareb">}</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code"><b>**</b> REMEMBER <var>[</var>GLOBAL<var>]</var> position_name
<p class="syntax"><b><sup>(**)</sup></b>REMEMBER <span class="squareb">[</span>GLOBAL<span class="squareb">]</span> position_name
   
   
   [IN foundsortset_name | ON list_name]
   [IN foundsortset_name <span class="squareb">|</span> ON list_name]
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>**</b> REMOVE RECORD FROM <var>[</var>LIST<var>]</var> listname
<p class="syntax"><b><sup>(**)</sup></b>REMOVE RECORD FROM <span class="squareb">[</span>LIST<span class="squareb">]</span> listname
</p>
</p>
<hr>
<hr>
   
   
<p class="code">REMOVE RECORDS {IN label | ON [LIST] listname}
<p class="syntax">REMOVE RECORDS <span class="squareb">{</span>IN label <span class="squareb">|</span> ON [LIST] listname<span class="squareb">}</span>
   
   
  FROM [LIST] listname2
  FROM [LIST] listname2
Line 833: Line 824:
<hr>
<hr>
   
   
<p class="code">REPEAT [FOREVER | n TIMES | WHILE expression]
<p class="syntax">REPEAT [FOREVER <span class="squareb">|</span> n TIMES <span class="squareb">|</span> WHILE expression]
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">REREAD [SCREEN] screenname [ALERT] [[WITH] CURSOR]
<p class="syntax">REREAD [SCREEN] screenname [ALERT] [[WITH] CURSOR]
   
   
  [TITLE {'text' | %variable} [AT [COLUMN] n]
  [TITLE <span class="squareb">{</span>'text' <span class="squareb">|</span> %variable<span class="squareb">}</span> [AT [COLUMN] n]
   
   
  [TO [COLUMN] m | LEN m] [attributes]]
  [TO [COLUMN] m <span class="squareb">|</span> LEN m] [attributes]]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">RESET {HEADER | TRAILER} m
<p class="syntax">RESET <span class="squareb">{</span>HEADER <span class="squareb">|</span> TRAILER<span class="squareb">}</span> m
</p>
</p>
<hr>
<hr>
   
   
<p class="code">RETRY <var>[</var>PENDING STATEMENT<var>]</var>
<p class="syntax">RETRY <span class="squareb">[</span>PENDING STATEMENT<span class="squareb">]</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code">RETURN
<p class="syntax">RETURN
</p>
</p>
<hr>
<hr>
   
   
<p class="code">[DECLARE] SCREEN screenname
<p class="syntax">[DECLARE] SCREEN screenname
   
   
  [GLOBAL [<u>PERMANENT</u> | TEMPORARY]
  [GLOBAL [<u><b>PERM</b>ANENT</u> <span class="squareb">|</span> <b>TEMP</b>ORARY]
   
   
  | [<u>PERMANENT</u> | TEMPORARY] GLOBAL
  <span class="squareb">|</span> [<u><b>PERM</b>ANENT</u> <span class="squareb">|</span> <b>TEMP</b>ORARY] GLOBAL
   
   
  | COMMON]
  <span class="squareb">|</span> COMMON]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">SEND {IMAGE imagename | 'string' | %variable}
<p class="syntax">SEND <span class="squareb">{</span>IMAGE imagename <span class="squareb">|</span> 'string' <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  TO {cid | processname | %variable}
  TO <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  [REQSEND %variable]
  [REQSEND %variable]
Line 878: Line 869:
<hr>
<hr>
   
   
<p class="code"><b>+</b> SEND {IMAGE imagename | 'string' | %variable}
<p class="syntax"><b><sup>(+)</sup></b>SEND <span class="squareb">{</span>IMAGE imagename <span class="squareb">|</span> 'string' <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  TO {cid | processname | %variable}
  TO <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
  [FLUSH | CONFIRM]
  [FLUSH <span class="squareb">|</span> CONFIRM]
   
   
  [REQSEND %variable]
  [REQSEND %variable]
Line 888: Line 879:
<hr>
<hr>
   
   
<p class="code"><b>+</b> SEND ERROR TO {cid | processname | %variable}
<p class="syntax"><b><sup>(+)</sup></b>SEND ERROR TO <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
   
   
           REQSEND %variable
           REQSEND %variable
Line 894: Line 885:
<hr>
<hr>
   
   
<p class="code">SET {HEADER | TRAILER} m print-specifications
<p class="syntax">SET <span class="squareb">{</span>HEADER <span class="squareb">|</span> TRAILER<span class="squareb">}</span> m print-specifications
</p>
</p>
<hr>
<hr>
   
   
<p class="code">SIGNAL PROCESS
<p class="syntax">SIGNAL PROCESS
   
   
  {cid | [processname | %variable} {nnn | %variable}
  <span class="squareb">{</span>cid <span class="squareb">|</span> [processname <span class="squareb">|</span> %variable<span class="squareb">}</span> <span class="squareb">{</span>nnn <span class="squareb">|</span> %variable<span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code"><b>+</b> SIGNAL PROCESS
<p class="syntax"><b><sup>(+)</sup></b>SIGNAL PROCESS
{cid | [processname | %variable}
   
   
<span class="squareb">{</span>cid <span class="squareb">|</span> [processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code">SKIP n LINE<var>[</var>S<var>]</var>
<p class="syntax">SKIP n LINE<span class="squareb">[</span>S<span class="squareb">]</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">[itemname IS] SKIP n POSITION[S]
<p class="syntax">[itemname IS] SKIP n POSITION[S]
   
   
  [INITIAL {NULL | character | BLANK}]
  [INITIAL <span class="squareb">{</span>NULL <span class="squareb">|</span> character <span class="squareb">|</span> BLANK<span class="squareb">}</span>]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">SORT [k] RECORDS {IN label | ON [LIST] listname}
<p class="syntax">SORT [k] RECORDS <span class="squareb">{</span>IN label <span class="squareb">|</span> ON [LIST] listname<span class="squareb">}</span>
   
   
  BY key [AND key] ...
  BY key [AND key] ...
</p>
</p>
   
   
<div style="margin-left: 20px">
<div style="margin-left: 20px; background-color: #fBfBfB;">
<p>
<p>
where <var class="term">key</var> is:</p>
where <var class="term">key</var> is:</p>
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li>key = fieldname <br>
<li>key = fieldname <br>
       [VALUE {[ASCENDING | DESCENDING] <br>
       [VALUE <span class="squareb">{</span>[ASCENDING <span class="squareb">|</span> DESCENDING] <br>
       [CHARACTER | NUMERICAL] | RIGHT-ADJUSTED]} ...] </li>
       [CHARACTER <span class="squareb">|</span> NUMERICAL] <span class="squareb">|</span> RIGHT-ADJUSTED]<span class="squareb">}</span> ...] </li>
</ul>
</ul>
 
</div> <!--end key indent -->
</div> <!--end key indent -->
   
   
<hr>
<hr>
   
   
<p class="code">SORT [k] RECORD KEYS
<p class="syntax">SORT [k] RECORD KEYS
   
   
  {IN label | ON [LIST] listname}
  <span class="squareb">{</span>IN label <span class="squareb">|</span> ON [LIST] listname<span class="squareb">}</span>
   
   
  BY key [AND key] ...
  BY key [AND key] ...
</p>
</p>
   
   
<div style="margin-left: 20px">
<div style="margin-left: 20px; background-color: #fBfBfB;">
<p>
<p>
where <var class="term">key</var> is:</p>
where <var class="term">key</var> is:</p>
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li>key = fieldname <br>
<li>key = fieldname <br>
       [VALUE {[ASCENDING | DESCENDING] <br>
       [VALUE <span class="squareb">{</span>[ASCENDING <span class="squareb">|</span> DESCENDING] <br>
       [CHARACTER | NUMERICAL] | [RIGHT-ADJUSTED]} ...] </li>
       [CHARACTER <span class="squareb">|</span> NUMERICAL] <span class="squareb">|</span> [RIGHT-ADJUSTED]<span class="squareb">}</span> ...] </li>
</ul>
</ul>
 
</div>
</div>
   
   
<hr>
<hr>
   
   
<p class="code">SORT VALUE IN label [IN [ASCENDING | DESCENDING]
<p class="syntax">SORT VALUE IN label [IN [ASCENDING <span class="squareb">|</span> DESCENDING]
   
   
  [<u>CHARACTER</u> | NUMERICAL] | [RIGHT-ADJUSTED] ORDER]
  [<u>CHARACTER</u> <span class="squareb">|</span> NUMERICAL] <span class="squareb">|</span> [RIGHT-ADJUSTED] ORDER]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">STOP [IF COUNT IN label EXCEEDS n]
<p class="syntax">STOP [IF COUNT IN label EXCEEDS n]
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code"><b>*</b> STORE RECORD [sort or hash key value]
<p class="syntax"><b><sup>(*)</sup></b>STORE RECORD [sort or hash key value]
   
   
   fieldname1=[value1 | (expression1)]
   fieldname1=[value1 <span class="squareb">|</span> (expression1)]
   
   
   [fieldname2=(expression)]
   [fieldname2=(expression)]
Line 991: Line 981:
<hr>
<hr>
   
   
<p class="code">SUBROUTINE
<p class="syntax">SUBROUTINE
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">SUBROUTINE subname
<p class="syntax">SUBROUTINE subname
   
   
  [(formal-parameter [INPUT | OUTPUT | INPUT OUTPUT] [,...])]
  [(formal-parameter [INPUT <span class="squareb">|</span> OUTPUT <span class="squareb">|</span> INPUT OUTPUT] [,...])]
</p>
</p>
   
   
<div style="margin-left: 20px">
<div style="margin-left: 20px; background-color: #fBfBfB;">
<p>
<p>
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>%variable [IS STRING [LEN n] [DP {n | *}] [ARRAY (*[,*[,*]]) [NO FS]] <br>          
<li>%variable [IS STRING [LEN n] [DP <span class="squareb">{</span>n <span class="squareb">|</span> *<span class="squareb">}</span>] [ARRAY (*[,*[,*]]) [NO FS]] <br>
           | IS {FIXED [DP n] | FLOAT} [ARRAY (*[,*[,*]])]]          
           <span class="squareb">|</span> IS <span class="squareb">{</span>FIXED [DP n] <span class="squareb">|</span> FLOAT<span class="squareb">}</span> [ARRAY (*[,*[,*]])]]
   
   
<li>LIST listname [IN [FILE | [PERM | TEMP] GROUP] name]
<li>LIST listname [IN [FILE <span class="squareb">|</span> [PERM <span class="squareb">|</span> TEMP] GROUP] name]
</ul>
</ul>
</div>
</div>
Line 1,014: Line 1,004:
<hr>
<hr>
   
   
<p class="code">TAG %screenname:inputname <var>[</var>attributes<var>]</var> <var>[</var>WITH 'c'<var>]</var>
<p class="syntax">TAG %screenname:inputname <span class="squareb">[</span>attributes<span class="squareb">]</span> <span class="squareb">[</span>WITH 'c'<span class="squareb">]</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code"><b>+</b> TEST [FOR]
<p class="syntax"><b><sup>(+)</sup></b>TEST [FOR]
   
   
  {ANY RECEIPT RETURN %variable
  <span class="squareb">{</span>ANY RECEIPT RETURN %variable
   
   
  | RECEIPT {cid | processname | %variable}}
  <span class="squareb">|</span> RECEIPT <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span><span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code">TITLE {'text' | promptname}
<p class="syntax">TITLE <span class="squareb">{</span>'text' <span class="squareb">|</span> promptname<span class="squareb">}</span>
   
   
  [AT [COLUMN] n] [TO [COLUMN] m | [LEN m]
  [AT [COLUMN] n] [TO [COLUMN] m <span class="squareb">|</span> [LEN m]
   
   
  [DP {k | *}]]
  [DP <span class="squareb">{</span>k <span class="squareb">|</span> *<span class="squareb">}</span>]]
   
   
  [DEFAULT 'value']
  [DEFAULT 'value']
Line 1,042: Line 1,032:
<hr>
<hr>
   
   
<p class="code">TRANSFER [CONTROL] TO PROCESS {processname
<p class="syntax">TRANSFER [CONTROL] TO PROCESS <span class="squareb">{</span>processname <span class="squareb">|</span> %variable<span class="squareb">}</span>
| %variable}
   
   
  [WITH] [USERID {%variable | 'string'}]
  [WITH] [USERID <span class="squareb">{</span>%variable <span class="squareb">|</span> 'string'<span class="squareb">}</span>]
   
   
  [PASSWORD {variable | 'string'}]
  [PASSWORD <span class="squareb">{</span>variable <span class="squareb">|</span> 'string'<span class="squareb">}</span>]
   
   
  [ACCOUNT {%variable | 'string'}]
  [ACCOUNT <span class="squareb">{</span>%variable <span class="squareb">|</span> 'string'<span class="squareb">}</span>]
   
   
  [PASSING {IMAGE imagename | 'string' | %variable}]
  [PASSING <span class="squareb">{</span>IMAGE imagename <span class="squareb">|</span> 'string' <span class="squareb">|</span> %variable<span class="squareb">}</span>]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">UPDATE RECORD</p>
<p class="syntax">UPDATE RECORD</p>
   
   
<hr>
<hr>
   
   
<p class="code">VARIABLES ARE
<p class="syntax">VARIABLES ARE
   
   
  {FIXED [DP n] | FLOAT
  <span class="squareb">{</span>FIXED [DP n] <span class="squareb">|</span> FLOAT
   
   
  | STRING [LEN n] [DP {n | *}]
  <span class="squareb">|</span> STRING [LEN n] [DP <span class="squareb">{</span>n <span class="squareb">|</span> *<span class="squareb">}</span>]
   
   
  | UNDEFINED}
  <span class="squareb">|</span> UNDEFINED<span class="squareb">}</span>
   
   
</p>
</p>
<hr>
<hr>
   
   
<p class="code">[DECLARE] %variable [IS]
<p class="syntax">[DECLARE] %variable [IS]
{FIXED [DP n] | FLOAT} [ARRAY (d1[,d2[,d3]])]
   
   
  [COMMON]
  <span class="squareb">{</span>FIXED [DP n] <span class="squareb">|</span> FLOAT<span class="squareb">}</span> [ARRAY (d1[,d2[,d3]])]
   
   
[COMMON]
</p>
</p>
<hr>
<hr>
   
   
<p class="code">[DECLARE] %variable [IS]
<p class="syntax">[DECLARE] %variable [IS]
<nowiki>
 
  STRING [LEN n] [DP {n | *}] [ARRAY (d1[,d2[d3]])]
  STRING [LEN n] [DP <span class="squareb">{</span>n <span class="squareb">|</span> *<span class="squareb">}</span>] [ARRAY (d1[,d2[d3]])]
</nowiki>
 
  [NO FIELD SAVE] [COMMON]
  [NO FIELD SAVE] [COMMON]
   
   
Line 1,090: Line 1,077:
<hr>
<hr>
   
   
<p class="code"><b>+</b> WAIT [{n | %variable} SEC[S]] [FOR]
<p class="syntax"><b><sup>(+)</sup></b>WAIT [<span class="squareb">{</span>n <span class="squareb">|</span> %variable<span class="squareb">}</span> SEC[S]] [FOR]
   
   
  {ANY RECEIPT RETURN %variable
  <span class="squareb">{</span>ANY RECEIPT RETURN %variable
   
   
  | RECEIPT {cid | processname | %variable}}
  <span class="squareb">|</span> RECEIPT <span class="squareb">{</span>cid <span class="squareb">|</span> processname <span class="squareb">|</span> %variable<span class="squareb">}</span><span class="squareb">}</span>
</p>
</p>
   
   
<hr>
<hr>
   
   
<p class="code">WRITE [IMAGE] imagename
<p class="syntax">WRITE [IMAGE] imagename
   
   
  ON {seq-filename | TERMINAL | %variable}
  ON <span class="squareb">{</span>seq-filename <span class="squareb">|</span> TERMINAL <span class="squareb">|</span> %variable<span class="squareb">}</span>
</p>
</p>
<hr>
<hr>
   
   
<p class="code">WRITE IMAGE imagename ON BUFFER
<p class="syntax">WRITE IMAGE imagename ON BUFFER
   
   
   [POSITION=%pvariable | n] [MAXLEN={%lvariable | n}]
   [POSITION=%pvariable <span class="squareb">|</span> n] [MAXLEN=<span class="squareb">{</span>%lvariable <span class="squareb">|</span> n<span class="squareb">}</span>]
</p>
</p>
<hr>
<hr>
Line 1,117: Line 1,104:
<li>Literal number or string </li>
<li>Literal number or string </li>
<li>VALUE IN clause of the form:
<li>VALUE IN clause of the form:
<p class="code">VALUE <var>[</var>IN<var>]</var> label
<p class="syntax">VALUE <span class="squareb">[</span>IN<span class="squareb">]</span> label
</p>
</p>
</li>
</li>
Line 1,130: Line 1,117:
   
   
====Syntax====
====Syntax====
<p class="syntax">[NOT] <span class="term">phrase</span> [{AND | OR | NOR} [NOT] <span class="term">phrase</span>] ...
<p class="syntax">[NOT] <span class="term">phrase</span> [<span class="squareb">{</span>AND <span class="squareb">|</span> OR <span class="squareb">|</span> NOR<span class="squareb">}</span> [NOT] <span class="term">phrase</span>] ...
</p>
</p>
Where:
Where:
Line 1,136: Line 1,123:
<var class="term">phrase</var> can be constructed as follows:</p>
<var class="term">phrase</var> can be constructed as follows:</p>
<ul style="font-family: Consolas,monospace">
<ul style="font-family: Consolas,monospace">
<li>fieldname = <var>[</var>NOT<var>]</var> value
<li>fieldname = <span class="squareb">[</span>NOT<span class="squareb">]</span> value
   
   
<li>fieldname LIKE pattern
<li>fieldname LIKE pattern
   
   
<li>fieldname IS [NOT] {PRESENT | LIKE 'pattern'}
<li>fieldname IS [NOT] <span class="squareb">{</span>PRESENT <span class="squareb">|</span> LIKE 'pattern'<span class="squareb">}</span>
   
   
<li>fieldname IS [NOT] {[NUMERICALLY | ALPHABETICALLY] <br>
<li>fieldname IS [NOT] <span class="squareb">{</span>[NUMERICALLY <span class="squareb">|</span> ALPHABETICALLY] <br>
  [EQ | = | NE | ,= | GREATER THAN | GT | > <br>
  [EQ <span class="squareb">|</span> = <span class="squareb">|</span> NE <span class="squareb">|</span> ,= <span class="squareb">|</span> GREATER THAN <span class="squareb">|</span> GT <span class="squareb">|</span> > <br>
  | LESS THAN | LT < | <= | GE | >= | BEFORE | AFTER] <br>
  <span class="squareb">|</span> LESS THAN <span class="squareb">|</span> LT < <span class="squareb">|</span> <= <span class="squareb">|</span> GE <span class="squareb">|</span> >= <span class="squareb">|</span> BEFORE <span class="squareb">|</span> AFTER] <br>
  value}
  value<span class="squareb">}</span>
   
   
<li>fieldname IS [NOT] {[NUMERICALLY | ALPHABETICALLY] <br>
<li>fieldname IS [NOT] <span class="squareb">{</span>[NUMERICALLY <span class="squareb">|</span> ALPHABETICALLY] <br>
  {IN RANGE [FROM | AFTER] value1 {TO | [AND] BEFORE} <br>
  <span class="squareb">{</span>IN RANGE [FROM <span class="squareb">|</span> AFTER] value1 <span class="squareb">{</span>TO <span class="squareb">|</span> [AND] BEFORE<span class="squareb">}</span> <br>
  value2 | BETWEEN value1 AND value2}
  value2 <span class="squareb">|</span> BETWEEN value1 AND value2<span class="squareb">}</span>
   
   
<li>FILES filename
<li>FILES filename
Line 1,157: Line 1,144:
<li>LISTS$ listname
<li>LISTS$ listname
   
   
<li>LOCATION {location | =}
<li>LOCATION <span class="squareb">{</span>location <span class="squareb">|</span> =<span class="squareb">}</span>
   
   
<li>POINT$ value
<li>POINT$ value
Line 1,168: Line 1,155:
<ul>
<ul>
<li>A literal number or string</li>
<li>A literal number or string</li>
<li>VALUE {[IN] <i>label</i>} | (<i>expression</i>)</li>
<li>VALUE <span class="squareb">{</span>[IN] <i>label</i><span class="squareb">}</span> <span class="squareb">|</span> (<i>expression</i>)</li>
<li><i>%variable</i> </li>
<li><i>%variable</i> </li>
</ul>
</ul>
</ul>
</ul>
 
<p><b>Notes:</b></p>
<p><b>Notes:</b></p>
<ul>
<ul>
<li>The first character (<code>,</code>) of the inequality test in the fourth of the items in the list above is the EBCDIC "not sign", which has the hexadecimal value <code>5f</code>.
<li>The first character (<code>,</code>) of the inequality test in the fourth of the items in the list above is the EBCDIC "not sign", which has the hexadecimal value <code>5f</code>.
 
<li>For a description of the pattern in the <code>[IS] LIKE</code> and <code>IS NOT</code> clauses, see the syntax of [[Is Like pattern matching#likeSyntax|Is Like patterns]].
<li>For a description of the pattern in the <code>[IS] LIKE</code> and <code>IS NOT</code> clauses, see the syntax of [[Is Like pattern matching#likeSyntax|Is Like patterns]].
</ul>
</ul>
 
===Omitting repeated first words===
===Omitting repeated first words===
<p>
<p>
Moreover, 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:</p>
Moreover, 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:</p>
<p class="code">LIST$ A AND NOT LIST$ B
<p class="syntax">LIST$ A AND NOT LIST$ B
</p>
</p>
<p>
<p>
can be written:</p>
can be written:</p>
<p class="code">LIST$ A AND NOT B
<p class="syntax">LIST$ A AND NOT B
</p>
</p>
<p>
<p>
And:</p>
And:</p>
<p class="code">X IS 13 OR X IS LESS THAN 7
<p class="syntax">X IS 13 OR X IS LESS THAN 7
</p>
</p>
<p>
<p>
can be written:</p>
can be written:</p>
<p class="code">X IS 13 OR IS LESS THAN 7
<p class="syntax">X IS 13 OR IS LESS THAN 7
</p>
</p>
   
   
Line 1,201: Line 1,188:
<p>
<p>
Duplicated equal signs can be omitted. For example, the expression:</p>
Duplicated equal signs can be omitted. For example, the expression:</p>
<p class="code">A = 3 OR A = 5 OR A = 40
<p class="syntax">A = 3 OR A = 5 OR A = 40
</p>
</p>
<p>
<p>
is equivalent to:</p>
is equivalent to:</p>
<p class="code">A = 3 OR 5 OR 40
<p class="syntax">A = 3 OR 5 OR 40
</p>
</p>
   
   
Line 1,211: Line 1,198:
<p>
<p>
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:</p>
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:</p>
<p class="code">NOT (A = 2 OR LIST$ Y)
<p class="syntax">NOT (A = 2 OR LIST$ Y)
A = 1 AND (B = 2 OR C = 3)
A = 1 AND (B = 2 OR C = 3)
</p>
</p>
Line 1,222: Line 1,209:
   
   
=====Syntax=====
=====Syntax=====
<p class="code">POINT$ VALUE(expression)
<p class="syntax">POINT$ VALUE(expression)
</p>
</p>
Where:
Where:
Line 1,231: Line 1,218:
<p>
<p>
This example finds the first MA record on file, and then counts the number of records from this point in the file:</p>
This example finds the first MA record on file, and then counts the number of records from this point in the file:</p>
<p class="code">FD1:
<p class="syntax">FD1:
   
   
IN ICSCUST FPC STATE = MA
IN ICSCUST FPC STATE = MA
Line 1,247: Line 1,234:
   
   
=====Syntax=====
=====Syntax=====
<p class="code">SFL$ VALUE(expression)
<p class="syntax">SFL$ VALUE(expression)
</p>
</p>
<p>
<p>
or</p>
or</p>
<p class="code">SFGE$ VALUE(expression)
<p class="syntax">SFGE$ VALUE(expression)
</p>
</p>
Where:
Where:
Line 1,258: Line 1,245:
   
   
=====Example=====
=====Example=====
<p class="code">FOR %CT FROM 1 TO 10
<p class="syntax">FOR %CT FROM 1 TO 10
   IN EXPRESS STORE RECORD ($EDITN(%CT,'999'))
   IN EXPRESS STORE RECORD ($EDITN(%CT,'999'))
     ORD1 = (%REC WITH %CT)
     ORD1 = (%REC WITH %CT)
Line 1,281: Line 1,268:
   
   
=====Syntax=====
=====Syntax=====
<p class="code">fieldname EQ VALUE(expression)
<p class="syntax">fieldname EQ VALUE(expression)
</p>
</p>
Where:
Where:
Line 1,288: Line 1,275:
   
   
=====Example=====
=====Example=====
<p class="code">FD: IN FILE PEOPLE FD
<p class="syntax">FD: IN FILE PEOPLE FD
LAST EQ VALUE($READ('LAST NAME?') )
LAST EQ VALUE($READ('LAST NAME?') )
END FIND
END FIND
Line 1,300: Line 1,287:
   
   
====Syntax====
====Syntax====
<p class="code">[term] {AND | TAB | WITH]...[[term]
<p class="syntax">[term] <span class="squareb">{</span>AND <span class="squareb">|</span> TAB <span class="squareb">|</span> WITH]...[[term]
   
   
  [AND | TAB | WITH] ...] ... [...]
  [AND <span class="squareb">|</span> TAB <span class="squareb">|</span> WITH] ...] ... [...]
</p>
</p>
Where:
Where:
<p>
<p>
term can be constructed as follows:</p>
term can be constructed as follows:</p>
<p class="code">{'string' | %variable | COUNT IN label
<p class="syntax"><span class="squareb">{</span>'string' <span class="squareb">|</span> %variable <span class="squareb">|</span> COUNT IN label
   
   
  | OCCURRENCE IN label
  <span class="squareb">|</span> OCCURRENCE IN label
   
   
  | VALUE IN label | function}
  <span class="squareb">|</span> VALUE IN label <span class="squareb">|</span> function<span class="squareb">}</span>
   
   
  <var>[</var>AT <var>[</var>COLUMN<var>]</var> m<var>]</var> <var>[</var>TO <var>[</var>COLUMN<var>]</var> n<var>]</var>
  <span class="squareb">[</span>AT <span class="squareb">[</span>COLUMN<span class="squareb">]</span> m<span class="squareb">]</span> <span class="squareb">[</span>TO <span class="squareb">[</span>COLUMN<span class="squareb">]</span> n<span class="squareb">]</span>
</p>
</p>
<p>
<p>
or, if the statement is within a record loop:</p>
or, if the statement is within a record loop:</p>
<p class="code">{{EACH | n} fieldname | *RECORD | *ID}
<p class="syntax"><span class="squareb">{</span><span class="squareb">{</span>EACH <span class="squareb">|</span> n<span class="squareb">}</span> fieldname <span class="squareb">|</span> *RECORD <span class="squareb">|</span> *ID<span class="squareb">}</span>
   
   
  [AT [COLUMN] m] [TO [COLUMN] n}
  [AT [COLUMN] m] [TO [COLUMN] n<span class="squareb">}</span>
</p>
</p>
   
   
Line 1,331: Line 1,318:
<p>
<p>
In the simplified syntax for an IF statement, which is:</p>
In the simplified syntax for an IF statement, which is:</p>
<p class="code">IF condition THEN statements
<p class="syntax">IF condition THEN statements
</p>
</p>
<p>
<p>
Line 1,342: Line 1,329:
   
   
====Syntax====
====Syntax====
<p class="code">{operand |(expression)}
<p class="syntax"><span class="squareb">{</span>operand |(expression)<span class="squareb">}</span>
   
   
[operator {operand | (expression)}] ...
[operator <span class="squareb">{</span>operand <span class="squareb">|</span> (expression)<span class="squareb">}</span>] ...
</p>
</p>
Where:
Where:
<p>
<p>
operand can be constructed as follows:</p>
operand can be constructed as follows:</p>
<p class="code">[+ | - | NOT]
<p class="syntax">[+ <span class="squareb">|</span> - <span class="squareb">|</span> NOT]
   
   
  {'string' | %variable | number
  <span class="squareb">{</span>'string' <span class="squareb">|</span> %variable <span class="squareb">|</span> number
   
   
  | fieldname <var>[</var>(subscript)<var>]</var> IS <var>[</var>NOT<var>]</var> PRESENT
  <span class="squareb">|</span> fieldname <span class="squareb">[</span>(subscript)<span class="squareb">]</span> IS <span class="squareb">[</span>NOT<span class="squareb">]</span> PRESENT
   
   
  | COUNT IN label | OCCURRENCE IN label
  <span class="squareb">|</span> COUNT IN label <span class="squareb">|</span> OCCURRENCE IN label
   
   
  | VALUE IN label
  <span class="squareb">|</span> VALUE IN label
   
   
  | function}
  <span class="squareb">|</span> function<span class="squareb">}</span>
</p>
</p>
<p>
<p>
Line 1,424: Line 1,411:
====Syntax====
====Syntax====
<ul>
<ul>
<li><var>IN [PERMANENT | TEMPORARY ] GROUP groupname
<li><var>IN [PERMANENT <span class="squareb">|</span> TEMPORARY ] GROUP groupname
MEMBER [%member | [filename [AT {location | =}]]</var></li>
MEMBER [%member <span class="squareb">|</span> [filename [AT <span class="squareb">{</span>location <span class="squareb">|</span> =<span class="squareb">}</span>]]</var></li>
</li>
</li>
<li><var>IN file1 [,file2] ...</var></li>
<li><var>IN file1 [,file2] ...</var></li>
</li>
</li>
<li><var>IN {$CURFILE | $UPDATE}</var></li>
<li><var>IN <span class="squareb">{</span>$CURFILE <span class="squareb">|</span> $UPDATE<span class="squareb">}</span></var></li>
<p>
<p>
The form IN $CURFILE can be used only within a record loop.    </p>
The form IN $CURFILE can be used only within a record loop.    </p>
Line 1,536: Line 1,523:
<p>
<p>
The type specification for the DECLARE SUBROUTINE statement has one of the following formats:</p>
The type specification for the DECLARE SUBROUTINE statement has one of the following formats:</p>
<p class="syntax">{STRING [LEN <span class="term">n</span>] [DP {<span class="term">n</span> | *}] [ARRAY (*[,*[,*]]) [NO FILE SAVE]]
<p class="syntax"><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 (*[,*[,*]]) [NO FILE SAVE]]
  | FIXED [DP <span class="term">n</span>] [ARRAY (*[,*[,*]])]
  <span class="squareb">|</span> FIXED [DP <span class="term">n</span>] [ARRAY (*[,*[,*]])]
  | FLOAT}
  <span class="squareb">|</span> FLOAT<span class="squareb">}</span>
</p>
</p>
<p>
<p>
or</p>
or</p>
<p class="syntax">[LIST] [IN [FILE | [PERM | TEMP] GROUP] <span class="term">name</span>]
<p class="syntax">[LIST] [IN [FILE <span class="squareb">|</span> [PERM <span class="squareb">|</span> TEMP] GROUP] <span class="term">name</span>]
</p>
</p>
   
   
[[Category:SOUL]]
[[Category:SOUL]]

Revision as of 02:02, 5 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 {%variable | 'string'}] [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:

  • 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)
    • %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

Moreover, 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 label | function} [AT [COLUMN] m] [TO [COLUMN] n]

or, if the statement is within a record loop:

{{EACH | n} 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:

Syntax

  • 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 FILE SAVE]] | FIXED [DP n] [ARRAY (*[,*[,*]])] | FLOAT}

or

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