HP 3000 MPE/iX Computer Systems EDIT/3000 Reference Manual ABCDE HP Part No. 03000-90012 Printed in U.S.A.
The information contained in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability or tness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for direct, indirect, special, incidental or consequential damages in connection with the furnishing or use of this material.
PREFACE This publication is the reference manual for EDIT/3000, a subsystem of the Multiprogramming Executive III operating system (MPE) used to create and manipulate ASCII les. The content of this publication is: Section I introduces EDIT/3000. Discusses the concepts of editing les and explains the basic structure of EDIT/3000. A summary of all EDIT/3000 commands is included. Section II explains how to operate EDIT/3000.
Contents 1. INTRODUCING EDIT/3000 1-1. WHAT IS EDIT/3000? . . . . 1-2. EDIT/3000 FEATURES . . . . 1-3. EDIT/3000 EDITING MODES . 1-4. EDIT/3000 FILE DEFINITIONS 1-5. INPUT FILE . . . . . . . . 1-6. OUTPUT FILE . . . . . . . 1-7. WORK FILE . . . . . . . . 1-8. TEXT FILE . . . . . . . . . 1-9. JOIN FILE . . . . . . . . . 1-10. HOLD FILE . . . . . . . . 1-11. USE FILE . . . . . . . . . 1-12. EDIT/3000 COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
JOIN . . KEEP . . LIST . . MODIFY Q . . . . REPLACE SET . . . TEXT . . USE . . . VERIFY . XPLAIN . Z::= . . . : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Figures 2-1. 2-2. 2-3. 2-4. 2-5. 2-6. Running EDIT/3000 in an Interactive Session . . . . Running EDIT/3000 in Batch Mode . . . . . . . . . Using the BREAK Key . . . . . . . . . . . . . . Using CONTROL Y . . . . . . . . . . . . . . . . Using ; and & When Entering EDIT/3000 Commands. Using the BASICENTRY entry point to EDIT/3000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 2-9 2-11 2-12 2-13 2-14 . . . . . . . . . . . . . .
1 INTRODUCING EDIT/3000 1-1. WHAT IS EDIT/3000? EDIT/3000 is a subsystem of the HP 3000 Multiprogramming Executive operating system (MPE) that is used to create and manipulate ASCII les. Characters, strings of characters, or entire lines of characters can be inserted, deleted, replaced, modi ed, searched for, and otherwise manipulated, by using EDIT/3000 commands .
1-3. EDIT/3000 EDITING MODES EDIT/3000 can be run in either of two modes: Interactive session. In an interactive session, commands and text records normally are entered through an interactive terminal. Messages and other output (such as prompt characters) from EDIT/3000 are listed on the terminal. Batch mode. In batch mode, commands and text records are supplied through a batch input medium such as punched cards or magnetic tape.
2. If the TEXT le is on punched cards, magnetic tape, or any device other than disc, such that the size is not known to the system, or if the text is to be entered from the standard INPUT le, EDIT/3000 accepts approximately 1,767 lines of text (unless the SET SIZE command is used to specify a di erent size). Note that only one quarter (4 extents) of the WORK le's disc space is initially allocated. The MPE File System searches for and allocates more extents as needed. 1-8.
1-11. USE FILE The USE le is an external user le containing EDIT/3000 commands (and, optionally, text records) which is called with a USE command (see Section III). When a USE command is entered, EDIT/3000 reads all commands from the USE le. Any messages from EDIT/3000 are sent to the OUTPUT le, as are requests for text records. Text records then are entered through the INPUT le. (It also is possible, however, to specify that all information, including text records, will be found in the USE le.
Table 1-1. EDIT/3000 Commands (continued) COMMAND NAME PURPOSE PAGE NO. HOLD 3-27 Copies part or all of the WORK le into the HOLD le for subsequent re-copying into one or more locations of the WORK le. INSERT Inserts text into the WORK le from the INPUT le or from the HOLD le at a speci c position. 3-29 JOIN Copies all or part of the JOIN le to the WORK le. 3-35 KEEP Saves all or part of the WORK le into an MPE/3000 le.
2 OPERATING EDIT/3000 EDIT/3000 can be run during either a batch job or an interactive session. Initiation of batch jobs and interactive sessions is covered in this section to the extent necessary for you to operate EDIT/3000; however, more extensive descriptions of these procedures can be found in the MPE Commands Reference Manual . In addition to information regarding the initiation of jobs and sessions and the operation of EDIT/3000, MPE and EDIT/3000 special controls are described.
Note Throughout this manual, optional parameters are shown enclosed in brackets [ ]. Required parameters are shown enclosed in braces f g. where sessionname is an arbitrary name used in conjunction with username parameters to form a session identity. The para- meter contains from 1 to 8 alphanumeric characters, beginning with a letter. Default: no session name is assigned. username is the user's name, established by the Account Manager, which allows you to log on under this account.
11 = HP 264OA/B, HP 2641A, HP 2644A or HP 2645A Interactive Display Terminal (block mode without program control) (10-240 cps). 12 = HP 2645K Katakana/Roman Data Terminal. 13 = Message switching network or other computer. 14 = Multipoint Terminal. 15 = HP 2635A Printing Terminal. 8-bit protocol (for second character set). 16 = HP 2635A Printing Terminal. 7-bit protocol (standard character set).
2-2. TERMINATING AN INTERACTIVE SESSION To terminate an interactive session, use the MPE/3000 :BYE command. Following this, MPE/3000 outputs the number of seconds of central processor unit (CPU) time used, the number of minutes connected, and the date and time. For example, :BYE CPU=4. CONNECT=1. TUE, JUN 3, 1980, 1:50 PM (Displayed on the terminal by MPE/3000) 2-3. INITIATING A BATCH JOB The MPE/3000 :JOB command is used to initiate a batch job.
8 username > > > > userpass > > < 9 > > > > > > = acctname Are the same as described for the :HELLO command. See paragraph acctpass > > > > > > > > > groupname > > > ; : grouppass 2-1. cpusecs BS,CS,DS,ES inputpriority HIPRI RESTART device Note is the maximum CPU time allowed a job, in seconds; it must be a value from 1 to 32767. When this limit is reached, the job is aborted. To specify no limit, enter a question mark (?) or omit this limit. Default: no limit. is the execution priority class.
is the number of copies of a job listing to be produced. This parameter applies only when listing is directed to a spooled device, and is ignored in other cases. It must be a value from 1 to 255. Default: 1. numcopies For a more detailed description of the :JOB command, see the MPE Commands Reference Manual . An example of the :JOB command, using only the (required) parameters username.acctname is as follows: :JOB JOE.
2-5. RUNNING EDIT/3000 IN AN INTERACTIVE SESSION To run EDIT/3000 in an interactive session, initiate the session with the MPE :HELLO command, then use the MPE :EDITOR command as shown in the following example. :HELLO MANAGER.SCR HP3000 / MPE III B.01.02. TUE, JUN 3, 1980, 1:49 PM :EDITOR HP32201A.7.08 EDIT/3000 TUE, JUN 3, 1980, 11:28 AM (C) HEWLETT-PACKARD CO. 1980 /ADD 1 THIS IS THE FIRST LINE OF THE WORK FILE 2 (A NEW FILE IN THIS EXAMPLE) 3 / / ...
2-6. RUNNING EDIT/3000 IN BATCH MODE In batch mode, MPE/3000 and EDIT/3000 commands (and text if desired) are included with the :JOB command. Unlike sessions, jobs require that the colon prompt character be included with MPE/3000 commands. EDIT/3000 commands in batch mode, however, need not be preceded with the EDIT/3000 prompt character (/) .
:JOB JOE.VOLLMER,PUB PRIORITY = DS; INPRI = 8; TIME = UNLIMITED SECONDS JOB NUMBER = #J2 TUE, JUN 3, 1980, 1:53 PM HP3000 / MPE III 8.0l.DC :EDITOR HP32201A.4.02 EDIT/3000 WED, JUL 30, 1975, 8:39 AM /ADD 1 THIS IS THE FIRST LINE OF THE WORK FILE 2 (THE DATA WAS ENTERED FROM CARDS) /LIST ALL 1 2 /END THIS IS THE FIRST LINE OF THE WORK FILE (THE DATA WAS ENTERED FROM CARDS) END OF SUBSYSTEM :EOJ CPU SEC. = 4. ELAPSED MIN. = 1. TUE, JUN 3, 1980, 1:53 PM Figure 2-2.
2-7. MPE/3000 and EDIT/3000 SPECIAL CONTROLS In an interactive session, the following MPE/3000 special controls allow you to correct typing errors, temporarily suspend EDIT/3000 operation, and type continuation lines. CONTROL X To delete a line that you have typed in from the terminal (and before you press the RETURN key), type CONTROL X or the equivalent (press and hold CONTROL or its equivalent and press X). MPE/3000 prints !!! and returns the carriage or cursor. Now you can type the corrected line.
:EDITOR HP32201A.7.08 EDIT/3000 TUE, JUN 3, 1980, 11:28 AM (C) HEWLETT-PACKARD CO.
:EDITOR HP32201A.7.08 EDIT/3000 TUE, JUN 3, 1980, 11:28 AM (C) HEWLETT-PACKARD CO. 1980 /ADD 1 ABCDE 2 FGHIJ v----------------CONTROL Y entered here 3 ... / END IF IT IS OK TO CLEAR RESPOND "YES" CLEAR? YES END OF SUBSYSTEM Figure 2-4.
2-8. ENTERING EDIT/3000 COMMANDS \;" To use more than one command in an EDIT/3000 command record, follow each command (except the last one) with a semicolon, as follows: ADD;LIST ALL;END EDIT/3000 will execute the commands in the order in which they are given. \&" To continue a command or text entry from one record to the following record, use an ampersand (&) as the last character in the record to be continued. Examples are shown in gure 2-5.
2-9. EDIT/3000 SPECIAL ENTRY POINT An entry point to EDIT/3000 is available that will automatically text in a le before the rst prompt (/) is displayed and will keep the le when EXIT is typed. (See Section III for a description of the TEXT and KEEP commands.) In order to specify the le desired, rst enter the MPE :FILE command in the form :FILE EDTTEXT= lename . Next run EDIT/3000 by using the MPE :RUN command, with BASICENTRY speci ed for the entrypoint parameter.
3 EDIT/3000 COMMANDS EDIT/3000 is controlled by commands which specify the type of operation performed, such as adding text (ADD command), or listing the contents of the WORK le (LIST command). In batch mode, commands are entered as records following the MPE/3000 :EDITOR command; in interactive session, EDIT/3000 displays a prompt character (/) after it begins execution and the commands are entered from the terminal. 3-1.
3-4. LINE A line refers to a record in the WORK le. Each line has a unique number that indicates its position. A line number is of the form nnnnn.nnn. For example, 10000.001. 3-5. COLUMN Each line of the WORK le has a prede ned number of columns as de ned either by the SET LENGTH command or by the EDIT/3000 subsystem default of 72 characters per line. If text is entered beyond the right margin (default : column 72), a warning message is displayed.
3-7. COMMAND DESCRIPTIONS To help clarify the command descriptions presented in this manual, the following rules are observed: Optional command spelling and parameters in the form shown for a command are denoted by being enclosed in brackets [ ]. Required parameters for a command are shown enclosed in braces f g. If two or more parameters are enclosed within the same set of braces, as, for example, oldstring CHANGE colnum then one (and only one) of the parameters must be speci ed.
increment integer limit linenumber newstring oldstring position the value by which line numbers are incremented. The value is from .001 through 99999.999 when SET FORMAT = DEFAULT or from .001 through 999.999 when SET FORMAT = COBOL. How- ever, the line 99999.999 cannot contain any text when FORMAT = DEFAULT is in e ect and the line 999.999 cannot contain text if FORMAT = COBOL. an integer in the range from 1 through 99999 when SET FORMAT = DEFAULT or from 1 through 999 when SET FORMAT = COBOL.
*(LAST) LAST(LAST -5) \AND" (2) range rangelist recnum startcolumn startline the last non-blank character in the current line. the fth to last non-blank character in the last line. column number 2 of the next line that contains the string \AND." range may reference: 1) a single position in a record, 2) a continuous string of positions, 3) a single record (line), 4) a continuous string of records, 5) a character, or 6) a string of characters. For example, 36(10) a range of column 10 in line 36 only.
stopcolumn stopline string the ending column number of a portion of a record. This may be any number as described above for start column. the last line of a group of lines. a group of characters written exactly as it appears or is to appear. A string must be delimited by (enclosed in) any special (non-alphanumeric) characters except: apostrophes, commas, semicolons, periods, parentheses, asterisks, slashes.
ADD ADD 3-8. ADD COMMAND 3-9. Purpose. The ADD command is used to enter text into the WORK le from an INPUT le or from the HOLD le. 3-10. Form. The form of the ADD command is A[DD][Q] [linenumber] [,HOLD[Q] [,NOW] ] 3-11. Description. The ADD command can add text to the WORK le from an input le or from the HOLD le. The command adds text between existing lines of text in the WORK le by declaring a speci c linenumber in the ADD command, or to the end of the WORK le if linenumber is absent.
ADD number (position) in parentheses. Thus, the pointer is at the rst character of the last line entered. Note that the line number is not considered to be part of the record. Note also that when another ADD command is entered, the pointer will be incremented so that text will be added beginning with the next line (line 5 in this example). /ADD 1 2 3 4 5 ... /FIND* 4 1-1.
ADD The ADD, HOLD command adds text to the WORK le from an input le, then, after input from this le is terminated with // or CONTROL Y, the command adds text from the HOLD le. In the following example, lines 9 and 10 are added from the terminal, input is terminated with //, and lines 11 and 12 are added from the HOLD le. (The HOLD le had been created previously with the HOLD command, described in paragraph 3-44.) The pointer is located at position 1 of the last line entered from the HOLD le.
ADD When the ADD linenumber ,HOLD,NOW variation of the ADD command is used, the HOLD le contents are added to the WORK le beginning at the line number speci ed by the linenumber parameter. In the following example, four lines of text are added to the WORK le starting at line 12 (the lines are inserted between lines 12 and 13 of the WORK le). A listing of the complete WORK le shows the result of the various ADD commands. /ADD 12.1,HOLD,NOW 12.1 1-2. EDIT/3000 FEATURES 12.
CHANGE CHANGE 3-14. CHANGE COMMAND 3-15. Purpose. The CHANGE command is used to alter speci c portions of the WORK le contents. 3-16. Form. The form of the CHANGE command is 2 C HANGE 32 Q 3 oldstring 2 3 startcolumn /stopcolumn TO , 8 newstring 9 IN 2 , rangelist 3 For example, CHANGEQ "SPL/3000" TO "FORTRAN/3000" IN 1/10 ^ ^ ^ | | | oldstring newstring rangelist The example will change all occurrences of SPL/3000 to FORTRAN/3000 in lines 1 through 10.
CHANGE 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM / FIND FIRST;CHANGE "EDIT/3000" TO "EDITOR/3000;LIST FIRST 1 1-2. WHAT IS EDIT/3000? ^(1 ) *21*STRING NOT FOUND BEFORE LIMIT 1 1-2. WHAT IS EDIT/3000? The rangelist parameter can be omitted, however, if the FIND string command is used rst, where string is the string to be changed. See below. /FINDQ FIRST;FIND "EDIT/3000";CHANGE "EDIT/3000" TO "EDITOR/3000" 1 1-2. WHAT IS EDIT/3000? (15 )^ 1 1-2.
CHANGE The pointer is located one position beyond the last character of newstring at the conclusion of the CHANGE command. /LIST ALL 1 THE FOLLOWING LINES WILL BE EDITED 2 USING THE CHANGE COMMAND. 3 4 IT HAS BEEN SAID THAT THE ID MAY 5 BE IDENTIFIED AS PART OF THE PSYCHE. /CHANGE "ID" TO "EGO" 4/5 4 IT HAS BEEN SAEGO THAT THE EGO MAY 5 BE EGOENTIFIED AS PART OF THE PSYCHE. /FIND* 5 BE EGOENTIFIED AS PART OF THE PSYCHE.
CHANGE If the CHANGE startcolumn /stopcolumn TO newstring form of the CHANGE command is used and newstring contains a di erent number of characters than that speci ed in startcolumn /stopcolumn , EDIT/3000 will contract or extend the line to accommodate the characters speci ed in newstring . See below.
COPY COPY 3-19a. COPY COMMAND 3-19b. Purpose. The COPY command copies text from one location into another in the WORK le. 3-19c. Form. The form of the COPY command is 2 CO PY 32 3 Q range TO , 8 linenumber 9 BY increment , 3-19d. Description. The COPY command copies the lines speci ed by range to the linenumber indicated. The new line numbers are incremented by the value speci ed in the command. If increment is not included, it defaults to the SET DELTA = increment in e ect.
COPY 3-19f. Examples. Several variations of the COPY command are shown in the following examples. The location of the pointer is illustrated at the conclusion of each COPY command. COPY ALL TO linenumber BY increment The following example uses the command COPY ALL TO 2.1 BY .01 to copy all lines to 2.1, 2.11, 2.12, 2.13, 2.14, 2.15, and 2.16. The pointer is located at the rst position of the last line copied (2.16). /L ALL 1 2 3 4 5 6 7 /COPY ALL 1 2 3 4 5 6 7 /FIND* 2.16 /L ALL 1 2 2.1 2.11 2.12 2.13 2.
COPY / 2.1 2.11 2.12 2.13 2.14 2.15 2.16 3 4 5 6 6.01 6.02 6.03 6.04 6.05 7 1/2. WHAT IS EDIT/3000? EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM (MPE/3000) THAT IS USED TO CREATE AND MANIPULATE ASCII FILES. EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM (MPE/3000) THAT IS USED TO CREATE AND MANIPULATE ASCII FILES. 1/2.
DELETE 3-20. DELETE COMMAND 3-21. Purpose. The DELETE command is used to delete lines and/or character strings from the WORK le. 3-22. Form. The form of the DELETE command is D[ELETE][Q] [rangelist] For example, DELETEQ 1/10 3-23. Description. The DELETE command will delete complete lines, speci c character strings from a line, or the entire contents of the WORK le. If no rangelist is speci ed, EDIT/3000 deletes the line in which the pointer is located.
DELETE DELETE 3-25. Examples. Several variations of the DELETE command are shown in the following examples. The location of the pointer is illustrated at the conclusion of each DELETE command. DELETE startline /stopline The rst example speci es a startline/stopline pair of 8/10 in rangelist and lines 8 through 10 are deleted. /LIST ALL 1 1-2.
DELETE DELETE startline ,stopline The startline,stopline form of the rangelist , as in the following example, causes only the two lines named in rangelist to be deleted. (Note that more than two lines, separated by commas, could be speci ed, in which case those lines named would be deleted.) /DELETE 3,6 3 6 /FIND* 7 EDIT/3000 IS A SUPSYSTEM OF THE HP 3000 MANIPULATE ASCII FILES.
DELETE 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES. 7 8 CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE 9 LINES OF CHARACTERS CAN BE INSERTED, DELETED, 10 REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE 11 MANIPULATED BY USING EDIT/3000 COMMANDS.
END 3-26. END COMMAND 3-27. Purpose. The END command is used to terminate EDIT/3000 operation, thus returning control to MPE/3000, or to end BEGIN/END pairs. (See Section IV for a discussion of the END command used in a BEGIN/END pair.) 3-28. Form. The form of the END command is E[ND] 3-29. Description. The END command terminates EDIT/3000 operation and returns control to MPE/3000.
END 3-31. Example. The following examples show the use of the END command. /END IF IT IS TO CLEAR RESPOND "YES" CLEAR? YES END OF SUBSYSTEM : If SHORT=TRUE, then the full string, IF IT IS OK TO CLEAR RESPOND \YES," is not displayed. /SET SHORT;END CLEAR? YES END OF SYBSYSTEM : 3-32. FIND COMMAND 3-33. Purpose. The FIND command is used to locate a speci c position in the WORK le. 3-34. Form. The form of the FIND command is 2 F IND 32 Q 3 * range 3-35. Description.
END 3-36. Limitations. If a SET command (see paragraph 3-92) has been used to set left and right margins in the WORK le, then a search for a string will only operate within these margins. For example, if the margins are set with the command SET LEFT = 50, RIGHT = 72, a FIND command will only locate a string that occurs totally within columns 50 through 72.
END 5 6 7 8 9 10 11 /FIND FIRST 1 (MPE/3000) THAT IS USED TO CREATE AND MANIPULATE ASCII FILES. CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE LINES OF CHARACTERS CAN BE INSERTED, DELETED, REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE MANIPULATED BY USING EDIT/3000 COMMANDS. 1-2. WHAT IS EDIT/3000? ^ (1 ) /FIND " ENTIRE" 8 CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE ^ (38 ) /FIND " HP 3000" *21*STRING NOT FOUND BEFORE LIMIT /FIND FIRST;FIND " HP 3000" 1 1-2.
GATHER 3-38. GATHER COMMAND 3-39. Purpose. The GATHER command removes text from one location to another in the WORK le. 3-40. Form. The form of the GATHER command is 8 2 G ATHER 32 Q 3< range : ALL TO 8 , linenumber 9 TO , linenumber 9 = ; BY increment , For example, GATHER 55/89 TO 8.01 BY .01 ^ ^ ^ | | | range linenumber increment Note Use the SETSIZE command (see paragraph 3-92) to set the SIZE to a large value if extensive gathering is to be done. 3-41.
GATHER When text to be moved would overlap existing lines, line numbers must be changed before the GATHER command is used. One method of accomplishing this is with a HOLD command as follows: HOLD 10/15 (Hold 6 lines of text) DELETE 10/15 (Delete the 6 lines) GATHER 100/1500 TO 10 (Add 1401 lines between lines 10 and 15) FIND * ADD linenumber,HOLD,NOW (Add the 6 lines held in the HOLD file to the end of the 1401 lines which were moved.
GATHER 3-43. Examples. Several variations of the GATHER command are shown in the following examples. The location of the pointer is illustrated at the conclusion of each GATHER command. GATHER range TO linenumber BY increment The following example uses the command GATHER 8/11 to 2.1 BY .01 to move lines 8 through 11 to 2.1, 2.11, 2.12, and 2.13. The pointer is located at the rst position of the last line moved (2.13). Lines 8 through 11 are deleted. /LIST ALL 1 1-2.
GATHER /LIST ALL 1 1-2. WHAT IS EDIT/3000? 2 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES. 7 7.1 CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE 7.2 LINES OF CHARACTERS CAN BE INSERTED, DELETED, 7.3 REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWIS 7.4 MANIPULATED BY USING EDIT/3000 COMMANDS. /GATHER ALL;LIST ALL 1 1-2.
HOLD 3-44. HOLD COMMAND 3-45. Purpose. The HOLD command copies lines of text from the WORK le to the HOLD le. 3-46. Form. The form of the HOLD command is H[OLD][Q][ [range] [,APPEND]] 3-47. Description. The HOLD command is used to copy all or a portion of the WORK le contents into the HOLD le. A listing of all lines transferred into the HOLD le is displayed (unless the HOLDQ form of the command is used). The WORK le contents are una ected.
HOLD 3-49. Examples. Several variations of the HOLD command are shown in the following examples. HOLD range The following example uses the HOLD 1/6 command to create a HOLD le and copy lines 1 through 6 from the WORK le into this le. The lines are listed by EDIT/3000. The WORK le contents are not altered. LIST ALL 1 1-2. WHAT IS EDIT/3000? 2 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES.
HOLD To clear the HOLD le, the HOLD command, with no range speci ed, is used as illustrated in the following example.
INSERT INSERT 3-50. INSERT COMMAND 3-51. Purpose. The INSERT command inserts character strings or lines of text into the WORK le at a speci ed position, irrespective of line boundaries. 3-52. Form. The form of the INSERT command is 2 I NSERT 32 Q 32 position 3 BY , 2 increment 3 2 , 32 2 HOLD Q 32 , 32 NOW 33 3-53. Description. The INSERT command is used to insert character strings in a line of text in the WORK le or to insert complete lines of text in the WORK le.
INSERT 1. Press CONTROL Y after the last character has been inserted and before RETURN is pressed, as follows: 1 2 3 4 5 /INSERT 2 2 /LIST 2/3 2 3 LINE LINE LINE LINE LINE 1 2 3 4 5 OF OF OF OF OF WORK WORK WORK WORK WORK FILE FILE FILE FILE FILE |--- YC LINE 2 OF WORK FILE v ^CONTROL Y IS PRESSED BEFORE RETURNLINE 2 OF WORK FILE CONTROL Y IS PRESSED BEFORE RETURNLINE 2 OF WORK FILE LINE 3 OF WORK FILE The characters are inserted on the same line as the line speci ed (2) in the position parameter.
INSERT ^// IS ENTERED AFTER RETURN 1.1 // LINE 1 OF WORK FILE /LIST, 1/2 1 // IS ENTERED AFTER RETURN 1.1 LINE 1 OF WORK FILE 2 LINE 2 OF WORK FILE CR Entering // in this manner has the same e ect as that described for CONTROL Y in example 2. In batch mode, only // may be used either as the last two characters in a line of characters to be inserted or as the only two characters in a record. The results are the same as shown in the preceding examples 3 and 4. 3-54. Limitations.
INSERT /FIND* 7.1 /LIST 6/8 6 7 7.1 8 ^ (0) MANIPULATE ASCII FILES. (EDIT/3000 COMMANDS ARE USED.) CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE The following example illustrates the error message which is printed if the SET DELTA=increment option in e ect does not allow new line numbers when new lines are being inserted. TEST is listed and INSERT 1.998 is used to insert two new lines. A carriage return is pressed after each line.
INSERT SPLITTING A LINE INTO TWO LINES If you wish to make two lines out of an existing line, use the INSERT command as shown in the following example. The FINDQ FIRST;FIND \OPERATING" commands locate the desired position where the line is to be split. Entering the INSERT 4(28) command and then //after RETURN creates a new line (4.1) and the previous line 4 is now two lines.
INSERT inserted into the work le. Insertion would then continue to the next line. If the HOLD le has two blank lines, only one blank line gets inserted. If the HOLD le has three blank lines, 2 blank lines are inserted and so on. The original line 5 start sat the end of the last HOLD le record. (The string (MPE/3000)from the original line 5 is appended to the end of the last HOLD le record entered into the WORK le.) /LIST ALL 1 1-2.
INSERT 2 3 EDIT/3000 IS A SUBSYSTEM OF THE 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES. 7 8 CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE 9 LINES OF CHARACTERS CAN BE INSERTED, DELETED, 10 REPLACED. MODIFIED, SEAPCHED FOR, AND OTHERWISE 11 MANIPULATED BY USING EDIT/3000 COMMANDS.
JOIN 3-56. JOIN COMMAND 3-57. Purpose. The JOIN command appends or merges the contents of another MPE/3000 le into the WORK le. 3-58. Form. The form of the JOIN command is 2 3 (linenumber /linenumber ) lename J OIN Q (#recnum/#recnum) 22 3 2 33 9 TO 8 BY , UNN UMBERED linenumber increment , , 2 32 38 9 The second occurrence of the linenumber is optional.
JOIN In an interactive session, each line copied is displayed on the terminal (unless the Q parameter is included with the command). You may terminate the JOIN command by entering CONTROL Y. Any lines copied before CONTROL Y is entered remain in the WORK le. The contents of the joined le are una ected. 3-60. Limitations. Any le to be copied into the WORK le with a JOIN command must 1. Consist of ASCII-coded records. 2. Have a lecode of from 0 to 1023, 1040 XLSAV, 1060 RJEPN, or 1052 EDTCT.
JOIN 5 LINE 5 OF JOIN FILE /TEXT FILE /LIST ALL 1 LINE 1 OF WORK FILE 2 LINE 2 OF WORK FILE 3 LINE 3 OF WORK FILE 4 LINE 4 OF WORK FILE 5 LINE 5 OF WORK FILE /JOIN ADDFILE (2/4) TO 2.1 BY .1 2.1 LINE 2 OF JOIN FILE 2.2 LINE 3 OF JOIN FILE 2.3 LINE 4 OF JOIN FILE /FIND* 2.3 LINE 4 OF WORK FILE /LIST 2/3 2 2.1 2.2 2.
JOIN 3 LINE 3 OF JOIN FILE 4 LINE 4 OF JOIN FILE 5 LINE 5 OF JOIN FILE /JOINQ ADDFILE NUMBER OF LINES JOINED = 5 /FIND* 10 LINE 5 OF WORK FILE ^ (1 ) /LIST ALL 1 LINE 1 OF WORK FILE 2 LINE 2 OF WORK FILE 3 LINE 3 OF WORK FILE 4 LINE 4 OF WORK FILE 5 LINE 5 OF WORK FILE 6 LINE 1 OF JOIN FILE 7 LINE 2 OF JOIN FILE 8 LINE 3 OF JOIN FILE 9 LINE 4 OF JOIN FILE 10 LINE 5 OF JOIN FILE EDIT/3000 COMMANDS 3-43
KEEP 3-62. KEEP COMMAND 3-63. Purpose. The KEEP command saves the contents of the WORK le. 3-64. Form. The form of the KEEP command is K[EEP][ lename [(range)] [,UNN[UMBERED] ] ] or K[EEP] Q lename For example, * KEEP KFILE (45/678),UNNUMBERED 3-65. Description. If the lename parameter of the KEEP command refers to a new le, a le is opened under this name by MPE/3000, and the WORK le contents are stored on disc in this le.
KEEP 5 6 MORE: TO COME ... /K KEPFIL, UNN KEPFIL ALREADY EXISTS - RESPOND YES TO PURGE OLD AND THEN KEEP PUFGE OLD?Y /END END OF SUBSYSTEM : Another example follows. This time only the lename is implied: :EDITOR HP32201A.7.01 EDIT/3000 WED, MAY 3, 1978, 1:43 PM (C) HEWLETT-PACKARD CO, 1976 /TEXT KEPFIL /A 7 several changes in addition 8 MORE TO COME 9 . . .
KEEP by appending EDIT/3000 variables to the le and assigning a lecode of 1050 or 1051 to the le. A lecode of 1050 signi es an EDIT/3000 KEEPQ le (non-COBOL) and a lecode of 1051 signi es an EDIT/300OKEEPQ le (COBOL). All such les are intended to be read only by EDIT/3000 although KEEPQ les can also be read by SPL/ 3000. To add the lockword to the new le would require EDIT/3000 to save it internally and thus cause a possible security violation. 3-66. Limitations.
KEEP 3-67. Examples. Several variations of the KEEP command are shown in the following examples. KEEP lename The rst example uses the KEEP EDIT2 command to keep the le EDIT2. Because EDIT2 is an existing le, EDIT/3000 asks if it is OK to purge the old le. HP 32201A.4.01 EDIT/3000 WED, MAY 14, 1975, 3:43 PM /T EDIT2;L ALL 1 1-2. WHAT IS EDIT/3000? 2 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES.
KEEP /TEXT /LIST 1 2 3 4 TEST, UNNUMBERED ALL CHARACTERS, STRING OF CHARACTERS, OR ENTIRE LINES OF CHARACTERS CAN BE INSERTED, DELETED, REPLACED. MODIFIED, SEARCHED FOR, AND OTHERWISE MANIPULATED BY USING EDIT/3000 COMMANDS. SEQUENCING INFORMATION When the KEEP lename form of the KEEP command is used, EDIT/3000 appends eight bytes to the end of each record for sequencing information.
KEEP length KEEPQ lename The next example demonstrates the use of the KEEPQ command. In the rst part of the example, the TEXT le EDIT2 is copied into the WORK le and listed. The VERIFY FILES command shows a WORK le of K18111336 and the MPE/3000 LISTF command displays the le parameters. In the second part of the example, the same le is copied into the WORK le and listed. Then the KEEPQ command is entered.
KEEP 2 LINE 2 OF WORK FILE 3 LINE 3 OF WORK FILE 4 LINE 4 OF WORK FILE 5 LINE 5 OF WORK FILE /KEEPQ EDIT2 PURGE OLD?Y /VERIFY FILES FILES: WORK: KEEP: EDIT TEXT: EDIT2.PUB.
KEEP For example, :EDITOR HP 32201A.7.01 EDIT/3000 /TEXT KEPFIL, UNN /V FILES FILES: WORK: K1231342 KEEP: TEXT: KEPFIL.PUB.SHELL JOIN: /ADD 6 ADDITIONS 7 MORE ADDITIONS 8 ... /V FILES WED, MAY 3, 1978, 1:42 PM WED, MAY 3, 1978, 1:42 PM FILES: WORK: K1231342 WORK FILE HAS BEEN ALTERED KEEP: TEXT: KEPFIL.PUB.SHELL WED, MAY 3, 1978 JOIN: /KEEP KEPFIL,UNN KEPFIL ALREADY EXISTS - RESPOND YES TO PURGE OLD AND PURGE OLD?Y /V FILES FILES: WORK: K1231342 KEEP: KEPFIL.PUB.SHELL WED, MAY 3, 1978 TEXT: KEPFIL.PUB.
KEEP /LIST ALL 1 PROGRAM INTRINSICS 2 C 3 C FOPEN, FREAD, AND FCLOSE EXAMPLE 4 C 5 100 FORMAT(T2,S) 6 CHARACTER*72 BUFFER, FILENAME*16 7 LOGICAL LBUFFER(36) 8 INTEGER FILENUMBER,FOPEN,FREAD 9 EQUIVALENCE (LBUFFER,BUFFER) 10 FILENAME="MAILLIST" 11 C 12 C THE NEXT STATEMENT CALLS THE FOPEN INTRINSIC 13 C 14 FILENUMBER-FORPEN(FILENAME,\1\,\%105\,O,O,O,O,O,O,\0.0\, 15 #0,0,0,\%16000\, 16 IF(.CC.
LIST LIST 3-68. LIST COMMAND 3-69. Purpose. The LIST command displays all or a portion of the WORK le. 3-70. Form. The form of the LIST command is L[IST][Q] [range] [,UNN[UMBERED] ][,OFFLINE][,TRANSLATE][,NOTEXT] 3-71. Description. The LIST command lists the lines of the WORK le contained in range . If range is not speci ed or if range is an asterisk (*), the line containing the pointer is displayed. If range is ALL, the entire contents of the WORK le are displayed.
LIST 3-72. Limitations. The LIST command displays only those characters within the SET LEFT, SET RIGHT margins in e ect. See paragraph 3-92 for a discussion of the SET command. 3-73. Examples. Several variations of the LIST command are shown in the following examples. The location of the pointer is illustrated after the conclusion of each LIST command. LIST range This example speci es a range of 3/6 and only lines 3 through 6 are listed.
LIST MANIPULATE ASCII FILES. /FIND* 7 (1 )^ LIST range , NOTEXT This form of the LIST command causes EDIT/3000 to display line numbers only; the text of the lines in range is not listed. /LIST 3/6,NOTEXT 3 4 5 6 /FIND * 7 ^ (1 ) LIST range ,OFFLINE The LIST range , OFFLINE command sends the WORK le records to list le instead of displaying the records on the standard list device. The list le can be declared in the MPE/3000 :EDITOR and :FILE commands and equated to an alternative output device.
LIST If EDIT/3000 has been accessed without specifying an o ine list le, an o ine listing can be obtained on devices other than LP as follows: a. Enter the following: FILE command from within EDIT/3000: :FILE EDTLIST;DEV= FASTLP where FASTLP is the desired device class name (FASTLP is a line printer on the system used in the example) and EDTLIST is the formal le designator for EDIT/3000 o ine listings. b. Enter the EDIT/3000 command.
MODIFY MODIFY 3-74. MODIFY COMMAND 3-75. Purpose. The MODIFY command modi es text records in the WORK le through the use of three MODIFY subcommands. 3-76. Form. The form of the MODIFY command is M[ODIFY][Q][rangelist] 3-77. Description. The three MODIFY subcommands are as follows: D Deletes the character directly above it.
MODIFY 3-78. Limitations. The MODIFY command operates only on text within the SET LEFT, SET RIGHT options in e ect. (See paragraph 3-92 for a discussion of the SET command.) Only one subcommand may be used to modify a line each time it is displayed, with this exception: an I (insert) subcommand can follow a D (delete) or an I can be used as the second D in a range of Ds.
MODIFY 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM ^ (1 ) /MODIFY 3 MODIFY 3 EDIT/3000 IS A SUBSYSTEM OF THE HP3000 D D EDIT/3000 IS A SUBSYSTEM OF THE /LIST 3/4 3 EDIT/3000 IS A SUBSYSTEM OF THE 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM REPLACE AND INSERT SUBCOMMANDS The REPLACE (R) subcommand replaces characters starting with the character directly above the R with new characters entered from the INPUT le. In the example, the characters \HP3000" are replaced by \HEWLETT-PACKARD".
MODIFY /MODIFY 3 MODIFY 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 I& LIST 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 LIST 3 /MODIFY 3 MODIFY 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 LIST 3 D DI& CR EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 & /LIST 3 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 & 3-60 EDIT/3000 COMMANDS
Q Q 3-80. Q COMMAND 3-81. Purpose. The Q command displays a message on the standard list device (OUTPUT le). 3-82. Form. The form of the Q command is string Q "Z::" 3-83. Description. The Q command prints any message selected by you, or a blank line if no string is supplied. You can use the Q command, for example, to remind yourself to perform certain editing functions when a speci c point is reached in an edit cycle. This command is most useful in WHILE blocks and USE les. 3-84. Limitation.
REPLACE 3-86. REPLACE COMMAND 3-87. Purpose. The REPLACE command replaces one or more lines in the WORK le. 3-88. Form. The form of the REPLACE command is R[EPLACE][Q] [rangelist] [,HOLD[Q] [,NOW]] 3-89. Description. Entire lines are replaced by a REPLACE command. (Use the CHANGE or MODIFY commands if you want to change characters within a line.
REPLACE 3-90. Limitations. The REPLACE command operates only within the margins established by the SET LEFT, SET RIGHT (see paragraph 3-92) options in e ect. Only that text within the left and right margins is displayed and only that part of the line is replaced. The replacement line is padded with blanks if it is shorter, while a warning message is displayed if the string is longer than the LEFT/RIGHT range.
REPLACE In the example, the characters \(MPE/3000) THAT IS USED TO CREATE AND" are entered after the prompt (5) is displayed. These characters replace the old contents (THIS IS A NEW LINE) of line 5. /LIST 5 5 /REPLACEQ 5 /FIND* 6 THIS IS A NEW LINE 5. 5 (MPE/3000) THAT IS USED TO CREATE AND MANIPULATE ASCII FILES. ^ (1 ) /LIST 4/6 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES.
REPLACE 4 5 6 7 8 9 10 11 LINES OF CHARACTERS CAN BE INSERTED, DELETED, REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE MANIPULATED BY USING EDIT/3000 COMMANDS. CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE LINES OF CHARACTERS CAN BE INSERTED, DELETED, REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE MANIPULATED BY USING EDIT/3000 COMMANDS.
REPLACE 11 // ...
SET SET 3-92. SET COMMAND 3-93. Purpose. The SET command alters default conditions normally established by EDIT/3000. 3-94. Form.
SET If SET FORMAT = DEFAULT (the default condition), the increment is 1; if SET FORMAT = COBOL, the increment is 0.1. The SET DELTA value establishes line number increments which are used in the ADD, GATHER, and JOIN commands, and (when the UNNUMBERED parameter is used) in TEXT commands. The SET DELTA value in e ect can be overridden with the BY increment parameter of GATHER, INSERT, and JOIN commands. SET DEPTH = limit .
SET In addition, when SET FORMAT = DEFAULT, the smallest increment allowed for line number intervals is .001. The maximum line number count allowed is 99999.999. This restricts sequence numbers derived from line numbers with the KEEP command to eight bytes, with a range from 00000001 through 99999999. If SET FORMAT = COBOL, the smallest increment allowed for line number intervals is .001 and the maximum line number count allowed is 999.999.
SET END OF SUBSYSTEM /SET SHORT;END CLEAR? YES END OF SUBSYSTEM SET SHORT also is used to inhibit display of commands in a WHILE block. SET SIZE = integer . SET SIZE establishes the actual size of the WORK le, in lines. The default is 0, when EDIT/3000 begins operation.
SET When the text is moved into the work le, the tab characters are replaced with a su cient number of blanks to position up to the second tab stop and the number 45.85 is moved into the next ve columns. Note Tab characters are recognized only in the ADD and REPLACE commands. SET TABS=(colnum , . . . )/NOTABS. SET TABS=de nes up to 12 tab stops to allow text to be entered beginning at a speci ed column. If no SET TABS command is used, the default condition is SET NOTABS.
SET 145Ic Current line according to Editor The tab stops may be set on the terminal either manually, or programmatically with an Editor USE le speci ed by the user. The code for TAB SET is Escape 1 (1e). The following USE le (named TABFIL) sets tabs in columns 10 and 20 of lines to be entered with the ADD command: SET TABS (10,20); Q " 1e 1e "; (1e indicates Escape 1) To execute the USE le, enter the USE command and the le name.
SET 3-97. Examples. Examples are provided for several SET command options. SET DELTA SET DELTA de nes the interval between lines in the WORK le. In the following example, the interval is 1 (the default condition if SET FORMAT = DEFAULT) and lines entered with the ADD command are numbered 1, 2, and 3. After the SET DELTA = .001 command is entered, lines entered are numbered 1,1.001, and 1.002. /VERIFY DELTA DELTA = 1 /ADD 1 LlNE 2 LINE 3 LINE 4 // ... /D ALL CLEAR? Y /SET DELTA=.001 /ADD 1 LINE 1.
SET The SET QUIET command is equivalent to using the Q parameter for EDIT/3000 commands (except KEEP). In the example, after SET QUIET is entered, EDIT/3000 does not prompt with line numbers when the ADD command is executed. When the LIST command executes, line numbers are not displayed. Using the SET DISPLAY command sets QUIET to FALSE. /VERIFY QUIET DISPLAY = TRUE (I.E. QUIET = FALSE) /ADD 1 LINE 1 2 LINE 2 3 // ... /SET QUIET /ADD LINE 3 LINE 4 // ...
SET 4 5 /L 1/4 1 2 3 4 A NEW POCKET CALCULATOR. YOU WILL RECEIVE IT IN ... JANUARY 16, 1977 DEAR MR. JONES: WE ARE PLEASED TO ADVISE YOU THAT YOU HAVE WON A NEW POCKET CALCULATOR.
TEXT 3-98. TEXT COMMAND 3-99. Purpose. The TEXT command copies the contents of an MPE/3000 le into the WORK le. 3-100. Form. The form of the TEXT command is 2 T EXT 3 (linenumber/linenumber) lename (#recnum/#recnum) 2 2 ,UNN UMBERED 33 3-101. Description. A TEXT command that includes only the lename parameter copies the entire le into the WORK le.
TEXT /A 1 OLD MATTER 2 NEW MATTER 3 ... /K KEPFIL /T KEPFIL /END END OF SUBSYSTEM : In an interactive session, if the TEXT command is used when the WORK le has been altered, EDIT/3000 asks if it is OK to clear the WORK le before the TEXT command is executed. If the response is other than YES or Y, the TEXT command is not executed. When a TEXT command is executed in batch mode, EDIT/ 3000 clears the WORK le automatically if it has been altered.
TEXT If a le has been saved with the KEEPQ lename command, then the lename must be speci ed in a TEXT command for that le. If a le has been saved with the KEEPQ lename command, the le is saved in its structured \edit" format, instead of in the sequential format in which les normally are stored by the MPE/3000 le system. This is accomplished by appending EDIT/3000 variables to the le and assigning a lecode of 1050 or 1051 to the le.
TEXT When the rst three lines are listed, note that EDIT/3000 has appended sequencing information to each record. When the WORK le is saved with the K TEST command, EDIT/3000 appends another set of sequencing information and now the record size is 68 bytes (as shown by the LISTF TEST,1 command). If the KEEP lename , UNNUMBERED form of the command is used, the sequencing information generated by EDIT/3000 will not be appended to the end of the records.
TEXT /S SHORT;T TEST,UNN;L 1/3 1 1-2. WHAT IS EDIT/3000? 2 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 /K TEST, UNN PURGE OLD?Y /E CLEAR? Y END OF SUBSYSTEM :LISTF TEST,1 ACCOTUNT= GOODWIN GROUP= 00001000 00002000 00003000 PUB FILENAME CODE ------------LOGICAL RECORD-------SIZE TYP EOF LIMIT TEST 60B FA 10 10 TEXT lename The next example illustrates the use of the TEXT lename command. Note that the FIND * command causes an error message to be displayed.
TEXT 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 8 CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE /LIST ALL 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES. 7 8 CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE COPYING A TEXT FILE FROM CARDS To copy a TEXT le, located on cards, into the WORK le, perform the following steps as shown in the next example: 1. Log on to the system. 2.
TEXT See the MPE Commands Reference Manual for further discussions of the :DATA and :EOD commands, 4. Press the RESET switch (or equivalent) on the card reader to read the cards. 5. Enter the :EDITOR command to access EDIT/3000. 6. Enter the TEXT command. The command used in the example is TEXT *INFILE,UNNUMBERED Note The asterisk is a back reference to the le de ned in the :FILE command. The UNNUMBERED parameter is recommended because the le to be read did not contain line numbers.
USE USE 3-104. USE COMMAND 3-105. Purpose. The USE command designates a le (USE le) to be used by EDIT/3000 as a source of commands and/or text. 3-106. Form. The form of the USE command is U[SE] [ lename] 3-107. Description. The USE command causes EDIT/3000 to read commands from the USE le. In an interactive session, commands are read from the USE le, but any messages or requests for text records to be entered from the terminal are displayed on the terminal.
USE 3-108. Limitations. Any le to be read as a USE le must contain ASCII-coded records and must have a lecode between 0 and 1023. (See the MPE Commands Reference Manual for a discussion of lecode .) The USE le should be kept unnumbered unless the commands are terminated with a semicolon, which signals to EDIT/3000 that the line number is not part of the command. END in a USE le causes the USE command to terminate; the USE le is exited and EDIT/3000 prompts you with its usual slash.
USE /T USEFILE IF IT IS OK TO CLEAR RESPOND "YES" CLEAR? YES FILE UNNUMBERED /ADD 2.1 2.1 END 2.2 // ... /K USEFILE,UNN USEFILE ALREADY EXISTS - RESPOND YES TO PURGE OLD AND THEN KEEP PURGE OLD?YES /USE USEFILE 1 1-2. WHAT 15 HP 3000 TEXT EDITOR? 3 HP 3000 TEXT EDITOR IS A SUBSYSTEM OF THE HP3000 / READING COMMANDS AND TEXT FROM A USE FILE USEFILE2, shown in the following example, contains the commands TEXT EDIT2, ADD, then 9 lines of text (including blank lines) to be added.
USE ... 13 14 15 16 17 18 19 20 1-2. EDIT/3000 FEATURES WITH EDIT/3000, IT IS POSSIBLE TO CREATE AND BUILD A NEW FILE (CALLED A WORK FILE) BY ENTERING COMMANDS AND LINES OF TEXT FROM THE STANDARD INPTUT DEVICE OR FROM A SPECIAL DISC FILE CALLED THE HOLD FILE. 1 1-1. WHAT IS EDIT/3000? 2 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES.
VERIFY VERIFY 3-110. VERIFY COMMAND 3-111. Purpose. The VERIFY command displays the EDIT/3000 options in e ect. 3-112. Form.
VERIFY /VERIFY FROM FROM = 1 /VERIFY 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM ^ (1 ) /VERIFY ALL 4 MULTIPROGRAMMING EXECUTIVE OPEPATING SYSTEM ^ (1 ) POLL = TRUE (I.E. BATCH = FALSE) REAR = TRUE (I.E. FRONT = FALSE) DELTA = 1 CURRENT DEPTH = 0, THE DEPTH LIMIT = 10 RIGHT =72 LENGTH = 72 LONG = TRUE (I.E. SHORT = FALSE) TIME = 50 TOTAL NUMBER OF CURRENT LINES = 11 FROM = 1 LEFT = 1 FIXED = TRUE (I.E. VARIABLE = FALSE) SIZE = 0 DISPLAY = TRUE (I.E.
VERIFY END OF SUBSYSTEM The VERIFY TABS and VERIFY TABCHAR commands are illustrated in the next example. If a SET TABS or SET TABCHAR command has not yet been used, the Editor responds to a VERIFY TABS or TABCHAR command with NOTABS USED. If the default tab stops are set, a VERIFY yields the default column numbers. Note that the default tab character is Control I ('9). If you change the tab stops with another SET TABS command, the VERIFY TABS commands yields the new column numbers.
XPLAIN 3-116. XPLAIN COMMAND 3-117. Purpose. The XPLAIN command displays summary descriptions of selected EDIT/3000 commands or all EDIT/3000 commands. 3-118. Form.
XPLAIN 3-121. Examples. The following examples illustrate the use of the XPLAIN ADD, XPLAIN OR, XPLAIN, and XPLAIN ALL,OFFLINE commands. The XPLAIN command with no parameters displays a description of the XPLAIN command itself. Before the command XPLAIN ALL,OFFLINE command can be executed, the list le must be declared with an MPE/3000 :FILE command and equated to an output device, then the :EDITOR command must reference this le name. See the rst two lines in the example.
Z::= 3-122. Z::=COMMAND 3-123. Purpose. The Z::= command is used to assign a character string value to Z::=. 3-124. Form. The form of the Z::=command is Z::= 3-125. Description. When the Z::= command is entered in an interactive session, EDIT/3000 displays ENTER Z::= at which point you may enter the value to be assigned to Z::=. For example, /Z::= ENTER Z::= "HP 3000" In a batch job, EDIT/3000 assigns the record immediately following the Z::= command record to Z::=.
Z::= 3-126. Limitations. No more than 255 characters may be assigned to Z::=. When an EDIT/3000 cycle begins, Z::= is unde ned. You must de ne it by using the Z::= command, then entering the value to be assigned. The Z:: form of the command (which causes execution of the value assigned to Z::=) may not be used until you have de ned Z::=. You can change the current de nition of Z::= by entering another Z::= command and assigning another de nition. The old de nition is lost.
Z::= 50 /Z:: 51 51 120 IF(BUFF1[28:3].EO." ".AND.BUFF1[57:1].NE." ")GOTO 130 IF(BUFF1[59:3].EO." ".AND.BUFF)[58:1].NE." ")GOTO 150 ^ (41 ) ".AND.BUFF][28:1].NE." ")GOTO 150 IF(BUFF1[59:3].EO." The Z::= command can be used to alter commands in a WHILE loop during the execution of the loop. For instance, you can specify a di erent line number or string to be edited each time through the loop.
Z::= 16 LINE 16 EDIT/3000 COMMANDS 3-95
: 3-128. :COMMAND 3-129. Purpose. The : command is used to enter system commands from within EDIT/3000. 3-130. Form. The form of the : command is :MPE command For example, :PURGE AFILE 3-131. Description. The : command allows the user to enter certain MPE commands without using the BREAK key. The colon indicates to EDIT/3000 that it should pass the rest of the record to the MPE operating system, A : command may appear in a USE le or a WHILE block.
: 3-132. Limitations. Using the BREAK key during the execution of a : command causes a break in EDIT/3000. When RESUME is typed, execution of the command continues. Valid commands are those which can be executed programmatically (see the MPE Intrinsics Manual , Section IV, the subsection entitled \Executing MPE Commands Programmatically," for a list of such commands). Commands which are valid MPE commands but which cannot be executed programmatically (such as the MPE :RUN command) cause error #12.
: Table 3-2. Summary of Parameter Descriptions colnum lename increment integer limit linenumber newstring oldstring position range rangelist recnum startcolumn startline stopcolumn stopline string an integer specifying the column number in a line. the MPE/3000 le name. the value by which line numbers are incremented. an integer in the range from 1 through 99999 when SET FORMAT = DEFAULT or from 1 through 999 when SET FORMAT = COBOL. an integer from 1 through 9999. the value assigned to line numbers.
4 EDIT/3000 ADVANCED COMMANDS In addition to the commands described in Section III, EDIT/3000 allows you to use seven advanced commands, as follows: BEGIN The BEGIN command is used as the rst expression in a BEGIN-END pair to delimit a compound command. END Terminates a BEGIN-END pair. NOT Reverses the normal control, or \ ag", within a BEGIN-END pair for execution of the next command.
WHILE 4-1. WHILE COMMAND 4-2. PURPOSE The WHILE command causes EDIT/3000 to repeat the two commands following subject to these conditions: 1. While a WORK le condition speci ed in the EDIT/3000 command immediately following the WHILE command can be met (the ag is true). 2. Until the number of iterations speci ed by the SET TIME = limit command has been met (the default is 50 iterations). See Section III, paragraph 3-92 for a discussion of the SET command.
WHILE 4-3. FORM The form of the WHILE command is WHILE [FLAG] 4-4. DESCRIPTION As long as the condition speci ed in the rst command following a WHILE command can be met, EDIT/3000 sets a ag true and the commands in the WHILE block continue to execute. When the condition speci ed in the rst command cannot be met, EDIT/3000 sets the ag false , execution of the commands in the WHILE block terminates, \soft" error message is displayed.
WHILE /S SHORT;T 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 EDIT3;L ALL 1-2. WHAT IS EDIT/3000? EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 MULTI-POGRAMMING EXECUTIVE OPERATING SYSTEM (MPE/3000) THAT IS USED TO CREATE AND MANIPULATE ASCII FILES. CHARACTERS, STRINGS OF CHARACTERS, 0R ENTIRE LINES; OF CHARACTER CAN BE INSERTED, DELETED, REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE MANIPULATED BY USING EDIT/3000 COMMANDS. 1-2.
WHILE /FIND "EDIT/3000" 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 ^ (1 ) /LIST* 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 /FIND "EDIT/3000" 11 MANIPULATED BY USING EDIT/3000 COMMANDS. ^ (22 ) /LIST* 11 MANIPULATED BY USING EDIT/3000 COMMANDS. /FIND "EDIT/3000" 13 1-2. EDIT/3000 FEATURES ^ (7 ) /LIST* 13 1-2. EDIT/3000 FEATURES /FIND "EDIT/3000" 15 WITH EDIT/3000.
WHILE The following example illustrates a FIND command in a WHILE block that does not use the character position parameter to position the pointer to the last character in the string being searched for. EDIT/3000 positions the pointer to the rst character in the string. Thus, subsequent iterations of the FIND command locate the same occurrence of the string because the pointer location is not changed. The iterations were terminated by typing CONTROL Y.
BEGIN BEGIN 4-7. BEGIN-END COMMANDS 4-8. PURPOSE The BEGIN-END commands are used to block a set of EDIT/3000 commands within a WHILE command block. 4-9. FORM The form of the BEGIN-END commands is B[EGIN][Q] E[ND] 4-10. DESCRIPTION A BEGIN-END pair can include any number of EDIT/3000 commands. These commands will execute repeatedly until the ag becomes false ,or until the SET TIME = limit option is reached.
BEGIN 4-12. EXAMPLES The WORK le is shown below. /S SHORT;T EDIT3;L ALL 1 1-2. WHAT IS EDIT/3000? 2 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES. 7 8 CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE 9 LINES OF CHARACTERS CAN BE INSERTED, DELETED, 10 REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE 11 MANIPULATED BY USING EDIT/3000 COMMANDS. 12 13 1-2.
BEGIN / / / / / / BEGIN FIND "FEATURES" CHANGE "FEATURES" TO "CAPABILITIES" LIST ALL END END 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 ^ (16 ) 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 13 1-2. EDIT/3000 FEATURES ^ (17 ) 13 1-2. EDIT/3000 CAPABILITIES 1 1-2. WHAT IS EDIT/3000 2 3 EDIT/3000 IS A SUB-SYSTEM OF THE HP 3000 4 MULTI-PROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES.
BEGIN EDIT/3000 then locates \EDIT/3000" in lines 3, 11, 13,and 15,and changes all occurrences to \HP 3000 TEXT EDITOR". When the condition speci ed in the rst FIND command fails, the iterations terminate and the error message is displayed. /FINDQ FIRST /WHILE / FINDQ "EDIT/3000" / BEGIN / CHANGE "EDIT/3000" TO "HP 3000 TEXT EDITOR" / BEGIN / FIND "FEATURES" / CHANGE "FEATURES" TO "CAPABILITIES" / FINDQ FIRST / END / END 1 1-2. WHAT IS HP TEXT EDITOR? 13 1-2. EDIT/3000 FEATURES ^ (17 ) 13 1-2.
NOT NOT 4-13. NOT COMMAND 4-14. PURPOSE The NOT command reverses the ag setting after the command immediately following the NOT command is executed. 4-15. FORM The form of the NOT command is N[OT] 4-16. DESCRIPTION The NOT command reverses the ag setting after the command following it is executed.
NOT 5 6 7 9 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (MPE/3000) THAT IS USED TO CREATE AND MANIPULATE ASCII FILES. CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE LINES OF CHARACTERS CAN BE INSERTED, DELETED, REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE MANIPULATED BY USING EDIT/3000 COMMANDS. 1-2.
NOT 1 3 1-2. WHAT IS EDIT/3000 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 ^ (11 ) 11 MANIPULATED BY USING EDIT/3000 COMMANDS. ^ (32 ) *21*STRING NOT FOUND BEFORE LIMIT AT DEPTH 4 11 MANIPULATED BY USING EDIT/3000 COMMANDS. 13 1-2. EDIT/3000 FEATURES ^ (17 ) *21*STRING NOT FOUND BEFORE LIMIT AT DEPTH 4 13 1-2.
OR 4-19. OR COMMAND 4-20. PURPOSE The OR command sets the ag true if the ag is false. If the ag is true, both the OR command and the command immediately following it are skipped. 4-21. FORM The form of the OR command is O[R] 4-22. DESCRIPTION In the following example FINDQ FIRST WHILE FIND "EDIT/3000"(+9) BEGIN FIND "HP 3000"/*(+20) OR BEGIN CHANGE "HP3000" TO "HP 3000" END END the command FIND \EDIT/3000" (+9) nds the string \EDIT/3000".
OR 4-23. LIMITATIONS The OR command should be used only with a WHILE block. 4-24. EXAMPLES The WORK le is shown below. /S SHORT;T EDIT3;L ALL 1 1-2. WHAT IS EDIT/3000? 2 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES.
OR The iterations continue until the rst FIND command fails and EDIT/3000 sets its ag to false. /FINDQ FIRST /WHILE / FIND "EDIT/3000"(+9) / BEGIN / FIND "HP 3000"/*(+20) / OR / LIST * / END 1 1-2. WHAT IS EDIT/3000? ^ (24 ) *21*STRING NOT FOUND BEFORE LIMIT AT DEPTH 3 1 1-2. WHAT IS EDIT/3000? 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 ^ (11 ) 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 ^ (33 ) 11 MANIPULATED BY USING EDIT/3000 COMMANDS.
YES YES 4-25. YES COMMAND 4-26. PURPOSE The YES command sets the ag true if it is false. 4-27. FORM The form of the YES command is Y[ES] 4-28. DESCRIPTION The YES command has no e ect other than setting the ag true if it is false. (For example, the YES command does not cause the next command to be skipped.
YES 4-30. EXAMPLES The WORK le is shown below. /S SHORT;T EDIT3;L ALL 1 1-2. WHAT IS EDIT/3000? 2 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM 5 (MPE/3000) THAT IS USED TO CREATE AND 6 MANIPULATE ASCII FILES. 7 8 CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE 9 LINES OF CHARACTERS CAN BE INSERTED, DELETED 10 REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE 11 MANIPULATED BY USING EDIT/3000 COMMANDS. 12 13 1-2.
YES / / / YES LIST * END 1 1-2. WHAT IS EDIT/3000? ^ (24 ) *21*STRING NOT FOUND BEFORE LIMIT AT DEPTH 3 1 1-2. WHAT IS EDIT/3000? 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 ^ (11 ) 3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 ^ (33 ) 3 EDIT/3000 IS A SUBSYSTEM OF THE HEWLETT-PACKARD 3000 3 EDIT/3000 IS A SUBSYSTEM OF THE HEWLETT-PACKARD 3000 11 MANIPULATED BY USING EDIT/3000 COMMANDS. ^ (32 ) *21*STRING NOT FOUND BEFORE LIMIT AT DEPTH 3 11 MANIPULATED BY USING EDIT/3000 COMMANDS.
PROCEDURE 4-31. PROCEDURE COMMAND 4-32. PURPOSE The PROCEDURE command calls and executes a procedure written previously in SPL/3000 (Systems Programming Language for the HP 3000 Computer System), FORTRAN/3000, or any other language which accepts parameters as speci ed and which produces a logical result and is stored in an MPE/3000 Segmented Library (SL). See the MPE Segmenter Subsystem Reference Manual for a description of SLs. 4-33.
PROCEDURE INTEGER LENGTH, SPACE(20) CHARACTER STRING*80, NUMBER*8 The procedure must be written to conform to the following requirements: 1. Be a type logical procedure (if written in SPL/3000) or a type logical function (if written in FORTRAN/3000). 2.
PROCEDURE 4-35. Limitations. A PROCEDURE command can call only logical procedures written in a language which accepts parameters as speci ed and which produces a logical result. The procedure must reside in a segmented library. In addition to the array SPACE, the procedure called by the PROCEDURE command may access the array USERSPACE, as described for the User Interface Procedures (see paragraph 6-1).
PROCEDURE Once the function has been compiled into a User Subprogram Library (USL, see the MPE Segmenter Subsystem Reference Manual ), the Segmenter subsystem is accessed with the MPE/3000 :SEGMENTER command as shown below. The Segmenter command -BUILDSL is used to create an SL le named SL, with 300 records maximum and one disc extent. The -USL command is used to identify the USL le ($OLDPASS) which contains the function procedure to be added to the SL le.
PROCEDURE 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (MPE/3000) THAT IS USED TO CREATE AND MANIPULATE ASCII FILES. CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE LINES OF CHARACTERS CAN BE INSERTED, DELETED, REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE MANIPULATED BY USING EDIT/3000 COMMANDS. 1-2.
PROCEDURE /FINDQ FIRST /WHILE / FINDQ * / BEGIN / PROCEDURE FINDBLANKLINE,P,* / OR / DELETEQ * / END LINE NUMBER 2 BLANK *19*FALSE RETURN FROM EDITOR PROCEDURE AT DEPTH 3 NUMBER OF LINES DELETED = 1 LINE NUMBER 7 BLANK *19*FALSE RETURN FROM EDITOR PROCEDURE AT DEPTH 3 NUMBER OF LINES DELETED = 1 LINE NUMBER 12 BLANK *19*FALSE RETURN FROM EDITOR PROCEDURE AT DEPTH 3 NUMBER OF LINES DELETED = 1 LINE NUMBER 14 BLANK *19*FALSE RETURN FROM EDITOR PROCEDURE AT DEPTH 3 NUMBER OF LINES DELETED = 1 LINE NUMBER 16 BL
PROCEDURE 6 8 9 10 11 13 15 17 18 19 20 22 23 25 26 28 29 31 /E CLEAR? Y MANIPULATE ASCII FILES. CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE LINES OF CHARACTERS CAN BE INSERTED, DELETED, REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE MANIPULATED BY USING EDIT/3000 COMMANDS. 1-2. EDIT/3000 FEATURES WITH EDIT/3000, IT IS POSSIBLE TO CREATE AND BUILD A NEW FILE (CALLED A WORK FILE) BY ENTERING COMMANDS AND LINES OF TEXT FROM THE STANDARD INPUT DEVICE OR FROM A SPECIAL DISC FILE CALLED THE HOLD FILE.
5 MESSAGES AND RECOVERY PROCEDURES An error indication is produced whenever an error occurs during EDIT/3000 operation. In an interactive session or batch job, EDIT/3000 normally displays the error number followed by the error message. For example, *14* INVALID LINE NUMBER In an interactive session, the user has the option to request a di erent error reporting scheme by initiating EDIT/3000 with the MPE command :RUN EDITOR.PUB.SYS; PARM = 8 In this case, only the error number is displayed.
Each error that relates to an MPE/3000 le intrinsic is preceded by a File Information Display. See the MPE Intrinsics Reference Manual for descriptions of these displays. These types of errors contain the MPE/3000 errorcode in parentheses after the error message. Table 5-1. Error Messages NO. TYPE MESSAGE CAUSE ACTION 1 Hard INVALID COMMAND NAME Command name incorrect. Re-enter the command. 2 Hard INVALID OPTION Command parameter incorrect. Re-enter the command.
Table 5-1. Error Messages (continued) NO. TYPE MESSAGE CAUSE ACTION 11 Soft POSITION NOT FOUND A position does not exist List the lines where the position should be and in the WORK le re-enter the command accordingly. 12 Hard OVERSIZED LINE (linenumber ) The line exceeds the LEFT, RIGHT, or LENGTH options in e ect. Correct the LEFT, RIGHT, or LENGTH options and re-enter the command. 13 Hard TIMEOUT ERROR WHILE command construct wrong. Re-enter the command.
Table 5-1. Error Messages (continued) NO. TYPE MESSAGE CAUSE ACTION 22 Soft LINE DOES NOT EXIST The line does not exist in List the line before and the line after the line, with NO the WORK tie. TEXT. ADD linenumber , if necessary. 23 Hard FAILURE TO OPEN TEXT FILE (errorcode ) Check the error code in the File requested with a TEXT command was not MPE Intrinsics Reference Manual . opened due to the errorcode reported. 24 Hard RECORD SIZE TOO LARGE The length of the le is greater than 255 bytes.
Table 5-1. Error Messages (continued) NO. TYPE MESSAGE CAUSE ACTION 34 Warn WARNING - HOLD FILE IS EMPTY HOLD le is empty 35 Hard FAILURE TO LOAD LIBRARY PROCEDURE The procedure requested Check the SL library. See Section IV, PROCEDURE with a PROCEDURE command. command could not be loaded. 36 The WORK le has no Hard SCRATCH FILE IS FULL. KEEP, THEN TEXT AGAIN more space available. 37 Hard INVALID INTEGER A linenumber parameter Correct the linenumber is incorrect or is outside parameter.
Table 5-1. Error Messages (continued) NO. TYPE MESSAGE CAUSE ACTION USE command could not open USE le referenced due to error-code reported. Check that lename is correct. If OK, see the MPE Intrinsics Reference Manual . 47 Hard FAILURE TO OPEN USE FILE (errorcode ) 48 Hard FAILURE TO OPEN WHILE WHILE command could Check WHILE command. If OK, see the MPE Intrinsics not execute due to FILE (errorcode ) Reference Manual . errorcode reported.
Table 5-1. Error Messages (continued) NO. TYPE MESSAGE CAUSE ACTION Check HOLD command, if OK, see the MPE Intrinsics Reference Manual . 59 Hard WRITE ERROR ON HOLD FILE (errorcode ) HOLD le could not be written to due to errorcode reported. 60 Hard FCLOSE FAILURE (errorcode ) A le could not be closed Check lename parameter, if OK see the MPE due to the errorcode Intrinsics Reference reported. Manual .
Table 5-1. Error Messages (continued) NO. TYPE 70 MESSAGE Warn WARNING: WORK FILE IS TEMPORARY reason (See below) INSUFFICIENT SPACE IN GROUP ACCOUNT CAUSE ACTION Check your library of les; The WORK le is temporary due to reason your disc space may be exceeded and you may need speci ed. to purge some les to make space. USER DOES NOT HAVE SF CAPABILITY 71 Hard KEEP FILE MUST BE WITHIN LOG-ON ACCOUNT File name used in KEEP KEEP the le within the logon account.
6 CUSTOMIZING EDIT/3000 6-1. USER INTERFACE PROCEDURES To satisfy a number of needs for Customizing EDIT/3000 in speci c applications, three logical procedures can be written. These procedures are HP32201 'USERINIT, HP32201'USERADD, and HP32201'USER- COMMAND. They are designed to allow you to tailor some of the externals of EDIT/3000 to your speci c requirements.
ARRAY PROCSPACE; where procname is either USERINIT, USERCOMMAND, or USERADD. The parameters are de ned as follows (additional requirements are given in the descriptions of each procedure): STRING is a byte array containing the characters of one line, which may consist of up to 255 characters. LENGTH is an integer value specifying the number of characters in the current line being passed by STRING. USERSPACE is a 10 word array that is available for user \global" storage.
6-3. HP32201'USERCOMMAND PROCEDURE. USERCOMMAND will allow for a user written procedure to scan EDIT/3000 commands after they are entered. For example, the procedure could screen the syntax of EDIT/3000 commands, or could interpret a user de ned command as a standard EDIT/3000 command. This procedure is invoked if logical 1 or 3 (or TRUE) is returned from USERINIT when an EDIT/3000 process is initiated.
6-5. EXAMPLES Three user written SPL/3000 procedures, which satisfy the requirements described above, are shown here. They are each compiled into a User Subprogram Library named USERUSL by using the MPE/3000 SPL command. (See the MPE Commands Reference Manual for a discussion of the SPL command.) :SPL INIT,USERUSL PAGE 0001 00001000 00002000 00003000 00004000 HP32100A.06.
00012000 00000 2 LOGICAL ARRAY L(0:10); 00013000 00000 2 BYTE ARRAY B(*)=L; 00014000 00000 2 INTRINSIC PRINT,FWRITE; 00015000 00000 2 00016000 00000 2 HP32201'USERCOMMAND:=TRUE; 00017000 00011 2 MOVE B:="USERCOMMAND ENTERED!"; 00018000 00031 2 FWRITE(USERSPACE(1),L,-20,0): 00019000 00037 2 @WORDPTR:=@STRING&LSR(1); 00020000 00042 2 PRINT(WORDPTR,-LEN,0); 00021000 00046 2 < < 00022000 00046 2 < < IMPLEMENT THE COMMAND "QUIT" 00023000 00046 2 < < CHANGE "QUIT" TO "KEEP" AND INSERT ";END" AT THE END 00024000 0
00019000 00000 2 EQUATE CARRIAGE'RETURN=13; 00020000 00000 2 INTRINSIC PRINT,FWRITE; 00021000 00000 2 00022000 00000 2 HP32201'USERADD:=TRUE; 00023000 00021 2 MOVE B:="USERADD ENTERED!"; 00024000 00037 2 FWRITE(USERSPACE(1),L-16,0); 00025000 00045 2 @WORDPTR:=@STRING&LSB(1); 00026000 00050 2 PRINT(WORDPTR,-LEN,0); 00027000 00054 2 << 00028000 00054 2 << SEARCH FOR *'S--WHEN FOUND, INSERT SPACES 00029000 00054 2 << THE TEXT IS "TABBED" OVER TO THE NEXT COLUMN THAT IS 00030000 00054 2 << A MULTIPLE OF TEN 000
each SPL/3000 procedure listed above). The LISTSL command shows the segments added and the names of entry points for each segment (in this case, there is only one entry point for each). Assuming we are logged-on in the PUB group of the SCC account, note that the SL le name is SL.PUB.SCC, so that the segmented library of the PUB group in the SCC account will have to be searched for these procedures. EXIT is typed to terminate Segmenter operation.
PRINT FWRITE 0 0 3 2 ? ? 001 USED 3000 AVAILABLE 2000 -EXIT END OF SUBSYSTEM EDIT/3000 is invoked using the MPE RUN command. The PARM=16 parameter is used since the segmented libraries need to be searched. The USERINIT procedure is called, which prints out \USERINIT 1.0" and \/S SHORT" and executes the EDIT/3000 command S [ET] SHORT. Since this procedure returns TRUE (see the listing above), both of the other two procedures will be invoked.
*COLUMN TEN,LINE THREE. 4 ARC*123 USERADD ENTERTED! ABC*123 5 // ... ;/LIST ALL USERCOMMAND ENTERED! LIST ALL 1 THIS IS LINE ONE. 2 THIS IS LINE TWO. 3 COLUMN TEN,LINE THREE.
A ASCII CHARACTER SET This appendix not available at this time.
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 clari cation is needed, the page number of a complete explanation of each command is provided.
Table B-1. Command Language Reference Chart Command ADD BEGIN Syntax ADD[Q] [linenumber ] To enter lines of [,HOLD[Q] [,NOW] ] text into the WORK le from an input le or from the HOLD le. BEGIN[Q] Used as the rst expression in a matching BEGIN-END pair.
Table B-1. Command Language Reference Chart (continued) Command Syntax Use To move portions of text from one location to another in the WORK le and renumber the lines. To copy text from the WORK le into the HOLD le. Example GATHER 50/55 TO 5.1 by .1 Lines 50 through 55 will be moved to begin at line 5.1 and will be renumbered in increments of .1. HOLD 100/150, APPEND Lines 100 through 150 are copied into the HOLD le and are appended to the text that already exists in the HOLD le.
Table B-1. Command Language Reference Chart (continued) Command Syntax MODIFY MODIFY[Q] range list NOT NOT OR OR PROCEDURE PROCEDURE [pname,[G] [P] [S] [range list] Q Qcharacter string REPLACE REPLACE[Q] rangelist [,HOLD[Q] [,NOW] ] B-4 COMMAND LANGUAGE Use To modify text in the WORK le using three operations: delete (D), insert (1), and replace (R). Causes setting of FLAG to be reversed after the next following expression is interpreted.
Table B-1. Command Language Reference Chart (continued) Command Syntax SET Use SET[FROM= linenumber ] [,DELTA= increment ] [,LEFT=colnum ] [,RIGHT=colnum ] [,LENGTH= colnum ] f f f f f f g g g g g g [, QUIET DISPLAY ] [, SHORT LONG ] [, BATCH POLL ] Example To alter options SET FROM=100 DELTA= 10, that are normally set by QUIET,SHORT the subsystem and that govern editing operations.
Table B-1. Command Language Reference Chart (continued) Command Syntax Use USE USE[ lename ] VERIFY VERIFY[ ALL option list ] WHILE WHILE[FLAG) XPLAIN f f To instruct EDIT/ 3000 to read commands from a user le but to send messages to and, normally, to expect text from the terminal. To obtain a reminder of the values of options declared in the SET command. Causes EDIT/3000 to iterate the next two edit expressions (or one, if FLAG is declared) until the rst one fails.
C WORK FILE RECOVERY EDIT/3000 creates a WORK le whenever an ADD, TEXT, or JOIN command is entered. This WORK le is a permanent le and is named by EDIT/3000 as follows: Kdddhhmm ^ ^ ^ | | | | | minute | hour of the day Julian day within year Note EDIT/3000 logic prevents duplicate names within a group. To recover a WORK le (for example, after a system crash), proceed as follows: 1. Enter an MPE/3000:LISTF command to determine the K number under which the WORK le was saved by EDIT/3000. 2.