HP 3000 Manuals

COMMAND LANGUAGE [ EDIT/3000:Reference Manual ] MPE/iX 5.0 Documentation


EDIT/3000:Reference Manual

Appendix B  COMMAND LANGUAGE 

Table B-1 allows you to determine the precise syntax requirements of a
command, or to quickly refresh your knowledge of the command language.
The table is helpful to have, particularly during an interactive session,
as a general reference tool.  If further clarification is needed, the
page number of a complete explanation of each command is provided.

          Table B-1.  .  Command Language Reference Chart

-----------------------------------------------------------------------------------------
| Command    | Syntax          | Use          | Example      | Remarks          | Page  |
|            |                 |              |              |                  | Ref-  |
|            |                 |              |              |                  | er-   |
|            |                 |              |              |                  | ence  |
-----------------------------------------------------------------------------------------
| ADD        | ADD[Q]          | To enter     | ADD 60, HOLD | The contents of  | 3-6   |
|            | [linenumber]    | lines of     |              | the HOLD file    |       |
|            | [,HOLD[Q]       | text into    |              | are entered into |       |
|            | [,NOW] ]        | the WORK     |              | the WORK file    |       |
|            |                 | file from an |              | beginning with   |       |
|            |                 | input file   |              | the line number  |       |
|            |                 | or from the  |              | 60.              |       |
|            |                 | HOLD file.   |              |                  |       |
| BEGIN      | BEGIN[Q]        | Used as the  | WHILE        | This is a        | 4-7   |
|            |                 | first        | FINDQ"this"  | blocked set of   |       |
|            |                 | expression   | (+3) BEGINQ  | commands within  |       |
|            |                 | in a         | FINDQ        | a BEGIN-END      |       |
|            |                 | matching     | "program"    | pair.            |       |
|            |                 | BEGIN-END    | /*(+20)      |                  |       |
|            |                 | pair.        | LIST* END    |                  |       |
| CHANGE     |                 | To replace   | CHANGE       | All occurrences  | 3-10  |
|            | CHANGE[Q]       | old text     | "RECORD" TO  | of RECORD in     |       |
|            | {oldstring}     | with new     | "LINE" IN    | lines 40 through |       |
|            | {startcolumn}   | text.        | 40/70        | 70 will be       |       |
|            | [/startcolumn]  |              |              | changed to LINE. |       |
|            | TO newstring    |              |              |                  |       |
|            | [IN rangelist]  |              |              |                  |       |
| COPY       | COPY[Q]range TO | To copy text | COPY 2/2.15  | Lines 2 through  | 3-14  |
|            | linenumber [BY  | from one     | to 8.01 BY   | 2.15 will be     |       |
|            | increment]      | location     | .01          | copied to begin  |       |
|            |                 | into another |              | at line 8.01     |       |
|            |                 | in the WORK  |              | with lines       |       |
|            |                 | file.        |              | numbered in      |       |
|            |                 |              |              | increments of    |       |
|            |                 |              |              | .01              |       |
| DELETE     | DELETE[Q]       | To delete    | DELETE       | Lines 50 through | 3-17  |
|            | [rangelist]     | characters   | 50/75,       | 75 and           |       |
|            |                 | and lines    | 150(3)/      | characters in    |       |
|            |                 | from the     | 155(7)       | the range        |       |
|            |                 | WORK file.   |              | beginning with   |       |
|            |                 |              |              | the third column |       |
|            |                 |              |              | in line 150      |       |
|            |                 |              |              | through the      |       |
|            |                 |              |              | seventh column   |       |
|            |                 |              |              | in line 155 will |       |
|            |                 |              |              | be deleted.      |       |
| END        | END             | To terminate | END          | Control is       | 3-20  |
|            |                 | execution of |              | returned to      |       |
|            |                 | EDIT/3000    |              | MPE/3000.        |       |
|            |                 | or, when     |              |                  |       |
|            |                 | used with a  |              |                  |       |
|            |                 | matching     |              |                  |       |
|            |                 | BEGIN        |              |                  |       |
|            |                 | command, to  |              |                  |       |
|            |                 | terminate an |              |                  |       |
|            |                 | iterative    |              |                  |       |
|            |                 | operation.   |              |                  |       |
| FIND       |                 | To locate a  | FIND         | The pointer will | 3-21  |
|            | FIND[Q][*]      | point in the | "PROGRAM"    | move to the next |       |
|            | [range]         | WORK file.   |              | occurrence of    |       |
|            |                 |              |              | the string       |       |
|            |                 |              |              | PROGRAM.         |       |

| GATHER     | GATHER[Q] range | To move      | GATHER 50/55 | Lines 50 through | 3-23  |
|            | TO linenumber   | portions of  | TO 5.1 by .1 | 55 will be moved |       |
|            | [BY increment]  | text from    |              | to begin at line |       |
|            |                 | one location |              | 5.1 and will be  |       |
|            |                 | to another   |              | renumbered in    |       |
|            |                 | in the WORK  |              | increments of    |       |
|            |                 | file and     |              | .1.              |       |
|            |                 | renumber the |              |                  |       |
|            |                 | lines.       |              |                  |       |
| HOLD       | HOLD[Q] [range] | To copy text | HOLD         | Lines 100        | 3-27  |
|            | [,APPEND]       | from the     | 100/150,     | through 150 are  |       |
|            |                 | WORK file    | APPEND       | copied into the  |       |
|            |                 | into the     |              | HOLD file and    |       |
|            |                 | HOLD file.   |              | are appended to  |       |
|            |                 |              |              | the text that    |       |
|            |                 |              |              | already exists   |       |
|            |                 |              |              | in the HOLD      |       |
|            |                 |              |              | file.            |       |
| INSERT     | INSERT[Q]       | To insert    | INSERT 25    | Line 25 is       | 3-29  |
|            | position [BY    | text into    | (4)          | printed with the |       |
|            | increment]      | the WORK     |              | pointer          |       |
|            | [,HOLD[Q]       | file from an |              | indicated        |       |
|            | [,NOW] ]        | input file   |              | directly under   |       |
|            |                 | or the HOLD  |              | column 4.  Any   |       |
|            |                 | file.        |              | text may then be |       |
|            |                 |              |              | typed in, The    |       |
|            |                 |              |              | remainder of     |       |
|            |                 |              |              | line 25 is saved |       |
|            |                 |              |              | and printed      |       |
|            |                 |              |              | following the    |       |
|            |                 |              |              | insertion.       |       |
| JOIN       | JOIN[Q] file    | To add all   | JOIN EDIT02  | The text in      | 3-35  |
|            | name            | or part of a | TO 1000 BY   | EDIT02 is added  |       |
|            |                 | JOIN file to | .1           | to the WORK file |       |
|            | [ (linenumber   | the WORK     |              | beginning at     |       |
|            | [/linenumber] ) | file.        |              | line 1000.       |       |
|            | (#recnum/       |              |              | Lines are        |       |
|            | #recnum) ]      |              |              | numbered in      |       |
|            | [TO linenumber] |              |              | increments of    |       |
|            | [BY increment]  |              |              | .1.              |       |
-----------------------------------------------------------------------------------------

          Command Language Reference Chart (Continued)

-----------------------------------------------------------------------------------------
| Command    | Syntax          | Use          | Example      | Remarks          | Page  |
|            |                 |              |              |                  | Ref-  |
|            |                 |              |              |                  | er-   |
|            |                 |              |              |                  | ence  |
-----------------------------------------------------------------------------------------
| KEEP       |                 | To save all  | KEEP EDIT02  | The contents of  | 3-39  |
|            | KEEP [ [Q]      | or part of   |              | the WORK file    |       |
|            | filename]       | the WORK     |              | are saved in     |       |
|            | [(range) ]      | file in a    |              | EDIT02, a user   |       |
|            | [,UNNUMBERED]   | user file.   |              | file, and the    |       |
|            |                 |              |              | line numbers are |       |
|            |                 |              |              | stored in ASCII  |       |
|            |                 |              |              | format at the    |       |
|            |                 |              |              | front or rear of |       |
|            |                 |              |              | each line.       |       |

| LIST       | LIST[Q] [range] | To print out | LIST ALL     | The contents of  | 3-47  |
|            | [,UNN[UMBERED]] | any portion  | UNNUMBERED,  | the WORK file    |       |
|            | [,OFFLINE]      | or all of    | OFFLINE      | are printed on   |       |
|            | [,TRANSLATE]    | the WORK     |              | the file printer |       |
|            | [,NOTEXT]       | file.        |              | or at the device |       |
|            |                 |              |              | specified in the |       |
|            |                 |              |              | system log-on    |       |
|            |                 |              |              | command.  Line   |       |
|            |                 |              |              | numbers are not  |       |
|            |                 |              |              | printed.         |       |
| MODIFY     | MODIFY[Q] range | To modify    | MODIFY       | Lines 50 through | 3-51  |
|            | list            | text in the  | 50/100       | 100 are printed  |       |
|            |                 | WORK file    |              | line by line to  |       |
|            |                 | using three  |              | allow a          |       |
|            |                 | operations:  |              | modification     |       |
|            |                 | delete       |              | templet to be    |       |
|            |                 | (D),insert   |              | entered for each |       |
|            |                 | (1), and     |              | line in the      |       |
|            |                 | replace (R). |              | range.           |       |
| NOT        | NOT             | Causes       | WHILE        | Occurrences of   | 4-12  |
|            |                 | setting of   | FINDQ,"this" | "this" that are  |       |
|            |                 | FLAG to be   | (+3) BEGINQ  | not followed by  |       |
|            |                 | reversed     | NOT FINDQ    | "program" are    |       |
|            |                 | after the    | s"program"   | listed.          |       |
|            |                 | next         | *(+20) LIST* |                  |       |
|            |                 | following    | END          |                  |       |
|            |                 | express-sion |              |                  |       |
|            |                 | is           |              |                  |       |
|            |                 | interpreted. |              |                  |       |
| OR         | OR              | Resets FLAG  | BEGINQ       | If "this" is     | 4-16  |
|            |                 | to true if   | FINDQ"this"  | found within 40  |       |
|            |                 | it is false, | /* (+40) OR  | nonblank         |       |
|            |                 | or skips OR  | FINDQ        | characters of    |       |
|            |                 | command and  | "program"    | the pointer, the |       |
|            |                 | command      | /*(+20) END  | second FIND      |       |
|            |                 | following if |              | command is       |       |
|            |                 | FLAG is      |              | skipped over.    |       |
|            |                 | true.        |              | If "this" is not |       |
|            |                 |              |              | found, the FLAG  |       |
|            |                 |              |              | is set to true,  |       |
|            |                 |              |              | and the second   |       |
|            |                 |              |              | FIND is          |       |
|            |                 |              |              | executed.        |       |
| PROCEDURE  | PROCEDURE       | Calls        | PROCEDURE    | Logical          | 4-24  |
|            |                 | logical      | CARDTEST, G, | procedure CAR    |       |
|            | [pname,[G]      | procedure    | 100/300      | DTEST is called  |       |
|            | [P]             | stored in a  |              | from the group   |       |
|            | [S]             | library      |              | library.         |       |
|            | [range list]    | outside the  |              | Records 100      |       |
|            |                 | subsystem.   |              | through 300 of   |       |
|            |                 |              |              | the WORK file    |       |
|            |                 |              |              | are affected by  |       |
|            |                 |              |              | the procedure.   |       |
| Q          | Qcharacter      | To print a   | Q "HELLO.    | When this        | 3-54  |
|            | string          | message at   | PLEASE ENTER | command is       |       |
|            |                 | the          | YOUR         | executed, the    |       |
|            |                 | terminal.    | IDENTITY     | delimited        |       |
|            |                 |              | CODE."       | message will be  |       |
|            |                 |              |              | printed at the   |       |
|            |                 |              |              | terminal.        |       |

| REPLACE    | REPLACE[Q]      | To replace   | REPLACE      | Each line in the | 3-55  |
|            | rangelist       | lines in the | 10/20        | range from 10    |       |
|            | [,HOLD[Q]       | WORK file.   |              | through 20 is    |       |
|            | [,NOW] ]        |              |              | listed followed  |       |
|            |                 |              |              | by the line      |       |
|            |                 |              |              | number to allow  |       |
|            |                 |              |              | you to enter a   |       |
|            |                 |              |              | text replacment  |       |
-----------------------------------------------------------------------------------------

          Command Language Reference Chart (Continued)

-----------------------------------------------------------------------------------------
| Command    | Syntax          | Use          | Example      | Remarks          | Page  |
|            |                 |              |              |                  | Ref-  |
|            |                 |              |              |                  | er-   |
|            |                 |              |              |                  | ence  |
-----------------------------------------------------------------------------------------
| SET        | SET[FROM=       | To alter     | SET FROM=100 | Lines in the     | 3-59  |
|            | linenumber]     | options that | DELTA= 10,   | WORK file will   |       |
|            | [,DELTA=        | are normally | QUIET,SHORT  | begin with line  |       |
|            | increment]      | set by the   |              | number 100 and   |       |
|            | [,LEFT=colnum]  | subsystem    |              | will be numbered |       |
|            | [,RIGHT=colnum] | and that     |              | in incre ments   |       |
|            | [,LENGTH=       | govern       |              | of 10.  The      |       |
|            | colnum]         | editing      |              | position of the  |       |
|            |                 | operations.  |              | pointer will not |       |
|            | [,{QUIET}       |              |              | be displayed     |       |
|            | {DISPLAY} ]     |              |              | each time a      |       |
|            | [,{SHORT}       |              |              | location in the  |       |
|            | {LONG} ]        |              |              | WORK file is     |       |
|            | [,{BATCH}       |              |              | found, and       |       |
|            | {POLL} ]        |              |              | commands that    |       |
|            |                 |              |              | take "Q" operate |       |
|            | [,DEPTH=limit]  |              |              | as if Q had been |       |
|            | [,TIME=limit]   |              |              | specified.       |       |
|            | [,SIZE=limit]   |              |              | Commands can be  |       |
|            |                 |              |              | entered using    |       |
|            | [ {FRONT}       |              |              | only their       |       |
|            | {,REAR} ]       |              |              | initial          |       |
|            | [ {FIXED}       |              |              | character.       |       |
|            | {,VARIABLE} ]   |              |              | Otherwise, the   |       |
|            |                 |              |              | first and last   |       |
|            | [,FORMAT={      |              |              | column position  |       |
|            | COBOL}          |              |              | read in a line   |       |
|            | {DEFAULT} ]     |              |              | of the WORK file |       |
|            |                 |              |              | will be 1 T and  |       |
|            | [,{TABS[=       |              |              | 72,              |       |
|            | (colnum         |              |              | respectively.    |       |
|            | [,colnum]...)]  |              |              |                  |       |
|            | NOTABS} ]       |              |              |                  |       |
|            |                 |              |              |                  |       |
|            | [,TABCHAR       |              |              |                  |       |
|            | [=string] ]     |              |              |                  |       |
| TEXT       | TEXT [filename] | To copy      | TEXT EDIT02  | Contents of      | 3-67  |
|            |                 | contents of  |              | EDIT02 arecopied |       |
|            |                 | a user file  |              | into the WORK    |       |
|            | [ {linenumber   | into the     |              | file and num-    |       |
|            | linenumber)     | WORK file to |              | bered using the  |       |
|            | (#recnum/       | be edited.   |              | line numbers     |       |
|            | #recnum) } ]    |              |              | stored in the    |       |
|            | [,UNNUMBERED]   |              |              | front or rear    |       |
|            |                 |              |              | bytes of each    |       |
|            |                 |              |              | line.            |       |

| USE        | USE[filename]   | To instruct  | USE EDFIL    | EDIT/3000 will   | 3-75  |
|            |                 | EDIT/ 3000   |              | go to the        |       |
|            |                 | to read      |              | beginning of     |       |
|            |                 | commands     |              | EDFIL and        |       |
|            |                 | from a user  |              | execute commands |       |
|            |                 | file but to  |              | from that file   |       |
|            |                 | send         |              | until it finds   |       |
|            |                 | messages to  |              | end-of-file      |       |
|            |                 | and,         |              | mark.            |       |
|            |                 | normally, to |              |                  |       |
|            |                 | expect text  |              |                  |       |
|            |                 | from the     |              |                  |       |
|            |                 | terminal.    |              |                  |       |
| VERIFY     |                 | To obtain a  | VERIFY       | The values set   | 3-79  |
|            | VERIFY[{ALL }   | reminder of  | DELTA, FROM  | up for DELTA and |       |
|            | {option list }] | the values   |              | FROM when        |       |
|            |                 | of options   |              | EDIT/3000 was    |       |
|            |                 | declared in  |              | initialized are  |       |
|            |                 | the SET      |              | listed.          |       |
|            |                 | command.     |              |                  |       |
| WHILE      | WHILE[FLAG)     | Causes       | WHILE FIND   | Each occurrence  | 4-2   |
|            |                 | EDIT/3000 to | "this" LIST* | of "this"        |       |
|            |                 | iterate the  |              | following the    |       |
|            |                 | next two     |              | pointer is found |       |
|            |                 | edit         |              | and listed until |       |
|            |                 | expressions  |              | the end of the   |       |
|            |                 | (or one, if  |              | WORK file is     |       |
|            |                 | FLAG is      |              | found before     |       |
|            |                 | declared)    |              | another "this"   |       |
|            |                 | until the    |              | is found, The    |       |
|            |                 | first one    |              | FLAG is then set |       |
|            |                 | fails.       |              | to false.        |       |
| XPLAIN     |                 | To obtain an | XPLAIN A,S   | Explanations of  | 3-81  |
|            | XPLAIN[{com,    | explanation  |              | the ADD and SET  |       |
|            | name list}      | of the       |              | commands will be |       |
|            | {ALL} ]         | commands.    |              | printed at the   |       |
|            | [,OFFLINE]      |              |              | terminal.        |       |
| YES        | YES             | Sets the     |              |                  | 4-20  |
|            |                 | FLAG to true |              |                  |       |
| Z::=       | Z::=object      | To assign    | Z::= "DOUBLE | The string       | 3-83  |
|            | record          | the value of | PRECISION"   | "DOUBLE          |       |
|            |                 | the          |              | PRECISION" will  |       |
|            |                 | character    |              | be substituted   |       |
|            |                 | string Z::=. |              | for Z::=         |       |
|            |                 |              |              | whenever Z::     |       |
|            |                 |              |              | occurs in a      |       |
|            |                 |              |              | command outside  |       |
|            |                 |              |              | of a string.     |       |
| :          | :MPE command    | To enter     | :PURGE AFILE | The MPE PURGE    | 3-86  |
|            |                 | system       |              |                  |       |
|            |                 | commands     |              |                  |       |
|            |                 | from within  |              |                  |       |
|            |                 | EDIT/3000    |              |                  |       |
-----------------------------------------------------------------------------------------


MPE/iX 5.0 Documentation