Digital PDFs
Documents
Guest
Register
Log In
AA-D598A-TB
May 1978
346 pages
Original
10MB
view
download
Document:
AA D598A SOS Reference Manual Jul78
Order Number:
AA-D598A-TB
Revision:
0
Pages:
346
Original Filename:
AA_D598A_SOS_Reference_Manual_Jul78.pdf
OCR Text
TOPS·"10 SOS Reference Manual Order No. AA-D598A-TB July 1978 This document describes the elements of the TOPS-10 SOS Text Editor Program. OPERATING SYSTEM AND VERSION: TOPS-10, Version 6.03 SOFTWARE VERSION: SOS, Version 21 (134)+ To order additional copies of this document, contact the Software Distribution Center, Digital Equipment Corporation, Maynard, Massachusetts 01754 digital equipment corporation · maynard, massachusetts First Printing, July 1978 The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by DIGITAL or its affiliated companies. Copyr ight © 1978 by Dig i tal Equipment Corporation The postage-prepaid READER'S COMMENTS form on the last page of this document requests the user's critical evaluation to assist us in preparing future documentation. The following are trademarks of Digital Equipment Corporation: DIGITAL DEC PDP DECUS UNIBUS COMPUTER LABS COMTEX DDT DECCOMM ASSIST-II DECsystem-IO DEC tape DIBOL EDUSYSTEM FLIP CHIP FOCAL INDAC LAB-8 DECSYSTEM-20 RTS-8 MASSBUS OMNIBUS OS/8 PHA RSTS RSX TYPESET-8 TYPESET-II TMS-II ITPS-IO CONTENTS Page PREFACE CHAPTER CHAPTER CHAPTER xi 1 INTRODUCTION TO THE SOS PROGRAM 1-1 1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.5 1.6 1.7 1.8 CREATING A FILE ENDING SOS USING OPTIONS WITH SOS SOS CONTROL MODES Input Mode Alter Mode Edit Mode EDITING A FILE EDITING A FILE IN ANOTHER DIRECTORY RECALLING ARGUMENTS TO THE SOS COMMAND THE R SOS COMMAND 1-1 1-4 1-4 1-6 1-6 1-8 1-9 1-9 1-11 1-11 1-13 2 GIVING COMMANDS 2-1 2.1 2.2 2.2.1 2.2.2 2.3 2.4 2.4.1 2.4.2 2.5 2.5.1 2.5.2 COMMAND FORMATS COMMAND LEVELS SOS Input Line Format SOS Command Level Format CORRECTING TYPING ERRORS STOPPING A COMMAND Using CTRL/G Using CTRL/C GIVING COMMANDS IN AN INDIRECT COMMAND FILE Creating An Indirect Command File Using An Indirect Command File 2-1 2-2 2-3 2-4 2-5 2-5 2-5 2-6 2-7 2-7 2-8 3 USING MULTIPAGE FILES 3-1 3.1 3.2 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.4 SOS PAGE MARK FORMAT LINE AND PAGE NUMBERS SPECIAL CHARACTERS FOR LINE AND PAGE NUMBERS The Period (.) The Asterisk (*) The Up-arrow ("') The Exclamation (1) ARITHMETIC EXPRESSIONS WITH LINE AND PAGE NUMBERS 3-1 3-1 3-2 3-2 3-3 3-3 3-3 iii 3-4 CONTENTS (CONT.) Page 3.5 3.6 3.7 3.8 3.9 3.9.1 3.9.2 3.9.3 CHAPTER /4 CREATING MULTI PAGE FILES EDITING MULTI PAGE FILES DELETING LINES IN MULTIPAGE FILES KILLING PAGE MARKS IN MULTI PAGE FILES RENUMBERING LINES IN MULTI PAGE FILES Renumbering Your File Renumbering Using A Number Other Than 100 Wrap Around 3-5 3-7 3-10 3-13 3-14 3-15 3-16 3-16 USING SOS OPTIONS 4-1 OPTION FORMAT THE SWITCH.INI OPTION FILE SWITCH.INI Option File Line Formats Including An Option In Your SWITCH.INI File Multiple Lines/Formats within Your 4.2.3 SWITCH.INI File SETTING OPTIONS 4.3 Giving An Option with The SOS Command 4.3.1 Including An Option In An Indirect Command 4.3.2 File Setting An Option From Edit Mode 4.3.3 Finding The Status Of An Option 4.3.4 DESCRIPTION OF OPTIONS 4.4 BAK 4.4.1 BASIC 4.4.2 BIG 4.4.3 C64 4.4.4 C128 4.4.5 CASE 4.4.6 DECIDE 4.4.7 DELETE 4.4.8 DISK 4.4.9 4.4.10 DPY ERROR 4.4.11 4.4.12 EXPERT 4.4.13 INCREMENT ISAVE 4.4.14 LENGTH 4.4.15 4.4.16 LMAR LOCATION 4.4.17 4.4.18 LOWER 4.4.19 M33 M37 4.4.20 4.1 4.2 4.2.1 4.2.2 iv 4-1 4-1 4-2 4-2 4-3 4-4 4-5 4-6 4-6 4-7 4-7 4-8 4-9 4-11 4-12 4-13 4-14 4-15 4-17 4-18 4-19 4-21 4-22 4-23 4-25 4-27 4-28 4-29 4-30 4-33 4-34 CONTENTS (CONT.) Page 4.4.21 4.4.22 4.4.23 4.4.24 4.4.25 4.4.26 4.4.27 4.4.28 4.4.29 4.4.30 4.4.31 4.4.32 4.4.33 4.4.34 4.4.35 4.4.36 4.4.37 4.4.38 4.4.39 4.4.40 4.4.41 4.4.42 4.4.43 4.4.44 4.4.45 CHAPTER 4-36 4-37 4-38 4-39 4-40 4-41 4-42 4-44 4-45 4-46 4-47 4-48 4-49 4-50 4-51 4-53 4-54 4-55 4-56 4-57 4-58 4-59 4-60 4-61 4-62 MAXLN NAME NOBAK NODECIDE NODELETE NONSEPARATORS NONUMBER NOVICE NUMBER OLD OPTION Period (.) PLINES PMAR READONLY RMAR RUN SAVE SEPARATORS SEQUENCE START STEP STRING UNSEQUENCE UPPER 5 SOS COMMAND DESCRIPTIONS 5-1 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 5.12 5.13 5.14 5.15 5.16 5.17 5.18 5.19 5.20 <LF> <ESC> 5-3 5-5 5-7 5-9 5-11 5-13 5-17 5-31 5-37 5-39 5-43 5-47 5-51 5-57 5-61 5-63 5-69 5-71 5-73 5-75 LINEFEED COMMAND ESCAPE COMMAND MOVE COMMAND / SET COMMAND GIVE COMMAND @ INDIRECT COMMAND ALTER - A COMMAND COpy - C COMMAND DELETE - D COMMAND END - E COMMAND FIND - F COMMAND GO - G COMMAND HELP - H COMMAND INSERT - I COMMAND JOIN - J COMMAND JUSTIFICATION - JC, JL, JR, JU, JW COMMANDS KILL - K COMMAND LIST - L COMMAND MARK - M COMMAND NUMBER - N COMMAND v CONTENTS (CONT.) Page CHAPTER 5.21 5.22 5.23 5.24 5.25 5.26 5.27 PRINT - P COMMAND REPLACE - R COMMAND SUBSTITUTE - S COMMAND TRANSFER - T COMMAND INVERT - VV, VL, VU COMMANDS WORLD (SAVE-THE-WORLD) - W COMMAND EXTEND - X COMMAND 5-79 5-81 5-85 5-93 5-99 5-101 5-105 6 UPPERCASE, LOWERCASE, AND SPECIAL CHARACTERS 6-1 6.1 6.2 6.2.1 SOS AND YOUR TERMINAL SETTING TERMINAL TYPE: UPPERCASE-ONLY Typing Uppercase On Uppercase-Only Terminals Typing Lowercase On Uppercase-Only Terminals TERMINAL TYPE: UPPERCASE-LOWERCASE Typing Uppercase On Uppercase-Lowercase Terminals Typing Lowercase On Uppercase-Lowercase Terminals TYPING SPECIAL CHARACTERS 6-1 6-2 6.2.2 6.3 6.3.1 6.3.2 6.4 CHAPTER 7 6-6 6-7 6-7 7-1 7-1 7-2 7-2 7.4 8 LINE CONTENTS SPECIFICATIONS 8-1 8.1 8.2 8.3 LINE CONTENTS COMMAND FORMATS LINE CONTENTS SPECIFICATION EXAMPLES LINE CONTENTS SPECIFICATION IN THE SUBSTITUTE COMMAND 8-1 8-2 9 SOS FILE BACKUP 9-1 9.1 9.2 9.2.1 9.2.2 9.3 9.3.1 THE WORLD (SAVE-THE-WORLD) COMMAND THE AUTO-SAVE FEATURE File Backup While Inputting File Backup While Editing SAVING YOUR FILE Ending SOS Saving The Line Numbers 9-1 9-2 9-2 9-2 9-3 9-3 7.3.2 CHAPTER 6-3 6-6 COMMAND FORMAT DEFINITION SPECIAL MODE - /C128 SPECIAL MATCHING CHARACTERS Character Match, without Character Specification . Character Match, with Character Specification SPECIAL REPLACEMENT CHARACTERS 7.1 7.2 7.3 7.3.1 CHAPTER SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS 6-2 vi 7-3 7-4 7-6 8-5 CONTENTS (CONT.) Page CHAPTER 9.3.2 9.3.3 9.3.4 9.4 9.5 9.5.1 9.5.2 9.5.3 9.5.4 Ending SOS without Saving The Line Numbers Ending SOS with No Backup File Ending SOS without Saving The File SOS BACKUP FILES "INSUFFICIENT DISK SPACE - WELL?" MESSAGE Well? - G Response Well? - T Response Well? - R Response Well? - W Response 9-4 9-5 9-6 9-6 9-9 9-10 9-10 9-11 9-11 10 HOW SOS HANDLES FILES AND BUFFERS 10-1 10.1 HOW SOS KEEPS THE CURRENT FILE IN MEMORY 10.1.1 The Memory Buffer 10.1.2 The nnnSOS.TEM File 10.1.3 The nnnSOS.TMP File 10.1.4 Using the nnnSOS.TEM and nnnSOS.TMP Files 10.2 WHAT HAPPENS TO YOUR FILES AFTER AN E, G, OR W COMMAND? 10.2.1 Turning Off The Backup System - /NOBAK Option 10.2.2 Keeping A Permanent Backup File - /OLD Option 10.3 RECOVERING FROM A SYSTEM CRASH 10-1 10-2 10-2 10-3 10-3 10-9 10-13 10-13 10-14 APPENDIX A SUMMARY OF SOS COMMANDS A-I APPENDIX B SUMMARY OF SOS OPTIONS B-1 APPENDIX C SOS CHARACTER TABLE C-l APPENDIX 0 TOPS-I0 STANDARD FILE EXTENSIONS 0-1 APPENDIX E SOS ERROR MESSAGES E-l Index-l INDEX vii CONTENTS (CONT.) Page TABLES TABLE 6-1 A-I B-1 C-l C-2 0-1 Special Characters and Their C128 Representation Symbols Used For Line/Page Numbers Summary of SOS Options SOS Character Set ANSI Character Names TOPS-IO Standard File Extensions viii 6-8 A-I B-2 C-2 C-3 0-1 Please read the Preface before reading the rest of the manual. ix PREFACE This is a complete reference manual for the SOS text editor, a TOPS-IO utility program. It is written for the beginner who is familiar with other text editors, as well as for the experienced SOS user needing reference material for the SOS program. This manual assumes the comput~r you use has a TOPS-IO monitor and you know how to log in. It also assumes that you have read the following manual: SOS User's Guide (DEC-IO-USOSA-A-D) Copies of this manual can Distribution Center. be purchased through DIGITAL'S Software If you find any errors in this manual, please fill out and mail the Reader's Comment Card found at the back of this manual. All reported errors in the documentation of this manual will be corrected as soon as possible. Updates to this manual can be purchased separately and can be obtained from the Software Distribution Center. Chapter 1, Introduction To The SOS. Program, can be used for all SOS users. as a review Chapter 4, Using SOS Options, and Chapter 5, SOS Command Descriptions, are printed on blue paper for ease in reference. Examples in this manual use files containing text and programs. Some of the examples show how to correct spelling and punctuation errors. Because you need not be familiar with any programming languages, the word "filespec" is used to refer to the full file specifications that can be used in SOS. The TOPS-IO SOS Reference Card is a pocket guide listing all commands, options, special features, and error messages. reference card is included in the packaging of this manual. xi SOS One Symbols Used In This Manual Symbol Meaning *P500:700 Anything you type on your terminal appears in red. Anything the system prints on ~our terminal appears in black. Press the key labeled RETURN or CR. Press the key labeled DELETE or RUBOUT. Press the key labeled ESC, ESCAPE, ALT, or PRE. Press the key labeled LINEFEED or LF. Press the space bar onc~o Press the key labeled BACKSPACE. Press the key labeled TAB labeled CTRL and I together. or press [] Brackets enclose all optional arguments. () Parentheses argument. enclose xii the name or the value keys of an CHAPTER 1 INTRODUCTION TO THE SOS PROGRAM This chapter describes the various formats of the SOS and R SOS commands that start the SOS program. This chapter also describes the control modes and the commands that allow you to exit from SOS. Before you can start SOS, you must log in to the TOPS-IO system. either the SOS or the R SOS command to create or edit a file. Give NOTE The SOS command is used in all the descriptions and examples throughout this manual. See Section 1.8 for a description of the R SOS command. 1.1 CREATING A FILE When you issue the SOS command, SOS responds with a word called a keyword. The keyword may be either FILE: or INPUT:, depending on whether you had named the file or not. To create a new file, select a file specification that does not already exist and give it either as an argument to the SOS command or as an argument to the SOS keyword FILE:. For example, .80S FACTOR. MAC~ INPUT: FACTOR.MAC 00100 or .80S~ f' ILE: FACTOR. MAC G!:D INPUT: FACTOR.MAC 00100 In the first example, you type SOS and the new file specification, press RETURN, and SOS will print INPUT:. In the second example, you type SOS and press RETURN, and SOS will print FILE:. In either case, you type the file specification as an argument, then press RETURN. SOS creates that new file, prints INPUT: followed by the file specification, and prints the default line number 00100. Now you can start entering the contents of your file. 1-1 INTRODUCTION TO THE SOS PROGRAM The default line number 00100 can be changed with the START option. Each time you press RETURN (carriage return), SOS gives a new line and line number. The filename may be from one to six alphanumeric characters (A through Z and 0 through 9). No special char~cters are allowed. If you use any character other than A through Z or 0 through 9, SOS will respond with the error message: ? ILLEGAL CHAR IN CMD and will then prompt you with the keyword FILE:. You must then specify new file specification or press Control C (CTRL/C) to return to the TOPS-IO monitor. If you specify more than six characters as a filename, SOS will recognize only the first six characters. For example, CD • • SOS A:r.BCD. xxx G!D ? ILLEGAL CHAR IN CMD FILE: '"'C t (nRLll) GO • • SOS ABCDEFGH I JK • XXX ~ INPUT: ABCDEF.XXX 00100 The period character (.) is the only character that can be used as the separator between the filename and the file extension. The file extension may be from one to three alphanumeric characters (A through Z and 0 through 9). No special characters are allowed. If you specify more than three characters, SOS will recognize only the first three characters. The file extension may be omitted. For example, GO + • SOS ABeD.! 214 G!D ? ILLEGAL CHAR IN CMD FILE: ABCD.123456789G!D INPUT: ABCD.123 00100 NOTE If you want your file to contain a program, use one of the standard extensions as your file extension. Refer to Appendix D, TOPS-IO Standard File Extensions, for a complete list of system file extensions. 1-2 INTRODUCTION TO THE SOS PROGRAM If you have read/write privileges to another directory, you may specify a device before th~ filename and extension and a path specification and protection code after the filename and extension. This is referred to as a full file specification. For example, GD I~' I',• S' E:. . 'T' X 'r [ ':)'7 Y 1 3 I::' 0:.-"> fIi[l"""\ S·0• <:) ,.) ow 1.:' . , (".~ •• S' "'" AM f:' L .. ~ J' <"• 0 ,J"",J. ~ to "'" 4- INPUT: DSKC:SAMPLE.TXTl27,135J 00100 (Refer to Section 1.6 for additional information on editing files in another directory. Refer to Chapter 2, Giving Commands, for a complete description of full file specifications.) If you already have a file in your directory with the filename and file extension that you specified in the SOS command, SOS prints EDIT: and your file specification. (You are now in Edit mode and not in Input mode.) If you do not want to edit the current file, give the EO command to exit from the SOS session, and then respecify the SOS command with a new file specification. For example, CD <:'OC' 'C'AMf:'LC l'X'T' rRfT\ \.);:) 1:. . . . \ ~ .~ EDIT: SAMPLE. TXT *EO GE0 .!:;os~ F 11... [ : SAMPLE. DI~T ~ INPUT: SAMPLE.DAT 00100 SOS will not let you inadvertently destroy your file SOS at TOPS-10 command level. when you start After you give the SOS command and your new file specification, you may enter the contents of your file. If you make typing errors, press DELETE to delete one character at a time or press BACKSPACE to move the cursor (of a display terminal) backward one character at a time. These editing characters operate only on the current line. After you press RETURN, you must give other SOS commands to change the contents of the line. (Refer to Section 2.3, Correcting Typing Errors, for more information and examples.) When you finish entering the contents of your file, press ESCape. SOS will then print an asterisk (*), which indicates that SOS is at command level in Edit mode. To end the SOS session and save the file, type E and ~ress RETURN. For example, CD C'()<:' ",.) .... ) 'L C'J"rE-f" 'J'X'T' ~HET •• 1:. . • • \ • . \ ~ INPUT: LETTER.TXT 00:1.00 THIS IS LINE toO OF I... ETTER.TXT G2) OO~!OO THIS IS LINE 20() OF LETTER. TXT GD OO~~()O $ t *E~ GD 1-3 INTRODUCTION TO THE SOS PROGRAM Remember, after you press ESCape, SOS prints an asterisk (*). You can then give any sequence of SOS commands that helps prepare your file. Each file you create is kept in your default directory path unless you specify a different path following the filnam.ext for another directory where you have read/write privileges. 102 ENDING SOS Give the End command to end SOS and save your file. Give the Go command to end SOS, save your file, and execute the last COMPILE, EXECUTE, LOAD, or DEBUG command that was given at TOPS-IO command level. When you give a command that saves your file (End, Go or World), SOS creates a backup file as well, by assigning your previous file the same name but a file extension beginning with a Q. This happens because the BAK option is turned on when you start SOS. To alter this default, set the /NOBAK option. If you specify the NOBAK option in an SOS session, SOS does not rename your previous file. (Refer to Section 4.4.16 for a description of the NOBAK option.) The World (Save-the-World) command saves your file as described, but does not end the SOS session. One of the following options can be used with the End command when you save your file: 1. The B option suppresses the creation of the .Qxt and .Zxt backup file. The .Zxt file is only created when the /OLD option is set, i.e., the B option overrides the /OLD option. 2. The D option suppresses the saving of your edited deletes your original file from your directory. file and 3. The Q option suppresses the saving of your edited exits from SOS leaving your original file intact. file and 4. The S option unsequences (removes the line numbers) edited file before saving it. from your If no option is specified with the E, G, or W command, your file is saved as it appears, including the line numbers. (Refer to Chapter 5 for further descriptions and command formats of the E, G, and W commands and their options.) 1.3 USING OPTIONS WITH SOS The SOS program includes various switches (referred to as options in this manual) that allow you to tailor the SOS program to your needs. Some of these options are automatically turned on (for example BAK, which backs up your file). Other options are automatically turned off (for example LOWER, which allows lowercase character input). In addition, other options contain a value (for example MAXLN, which specifies the maximum number of input lines per page for your file). 1-4 INTRODUCTION TO THE SOS PROGRAM By setting one or more options with the SOS command (or during an SOS session), you can turn the options on or off and also change the options that contain a value. (Refer to Chapter 4, Using SOS Options, for a complete description of all the available SOS options and their uses. ) To set options, use a command of the following form: .SOS/STAPT: 10/C12n.lEXF'EF;:T~ FILl:: TEXT. F;:NO ~ INPUT: TEXT .I:;:NO 00010 As the example above shows, you type SOS followed by a slash (Set option command) and the desired option. A slash character (I) must precede each option that you specify. You then press RETURN and SOS prints FILE:. Now you can type the file specification. Although spaces and tabs are allowed between options, they are not allowed in the file specification. When specifying SOS options with formats you can use. They are: the SOS command, , GO • SOS ABeD t TXT IC128/SEF'AF~AT()RS/START: 10 QB INPUT: ABCIt.TXT 00010 or c=~) • SOS/C128/SEPAF;:ATOf<S/S rAF:T : 1 0 'ABeD. TXT GIO INPUT: ABCD.TXT 00010 or .508 ~ FILE: .lC 128/SEPAR(~TOF~~:;/STAR'i : 10' ABeD. TXT G:t!) INPUT: ABCD.TXT 00010 or .~)o~:; ~ F I L E; ABC D • TXT.I C :L ? B.I S E F' AF:: AT U~: S.l ~; T (.) f< T : :l 0 GB INPUT: ABell. TXT 0001.0 1-5 there are four INTRODUCTION TO THE SOS PROGRAM If you try to set a nonexistent option when you start SOS, the SOS program prints ?ILLEGAL SWITCH, followed by FILE: • You must then retype the file specification and the desired options. For example, , GO .SOS SAMPLE. TXT/C128/SFF'Ef~AT()RS~ '!' ILLEGAL SWITCH F I I... E t ~; AMP l.. F • TXT.I C 1 ? B.I S E F' ARAT 0 R S GO INPUT: SAMPLE. TXT 00100 1.4 SOS CONTROL MODES three basic control SOS has the following initiate through the SOS command level: 1. Input (See Section 1.4.1.) 2. Alter (See Section 1.4.2.) 3. Edit (See Section 1.4.3.) modes, which you can Other modes can exist, such as BASIC, EXPERT, and READONLY, which you can initiate with any of the SOS options. (Refer to Chapter 4, Using SOS Options, for a complete description of these options.) 1.4.1 Input Mode You can use Input mode to create a file. SOS in Input mode by printing a line number as a line number is 00100 with increments of 100. use the INCREMENT and START options described indicates that you are prompt. The SOS default To change this default, in Chapter 4. You can start Input mode in four ways: 1. By crea~ing a new file a new file. Type the input file specification for automatically starts out in Input mode. For example, SOS GO ~~;U~:; ~ COBOl... CBl.. ~ I NF'UT! COBOl... ,. CDI... OOlO() 00200 00300 0040() *F~ IDENTIFIC(.)TION DIVISION ~ !:>AMPLE ~ t"IUTHOP. DIGITAL,. GD PROGf<i~M"" I D ,. ~~ t ~ CD~:; I'; C : COB 0 l.. • C II I... I:: 2"/ ~ ~:j :I. 0 "/ J J In this example, you type the contents of the line and then press RETURN. SOS then generates the next line number in Input mode. This mode continues until you press ESCape. 1-6 INTRODUCTION TO THE 50S PROGRAM 2. By editing a nonexistent file When you attempt to edit a file that does not exist, the program creates the file and initiates Input mode. example, SOS For CD (",'" + ("' ,JO,;) CABO!.... LHL.. ~ INPUT: CABOI....CBl.. " 00:1.00 " ' $ t GD *FCl ~ If you do not want to create this new file, press ESCape to end Input mode. When an asterisk appears, type EQ and press RETURN to end the SOS session without saving the file. 3. By editing an existing file with the Insert command To edit an existing file, you may use the Insert enter Input mode. For example, command to , G:) • SOS COBOL. CFL ~) EDIT: COBOL.CBL *1400 G:0:) 00400 ENJIRONMEN'; DIVISION. GTD 00500 DATE DIVISIUN •• t G~ * SOS will corytinue in this mode if you are inserting lines at the end of your file or at the end of a page in your file. To return to Edit mode, press ESCape to end Input mode. 4. By editing an existing file with the Replace command To edit an existing file, you may use the Replace command enter Input mode. For example, to , CD .80S COBOL. eBL GIO E D I l: C () B () L.. • C til" *R::j()O ~ ()O~:j()() CONF I GURAT ION SECT I ON. ~ 0()600 00700 $ SOURCE"-COMPUTEF~. DECSYSTEM-·,:1. 0 + ~ G6 1 LINES (00500/1) DELETED * SOS will continue in this mode if you are replacing lines at the end of your file or at the end of a page in your file. To return to Edit mode, press ESCape to end Input mode. 1-7 INTRODUCTION TO THE SOS PROGRAM 1.4.2 Alter Mode When you are in Alter Mode, you can change or correct a file character by character. To enter Alter mode from the SOS command level, type A and a specific line number or range of line numbers. Alter mode contains its own instructions which do not echo on the terminal. When you use these Alter instructions, the content of the line being altered does echo on the terminal. See Chapter 5, SOS Command Descriptions, for a further description of the Alter command. In the following example you create a file, press enter Alter mode by typing A and a line number. ESCape, and then GO • • SOS SAMPLE. TXT ~ INPUT: SAMPLE.TXT 00100 THIS IS PAGE TWO, 00200 THIS IS PAGE ONE, 00300 THIS IS PAGE ONE, 00400 THIS IS PAGE TWO, 00500 LINE TWO LINE TWO LINE FOUR LINE FOUR $ t GD *Al00~ 00100 THIS IS PAGE \\TWO\\ONE, LINE TWO\\TWO\\ONE t t 3W *P100~ 00100 t 3eONE 3W t ""-3DIONE GQGiD THIS IS PAGE ONE, LINE ONE * In the following example, you edit an existing file and mode by typing A and a specific range of line numbers. enter T S"AMPLE. TXT ~ EDIT: SAMPL.E.TXT • SOS *A300 : 400 ~ 00300 00400 THIS IS PAGE ONE, LINE \\FOUR\\THREE t t W W - t t W W W W 4DITHREE ~GID THIS IS PAGE TWO\\TWO\\ONE, LINE FOUR - - t t t W W W .... t 3DIONE GD~ *P300:400 ~ 00300 THIS IS PAGE ONE, LINE THREE 00400 THI~~ IS PAGE ONE, LINE FOUR *E~ [DSKC:SAMPLE.TXT(27,5107JJ You can change from one mode to another during any SOS session. 1-8 Alter INTRODUCTION TO THE SOS PROGRAM 1.4.3 Edit Mode You are in Edit mode when you change or edit an existing file on a line-by-line basis. You can also be in Edit mode after you create a file and before you end an SOS session. An asterisk (*) prompt character indicates that you are in Edit mode. GO <.~ (I C' '(" (') I: 0 L C' B, L.. r;;;:;-"\. ~':>'''>J,3. ~ EDIT: COBOL.CBL *D400 ~ 1 LINES (00400/1) DELETED *F' 1 00 : ~)()() CJ:0 00l()0 00200 00300 005()0 IDENTIFICATION DIVISION. PROGRAM ID. SAMPLE AUTHOR. DIGITAL. THIS IS AN SOS EXAMPLE DATA-DIVISION. * Once you are in Edit mode, you can type in any of the program-level commands described in Chapter 5 and Appendix A. 1.5 SOS EDITING A FILE To correct (edit) an existing file, type the SOS command with the proper file specification and any options desired. (You can specify the options before the file specification or after it.) GO c 0, c: '(" A, MI::' L, E",_ • 'T' X 'T' / / ("., 1 ') (:) 1 I'.I E"_(~ I [.I f.7_ r:-;::;"'\ .;:) ..,.:> ~ EDIT: SAMPL..E.TXT A_ (;) J * or GQ .SOS/C128/DECIDE 'SAMPLE. TXT GEO EDIT: SAMPLE. TXT * SOS prints When you start SOS to edit a file, specification, and an asterisk which is the character. EDIT:, your file Edit mode prompt Every SOS command format shown in Section 1.1 allows you to specify a new file specification for an existing file by using the equal sign character (=). In the example below, you can specify a new file, TEST.TXT, to be edited from the existing file, SAMPLE.TXT. , GQ .80S TEST. TXT;::;SAMPLE. TXT ~ EDIT: SAMPLE. TXT * 1-9 INTRODUCTION TO THE SOS PROGRAM SOS options can be included either before or after the file specification. If you specify a file specification that does not exist, SOS prints INPUT: instead of EDIT:. CjD • SOS/EXPERT' ABCD. TXT::::WXYZ. TXT GIQ INPUT: WXYl.TXT 00100 The example above shows that when you specify the EXPERT option and a new file specification of ABCD.TXT for a WXYZ.TXT file specification that does not exist, SOS will create this file. To check that the ABCD.TXT file was created, use the NAME option of the Give (=) command; SOS will print the output file specification. For example, 00100 $ t GD *::::NAME~ DSI':C: ABeD. TXT * When you use the 50S tormat with the equal sign (=) character, SOS preserves the existing copy of your file and saves the changes in a file stored separately. To change your file, use any of the SOS commands listed in Chapter 5, SOS Command Descriptions, or Appendix A. When you have completed editing your file, give the E command to save your file. SOS then prints the name of the saved edited file. For example, , ~ ~S()S EDIT: l.IBAI:;;Y. TXT=::STAT. TXT GB STAT.TXT *D200: 3()0 0iD 2 LINES (00200/1:00300) DELETED *E~ [DSKC:LIBARY.TXT[27,5107JJ In the example above, STAT.TXT remains intact and LIBARY.TXT contains the results of the single SOS change. If you specify a file that does not exist, SOS will create that file as you have specified. If you do not want to create the file, press ESCape, and then give the EQ command. 1-10 INTRODUCTION TO THE SOS PROGRAM 1.6 EDITING A FILE IN ANOTHER DIRECTORY To edit a file that is in another SOS command, thus creating the SOS command format is similiar to specification. (See Section 1.5, directory, access that file with the edited file in your directory. This that used to rename the output file Editing A File.) CJD C\ (l.\.. c, • M..'I' NE:'. . .'T. ' '/\ 'T' :::: vI ('). .II. r,\ D (:) -.1' r"i 'J f'""RET\ .. i' 'T' .x \ 'T' C' •. ') '7' • ') '-\:>~. ~ .. ~ 4... EDIT: YDURS.TXT[27y235J *~::NAME ~ DSKC:MINEtTXTl27,5107J *E~ [ [I S KC t MIN E + TXT [: 27 , ~) 1 07 J ] In this example, you automatically create the file MINE.TXT in your directory from the file YOURS.TXT in the directory whose directory path is [27,235]. You can specify SOS options with this format and you can give any SOS commands to change the contents of the file MINE.TXT. NOTE An alternative' procedure for editing a file located in another directory is to use the TOPS-IO monitor command COPY. This command places an image of the file in your directory path. After editing it there, you may copy it back into the original directory. If you have read/write privileges for another path (directory), you can create or edit a file in place with SOS when you specify a full file specification. 1.7 RECALLING ARGUMENTS TO THE SOS COMMAND When you type arguments (options and file specifications) to an SOS command and that command successfully starts SOS, the TOPS-IO monitor remembers those arguments. If you give a subsequent SOS command but do not give any arg~ments, the monitor supplies the arguments from your last SOS command. Thus you can create a file, run another program, and return to edit the file without retyping the arguments. In the following example, you create a file and then edit it. The second SOS command uses the arguments you typed in the first SOS command. 1-11 INTRODUCTION TO THE SOS PROGRAM G) .SOS/C128/SEPARATORS/DECIDE/START:10'SAMPLE.TXT~ INPUT: SAMPLE.TXT 00010 THIS IS LINE ONE, PAGE ONE.~ 00110 4$ Gb [DSKC:SAMPLE.TXTJ • 50S Q:0) EDIT: SAMPLE. TXT *::::CASE~ MODEL 37 SEPARATORS UPPER * =~DECI[lE G!2) AUTO DECIDE *=:STAf<T ~ 10 :+: If you specify a file specification that is different from the previous SOS command, SOS tries to create the file you specified. At the same time, SOS uses the options from the previous SOS command. For example, , GQ .SOS/C1.28/DECIDE/START:l0/INCREMENT:l() SAMPLE.TXT~ INPUT: SAMPLE.TXT 00010 THIS IS LINE ONE, PAGE ONE.~ 00020 $ t *£~ ~ [DSKC:SAMPLE.TXTJ GO t SOS' TEXT()l. TXT G!.D INPUT: TEXT01.TXT 00010 $ t * GD ::::NAME G!2) DSKC:TEXT01.TXl *::::CASE~ MODEl. 37 UPPER *'==DECIDE QID AUTO DECIDE *:=INC~ 10 * A SWITCH.INI option file in your logged-in PPN (project-programmer number) allows you to automatically set the options you want for each SOS session. (Refer to Chapter 4, Using SOS Options, for more detailed information about the SWITCH.INI option file and how to use it. ) 1-12 INTRODUCTION TO THE SOS PROGRAM 1.8 THE R SOS "COMMAND The R SOS command starts an SOS session so that you can create and/or edit a file. The R command is equivalent to RUN SYS:SOS.EXE at TOPS-IO monitor command level. You can use various formats of this command with SOS. For example, G) . .. ~ R-'e,os' ;:) ~ FILE: ABCD. TXT IC 128/SEPAf<ATOF<~:)/STAr\T: 10 GIO INPUT: ABCD.TXT 00010 or G) .S F\", ; :C') 0 S r-;;;-;-"\ ~ FILE: INPUT: QQ /C128/SEF'AF<AT()F~~:;/STAr-<T: 10' ABeD. TXTGID ABCD.TXT 00010 or CD .R'SOS-ABCDtTXT/C128/START:l0 INPUT: ABCD.TXT OO()10 or GQ G) ~ + RSS (] S ""- I C :J. 28/ S T A F(f : 1 0 ABC D • TXT INPUT: ABeD. TXT ~ 00010 As these examples show, you can specify the file specification either before or after the options when using the R SOS command. If your file specifications are for an existing file in your directory, the keyword INPUT: is substituted for the keyword EDIT:. As with the SOS command discussed in Section 1.5, you can use the equal sign (=) character to specify a new file specification when you give the R SOS command to create a new file in your directory. This form of the R SOS command renames your edited file. For example, , GQ .R SOS~ FILE: SAMPLE. TXT::::LETTER. TXT ~ EDIT: LETTER.TXT *=NAME ~ SAMF'LE.TXT * 1-13 INTRODUCTION TO THE SOS PROGRAM 1-14 CHAPTER 2 GIVING COMMANDS To set your terminal's physical characteristics, use the TOPS-IO command: SET TTY with arguments WIDTH, SPEED, PAGE, and so forth. There are four command formats you can use to enter SOS. there are two command levels. 2.1 Within SOS, COMMAND FORMATS The formats you can use to enter SOS are: 1. 2. .SOS ~ FILE: output.ext=input.ext/switches .SOS G!D FILE: /switches output.ext=input.ext ~ ~ 3. .SOS/switches output.ext=input.ext G!D 4. .SOS output.ext=input.ext/switches G!D SOS requires that input. ext represents a new file or an existing file. The /switches can be one or more settable options. If SOS encounters an illegal option (switch), it ignores the all specified options and the file specification and prompts you with the word FILE:. You must then respecify your options and file specification. The input.ext and output.ext are the basic TOPS-IO file specifications. When you do not specify an output file specification in the SOS command, the input.ext is used. The input.ext may become a backup file (.Qxt or .Zxt), depending on the options (switches) set. If no backup file is to be created, output.ext may be used in a later SOS session as the input. ext. Otherwise, input.ext contains all of the changes made during an SOS session. Full file specifications may appear in the following format: dev:filnam.ext[p,pn,sfdl,sfd2,sfd3,sfd4,sfd5]<nnn) 2-1 GIVING COMMANDS Where: dev: is a device (e.g., SYS:, DSKC:). filnam is a filename with characters. .ext is a file extension with alphanumeric characters. 6 or less alphanumeric 3 or less [p,pn,sfdl, ••• ] is a directory path. The p,pn must be a project, programmer number. You may specify up to 5 sub-file-directories (sfd) within the directory path. The square brackets must be included if the directory path is specified. <nnn> is a file protection code. brackets must be included protection code is specified. if The angle the file Defaults: dev: for all but /RUN: option, the default is DSK:. For the /RUN: option, the default is SYS:. filnam has no default. supplied. • ext has no default as this argument is optional • For the /RUN: option, .EXE is the default. (Refer to Appendix D for a complete list of TOPS-IO standard file extensions.) This argument must be [p,pn,sfdl, ••• ] is your default path. <nnn> 2.2 is a TOPS-IO system default protection usually <055>. code, COMMAND LEVELS There are two command levels in SOS: 1. SOS command level 2. SOS input level An asterisk prompt character indicates that you are at SOS command level. A line number indicates that you are in SOS input level. To move between these two levels, press ESCape or give the Insert command. 2-2 GIVING COMMANDS 2.2.1 50S Input Line Format The format for 50S input level is: line number <TAB> line contents The line number consists of five ASCII numeric characters and may be any number up to 99999 that you specify with the Insert command and/or the MAXLN option. The <TAB> is a single ASCII character that appears as three spaces on your terminal following the'line number. The spaces do not count as line positions, and some terminals do not show the <TAB> spacing. When you press <TAB> while inputting the contents of your file, the pointer will move from one to eight spaces to the right. In this way, your terminal is like a typewriter with tab positions every eight positions. This <TAB> spacing will count as the number of positions the pointer is moved to the right. If you are creating or editing a file that is to be used as input to a program or utility, the line numbers and <TAB> may be counted as line positions. In some instances, you may reference the line numbers with the program or utility. Refer to the program or utility manual for information on the validity of referencing line numbers as positions. The line contents may be any character~ you enter and a line contain up to 497 characters per line including spaces and tabs. may If you press ESCape at the end of the line, you end SOS input level and enter SOS command level. If you press RETURN at the end of the line, you remain at SOS input level and SOS automatically types a new line number. NOTE If you press either ESCape or RETURN at the end of the line, 50S automatically inserts a carriage return-line feed as its line terminator. 2-3 GIVING COMMANDS 2.2.2 50S Command Level Format The format for SOS command level is: * (command) and any or none of the following: (line) (page) (position) (range) (content) (number) (option). Where: command may be any of the SOS commands described in Chapter 5, including the special characters used to move or locate the pointer. line may be any existing or nonexisting line number, line content, special characters, or arithmetic characters and a number. page may be any page number, existing nonexisting, special characters, arithmetic characters and a number. position may be any line or page number, or any of the following special characters: * or or for current line or current page for first line or first page for last line or last page range may be a position or line/page number with either an exclamation mark (!) or colon (:) and another position or line/page number. content may be any string of existing characters in your file and/or nonexisting characters in your file separated by the ESCape key character, and an optional range specifying line/page numbers and special options. number may be any positive integer less than 2 35. option may be anyone of the following options: ft A enter Alter mode (Find command) D decide on each substitution command) E match uppercase/lowercase characters exactly (Find and Substitute commands) N do not print contents of line (Find Substitute commands) S do not print line numbers (List and Print commands) and do not print contents of line (eXtend command) 2-4 (Substitute and GIVI.NG COMMANDS 2.3 CORRECTING TYPING ERRORS To correct typing mistakes while creating or editing a use any of four commands listed below: 1. DELETE (or RUBOUT) 2. BACKSPACE key 3. CTRL/R 4. CTRL/U file in SOS, key These four commands operate in SOS just as command level. they do in the TOPS-IO NOTE Depending on your terminal's physical characteristics, CTRL/R and CTRL/U may or may not echo on your terminal. 2.4 STOPPING A COMMAND within the SOS program are two stop an SOS command. commands that may To issue a control-character command, press the key labeled the alphabetic character at the same time. CTRL and 1. CTRL/G 2. CTRL/C 2.4.1 control-character Using CTRL/G To cancel any SOS command before you complete it with a carriage return, type ~TRL/G twice. For example, suppose you begin to type in a Substitute command and then decide to cancel it before you finish. You simply type two CTRL/Gs and SOS then prints the asterisk prompt character, indicating a return to SOS command level • • son NlJMBEI:~ + FOR QB Edit: NUMBER~FOR *~:):L 02~;:L 03 t ~ t (CTRUC') (CTRUL) * CTRL/G will cancel the command and return you to SOS command level so that you can retype the SOS command. You must use CTRL/G twice before you press RETURN. You need not press RETURN after typing CTRL/G twice. 2-5 GIviNG COMMANDS 2.4.2 Using CTRL/C After you type an SOS command and terminate it by pressing the RETURN key, you may desire to stop the command if, for example, it were printing more than you need. When you type a CTRL/C, SOS stops the command execution and prints: YES? (TYPE H FOR HELP) : When you give the Find, Print, and substitute commands, however, you must type two CTRL/Cs. The command will stop exactly where you typed the CTRL/Cs. When SOS prints YES? (TYPE H FOR HELP): one of the following six letters: Symbol and stops, you must type in Meaning C continues the command at the place where you typed the CTRL/C. You must press RETURN to get the asterisk prompt character to return to the terminal screen. E Ends the command, ends the SOS session, and saves the file just as if you gave an End command. Only the substitutions that were printed on your terminal are included in the file. You must press RETURN after typing an E to make this command work properly. Q Quits the SOS session without saving the changes you made since you started editing the file or since the last World command. Typing Q gives the same results as giving an EQ command at SOS command level. M Moves you to TOPS-lO monitor command level. You may give any TOPS-lO command. If you give one that does not change the contents of memory, you may continue the SOS session without having affected the file in any way. You simply give the TOPS-lO command CONTINUE and press RETURN twice. If you do give a TOPS-lO command that alters the contents of memory, you will lose your previous edits back to the last backup of your file. R Returns you to the SOS command level after terminating the current command. Any substitutions that were printed on your terminal are included in the file. You must press RETURN after typing the R to get the asterisk prompt character to appear on your terminal. H Prints a list of the responses you question. 2-6 can give to the YES? GIVING COMMANDS The following example shows how unsuccessful Substitute command. R to return to SOS command level. to use two CTRL/Cs to halt an The example shows typing H and then , GQ • SOS NUMBER. FOR GIQ E,ji t: NUMBER. FOR STYPEt F'RINTl ~ * ~~ PRINT 101 00200 (nRL/c) (CTRL/l) (T~pe H for help): H one of: C - to CONTinue automaticall~ E - to end edit and close file Q - to Guit <delete temporar~ files) M - return to MONITOR now R - to do REEnter (terminate losins search etc.) Yes? (T~pe H for help): R ~ Yes? T~pe * 2.5 GIVING COMMANDS IN AN INDIRECT COMMAND FILE An indirect you may use command and containing commands in additional file. ) 2.5.1 command file is a file of SOS commands and options that frequently during any SOS session. Using the @ (indirect) the file specification of the indirect command file the SOS commands (and options), SOS will execute those (Refer to Section 4.3.2 for the file you are editing. information on including options in an indirect command Creating An Indirect Command File When you create an indirect command file, you may specify the letters CMD as a file extension, but these three letters are not necessary for the execution of an indirect command file, because you can use any three alphanumeric characters or none at all. The filename specification may be one to six alphanumeric characters. You can create an indirect command file for a commonly used SOS Print command sequence. This file when executed will print an entire file from the first line of the first page to the last line of the last page. , ~ + SOS P + CMD ~ INPUT: P.CMD 00l()() p,",/r': 00200 $ *1* GI0 t ~ r: DB~:C : P + CMD] 2-7 GIVING COMMANDS You can create an indirect command file for SOS options that are only on specific occasions. For example, used GQ • 50S· OPT. CMD 0iD Input: 00100 00200 00300 00400 *E~ IC1.28 ~ IFXPERT~ ::"CASE C§) 1 GO [[lSKC:OF'T.CMD] You can create an indirect command file for an SOS Substitute command. For example, G0 ~t C, (°1 c; 1 (0' 1 ':) Cl , (;' I I nF'ut: S S THE ' :~: T HAT ' ::" ,0, : 00100 .\.-,: . . . . . . . . 1 . A•• c:)\.o)~ *, D t GD *E G0:) LDSKC:S] (Refer to Chapter 6, Typing Special Characters, for reference material on entering special control characters into a file within SOS.) When you create any indirect command file, it is not necessary to end the SOS session by removing the SOS line numbers. When you execute an indirect command file in an SOS session"SOS does not read the line numbers. 2.5.2 using An Indirect Command File To use the indirect command file during an SOS session, you must be at SOS command level, Edit mode, and type the at-sign (@), followed by the indirect command file specification. 2-8 GIVING COMMANDS In the example below, you create a file of three pages, and then execute the indirect command file, P.CMD, to print the entire file before ending the SOS session. G£:) • SOS' SAMPLE. TXT G0 Input: SAMPLE. TXT 00100 THIS IS LINE ONE OF SAMPLE.TXTG:Q 00200 $ t GK) *1/. GIG 00100 THIS IS PAGE 2 OF SAMPLE. TXT ~ 00200 $ t ~ *I/.G8 00100 00200 THIS IS PAGE 3 OF SAMPLE. TXT ~ $ t GD *@F' • CMII GIG 00100 THIS IS LINE ONE OF SAMPLE. TXT Page 2 00100 THIS IS PAGE 2 OF SAMPLE.TXT Page 3 00100 THIS IS PAGE 3 OF SAMPLE. TXT * The output printed on your command file is as follows: terminal after executing an indirect 1. The contents that are produced from the such as the printout from a Print command indirect command, 2. Any possible error messages caused by an incorrect and/or an incorrect file that is being edited command 3. The results from any = command file indirect (Give) command within an When SOS has finished executing the command(s) from an indirect command file, SOS prints the following message on your terminal and returns to SOS command level. %I nc.:H T'ect EOF * If you had set the EXPERT option, the message terminal as follows: %CMEND * 2-9 would appear on your GIVING COMMANDS 2-10 CHAPTER 3 USING MULTIPAGE FILES At times you may create or edit a large file. Because the SOS utility program enters everything in page 1 (text page) by default, you may wish to break the file into smaller, more manageable portions called pages. The advantages to you in breaking your file into pages are the following: . 3.1 1. Your file will be more readable. 2. Your file will be easier to reference. 3. Your entire file Section 3.9.3.) may not reach Wrap Around. (Refer to SOS PAGE MARK FORMAT A page mark is a line number consisting of 5 ASCII spaces (instead of digits), a carriage return (ftM) , a form feed (ftL) , and three nulls (blanks). The 3 nulls indicates the end of the line. Programs that look for page marks look for the 5 spaces as a line number. When SOS encounters a page mark, SOS will print the word PAGE on your terminal. When you give a Delete, Insert, Kill, or Mark command specifying a page number, SOS will increment or decrement the subsequent page marks accordingly. When you print your file on the line printer, the form feed embedded in the page mark will cause the line printer to skip to the beginning .of a new form. The skip to a new form will also occur when you give a List command during an SOS session to list your file on the line printer. 3.2 LINE AND PAGE NUMBERS To specify a particular line and page in your file, type the line number, a slash (/), and then the page number. A number alone is a line number; a number preceded by a slash is a page number. Format: line number/page number Example: 500/3 (line 50n on page 3) 3-1 USING MULTI PAGE FILES To specify a section of your file rather than a particular line, use a colon (:) to separate the limits of the range. Format: line number/page number:line number/page number Example: 100/1:600/3 (line 100 on page 1 through line 600 on page 3) Some programs cannot work with SOS if SOS retains its line numbers. In addition, you cannot use SOS line and page numbers as labels for source-program statements such as GOTO. If a program gives yo~ errors because of line or page numbers, start SOS, use the Kill command to delete the page marks, and use the ES command to end SOS and remove the line numbers. NOTE Refer to the reference manual for the particular source program and/or utility, because some programs automatically remove the line numbers and some do not. 3.3 SPECIAL CHARACTERS FOR LINE AND PAGE NUMBERS Sections 3.3.1 through 3.3.4 make use of special characters you can use with many of the SOS commands or, in some cases, by themselves. These special characters place or move the pointer to a specified position within your file. NOTE The placement of these special characters is very important. For example, any character to the left of the slash substitutes for a line number, any character to the right of the slash substitutes for a page number. 3.3.1 The Period (.) The period (.) specifies the current line or page number of your file. ExampLe Explanation ./3 current line on page 3 200/. line number 200 on current page 100/.:./2 line number 100 on current line number on page 2 3-2 page through current USING MULTI PAGE FILES NOTE The • command position of the format. 3.3.2 shows the current pointer in line/page The Asterisk (*) The asterisk (*) specifies the last line or last page number file. Example 3.3.3 of your last Explanation */2 last line on page 2 300/* line number 300 on the last page ./* current line on the last page . / . : * /* current line on the current page through the line on the last page The Up-arrow (A) The up-arrow file. Example (~) specifies the first line or first page number of your Explanation ~/. first line on the current page */" last line on the first page first line on the first page ":* 3.3.4 first line assumed) through last line (current page The Exclamation (1) The exclamation (1) when specified with a line number/page number format indicates the number of lines, including the first line. The exclamation can span page boundaries when the range specified includes the last line of the first page and the first line of the next page. 3-3 USING MULTI PAGE FILES Example Explanation ./.13 current line on subsequent lines the current page and 10014 line number 100 and the three subsequent lines /213 first three lines on page 2 *13 last line on the current page, plus the two of the next page two lines NOTE The exclamation (1) can be used in any SOS command that can take a range specification. When the exclamation is used, the range specified must be just a single line number/page number specification; it cannot have an ending line/page number. 3.4 ARITHMETIC EXPRESSIONS WITH LINE AND PAGE NUMBERS Arithmetic expressions of addition and subtraction specify the next line number or page number, or a previous line number or page number. Arithmetic on line numbers and page numbers can proceed forward or backward from the current line including line increments and any prior changes. Arithmetic and special characters affect line numbers only on the current page. To cross pages, use the exclamation (1). Example Explanation .+2 third line from the current line page (current page assumed) /.-1 current page minus one; page /3-1 page 2 on the current is, the previous */1+2 last line on page 3 100+2/2 line 00300 on page 2 (assuming the default of 100) SOS increment 100+2/.-1 line 00300 on the previous page (assuming the increment default of 100) 950/.+112 line number 950 on current page, line on the next page. that plus the SOS first (Refer to the remainder of Chapter 3 for actual examples using special characters and arithmetic operations.) 3-4 USING MULTI PAGE FILES 3.5 CREATING MULTIPAGE FILES When you create a new file, SOS enters everything into page 1 by default. If your file is large or contains line numbers greater than 99900 (the SOS default of the START and INCREMENT options), you should create another page to avoid Wrap Around and allow your input to continue. You can create another page by using either the Insert or Mark commands at SOS command level. The Insert command inserts a page mark after the line where the pointer is currently positioned. The Mark command marks any desired line number as the first line of another' page. (Refer to Chapter 5, SOS Command Descr iptions, for an in-depth description of these two commands.) The example shown below and in the remainder of Chapter 3 is a FORTRAN source program. When executed, this program allows you to enter two numbers and the program will return the sum and difference of the two numbers. There are mistakes in the text of the program for SOS example purposes. ~S()S ~ FILl::.: NUMBER. FOR GiD INPUT: TYPE lOt ~ 00100 lOt FORMAT (/ TYPE TWO NUMBERS:: /$)~ 0020() ACCEPT 102,AyB G!D 00300 102 FOr~MAT (2F) GD 00400 CALL.. A[lDEM (A, El) GD 00500 CALL DIFFEr, Ub En ~ 00600 GTOP QB 00700 END GID 00800 TH I SIS AN EXAMPLE FORTRAN PROGRAM ~ OO<»O() c 01()()O * This text has been entered into page one of a file. To create another page at this point, give the Insert command to put the pointer at the beginning of a new page and enter Input mode. SOS will automatically increment the page number by 1. The line numbers will start with the SOS default of 00100, with increments of 100. You can change these defaults with the INCREMENT and START options. To leave Input mode, press ESCape. ~d/ ~ G!D TH I S SOBF~OUT I NE ADDS THE TWO NLJMBERB C§J OO:LOO SUBI:;:OT I NE ADDEMM (A d:n G!D 00200 C :::: A + BG!!) TYPE 101 yC~ 00300 00400 OO::.:i() 0 lOt F(H~M/~T 1 ():I. F~ETUI:~N ~::;UBI:~DUTI NE DIFFER (A f B) ~ C :::: tIB!:;Z (i~ .... :B) ~ FOr~:r'itIT (" THE D J FEI:~ENCE I b: 00/00 00000 OO?OO O:l.()OO (l THE SUMM ISS: 7!fF)~ G!D 00600 FND$ t GD * 3-5 / F, )GI0 USING MULTI PAGE FILES The remainder of the source code has now been created and entered on page 2 of the file. At this point, mark line number 700 as the next page, page 3. *:Ml()O GIQ * Lines 700 through 1000 are now the contents of page 3. Before ending the 80S session, print the entire file. End the SOS program without creating a QOR extension backup file. NOTE Refer to the reference manual for the particular source-program you are using because some compilers mayor may not remove the SOS numbers from the input file. If they do not, you must end the 80S session with the E8 command in order to strip them off. *F',.,/,...:*/*~ 00100 00200 00300 00400 00500 00600 00700 00800 00900 TYPE 101 101 FORMAT (' TYPE TWO NUMBERS:: '$) ACCEPT 102,A,B 102 FORMAT (2F) CALL ADDEMCA,B) CALL DIFFERCA,B) STOP END C THIS IS AN EXAMPLE FORTF~AN PROGRAM PAGE 2 00100 00200 00300 00400 THIS SOBROUTINE ADDS THE TWO NUMBERS SUBROTINE ADDEMM(A,B) OO~;OO C 101 00600 ~:: A + B TYPE 101,C FORMAT (' THE SUMM ISS: 7,F)" RETURN PAGE 3 00700 00800 00900 01000 *EB~ SUBROUTINE DIFFERCA,B) C :::: ABSZ (A lOl .~. B) FORMAT (' THE DIFERENCE END [DSKC:NUMBER.FOR[2l,5107JJ 3-6 Iss: ',F) USING MULTI PAGE FILES 3.6 EDITING MULTIPAGE FILES If you attempt to execute the FORTRAN program in Section 3.5, the FORTRAN compiler will return numerous errors: there are mistakes in the source code as well as a few missing lines. Below are several examples and explanations used to edit this multipage source program code. When completed, this program will execute properly without any error conditions. NOTE If any of the commands are unfamiliar, please refer to Chapter 5, SOS Command Descriptions. Start the SOS program using the same file specification as in the SOS session in Section 3.5. The default page is page I at the start of the SOS session. Alter the first three lines as follows: GID ~sos EDIT: NUMBER.FOR *A.!3 Q0 00100 TYPE 101 t 00200 IGD~G:D 101 FORMAT (' TYPE TWO NUMBERS:\\:\\ t t [I~ 28: 00300 '$) ACCEPT 102,A,B * Transfer line number 900, creating line number 50 (page I assumed). *INCT501 9()O G!:D * l' ~::()005() Print the contents of page I to show its current format. *F'r.:*~ OOO::jO 00100 C 00200 lOl 00300 00400 102 THIS IS AN EXAMPLE FORTRAN PROGRAM TYPE :l01 FOF;:MAT (' TYPE TWO NUMBEF;:S: '$) ACCEPT l()2,A~B FOf~MAT (2F) 00500 Ct,LL.. ("DDEM (A l' B) 0060() Ci~L..1... 0070() 008()O bTOP DIFFEf~(i~YB) END * 3-7 USING MULTIPAGE FILES Alter the first two lines of page 2. A~'I.+1!2~ 00100 C t THIS SUBROUTINE ADDS THE TWO NUMBERS t cuGIT) lCG:D~ 00200 .... t t t SO SUBROUTINE ADDEM\\M\\(A,B) ._. - .... t t t t .... DG!D '")CM ;:) ICGDGO CJQIUGQ SO * Substitute ISS for IS on page 2. Then make the same all of the remaining pages in the entire file. ., ~ *SISS$IS$ Cili) 00500 101 FORMAT (' THE SUMM IS: 7,F) 101 FORMAT (' THE DIFERENCE IS: *S$~ t ~ PAGE 3 00900 * Find the numeric location of the pointer. *=.~ 00900/3 * Return to the first line of page 2. *·~'/.-··1 ~ * Substitute SUMM for SUM and 7 for in page 2. *'")SUMM G8 7$SUM~ t G) • '$ QlD 00500 101 FDF~MAT (I THE SUM IS: * 3-8 ' ,F) ',F) substitution on USING MULTI PAGE FILES Copy line number 1000 of page 3, creating it as page 2. line number 700 of *C '700, 10001 • +1 @) * Move the pointer to the first line of page 3. *.,., 1 +1 G:.:Q * + Insert two lines at the beginning of page 3. *1'" GiD O()lOO O()200 C C TH1~:) SUBROUTINE SUBTF<ACT~:, THE LESSEr:GIQ NUMBER FROM tHE LARGER NUMBERS t G) * Alter line numbers 800 and 900 of page 3. *:A.+2!2 ~ 00800 - C = ABS\\Z\\(A - B) t t [I~ SZ 00900 101 FORMAT (' THE DIFFERENCE IS: t ',F) t rFGDGID 2SF * Copy line number 400 of page 2, creating it as line number 850 of page 3. Copy line number 600 of page 2, creating it as line number 950 of page 3. *C850/3, 400/2 ~ INC1::::00050 *C?50/3, 400+2/2 ~ I Ne 1 :":00050 * Move the pointer to the beginning of page 3 and renumber the of page 3. 3-9 contents USING MULTI PAGE FILES Print the entire contents of the file NUMBER. FOR. End the SOS session with no .QOR file extension backup; i.e., exit using either EB or ES depending on your compiler. * F"~/l: */3 0IQ 00100 00200 O()300 00400 00500 00600 00/00 00800 OO?OO PAGE 2 00100 00200 00300 00400 00500 00600 00/00 PAGE 3 OOlOO 00200 00300 00400 O()500 00600 00700 OOBOO C 101 102 ("' THIS IS AN EXAMPLE FORTRAN PROGRAM TYPE 101 FORMAT (' TYPE TWO NUMBERS: ' $) ACCEPT 102,A,B FOf:MAT (2F) CALL ADDEM(A,B) CALL DIFFEF: (A, B) STOP END THIS SUBROUTINE ADDS THE TWO NUMBERS SUBROUTINE ADDEM(A,B) C 101 C C ::= + B ',F) THIS SUBROUTINE SUBTRACTS THE LESSER NUMBER FROM THE LARGER NUMBER SUBROUTINE DIFFER(A,B) C :::: 101 A TYPE 101,C FORMAT (/ THE SUM IS: RETURN END (~ B S «(~ .. - B) TYPE :L01,C FORMAT (' THE DIFFERENCE IS: F;:ETURN END ',r) *EB [: D S t< C : N UMB E H • FO r;: I:: 2/ , ~.:j 1 0 / :1 J 3.7 DELETING LINES IN MULTIPAGE FILES You can give the Delete command to delete any line from your file. If you do not specify a page number in the Delete command, action will take place on the page you are currently editing. To delete a line on a page other than your current page, you must specify the page number in the Delete command. Delete line number 200 on page 1. Page 1 is the current page start of the SOS session by default . • SOS NUMBEr::. FOR G.ID EDIT: NUMBEI~:.FOR *D200~ 1 LINES (00200/1) DELETED * 3-10 at the USING MULTI PAGE FILES Delete line number 200 on page 2. *D20()/2 G:D 1 LINES (00200/2) DELETED * If you want to delete the entire contents of a page, SOS will reply to the Delete command with a decision message, giving you the option of cancelling the deletion. You must reply with either Y for YES or N for NO. Any other character will have no effect on the message and SOS will repeat the same message. This message does not depend on the setting of any SOS options, except the EXPERT option. With the /EXPERT option set, the message MASSIVE DELETE OK? will not appear and the deletion will occur. This message may also be suppressed with the Y option of the Delete command. (Refer to Chapter 4, EXPERT option, and Chapter 5, Delete command, for an in-depth description of these SOS features.) *D'"'/3: */3 G0 MASSIVE DELETE OK? <Y OR N): A N): NO ? YOU MUST TYPE EITHER (Y OR * or *[1/3 GIQ MASSIVE DELETE OK? (Y OR N): NO * When you type Y for YES or N for NO, you do not need to press SOS replies with ES of YES or a of NO. RETURN. The Delete command does not delete the page mark within your file. */EXPERT G:D *[1/] G:D *F'/3 @) PAGE :3 * The contents of the page have been deleted, but the page mark remains. 3-11 USING MULTI PAGE FILES When you delete a range of lines that extend from one page into another page and the deletion includes all lines of the second page, that deletion will remove the page mark of the second page and will decrement by 1 all subsequent page numbers. Page one always remains a numbered page (but without a page mark). * D<jOO/l: '700/2 ~ MASS I VE DEl.ETE OK? (Y OR N): 'rES 8 LINES (00900/1:00700/2) DELETED *P"'/l:*I*~ 00100 00200 00300 0()400 00500 00600 00"100 00800 PAGE 2 00100 00200 0()300 00400 00500 00600 00700 OOBOO C 101 1()2 C C THIS IS AN EXAMPLE FORTRAN PROGRAM TYPE 101. FORMAT (' TYPE TWO NUMBERS: '$) ACCEPT 1.02,A,B FOHMAT (2F) CALL ADDEM(A,B) CAI... L DIFFER (A, B) STOP THIS SUBROUTINE SUBTRACTS THE LESSER NUMBER FROM THE LARGER NUMBER SUBROUTINE DIFFER(A,B) C :::: A B S (A .- B) 101 TYPE lOl,C FORMAT (' THE DIFFERENCE IS: I,F) r\ETUr~:N END * Page marks exist between pages. In a two-page file, there is only one page mark, the one for page 2. There is no page mark for page 1. Therefore, a one-page file contains no page mark. There are programs that read page marks (FORTRAN, PASCAL, and so forth), and it is important to these programs exactly where such page marks are located. (Refer to the reference manual for the program language being used to learn how it handles page marks within a file.) Of course, if you make any deletions by mistake, file by ending the SOS session with an EQ. 3-12 you can save your USING MULTI PAGE FILES 3.8 KILLING PAGE MARKS IN MULTIPAGE FILES You can use the Kill command to delete any specified page mark from a file. If you specify page 1 with the Kill command, the error message %NO SUCH PAGE will appear because there is no page mark for page 1. When you use the Kill command on a particular page mark, the line contents are appended to the previous page. If you kill all page marks within a file, then the contents of those pages become the contents of page 1. If each page contains its own line-number sequence in ascending order (i.e., the first line number is less than the last line number from the previous page), the following warning message will appear. At this point you must use the Number command to resequence. ,. ~JUS NUMBEr~;. FOF~ QIQ EDIT: NUMBEF<.FOR * 1</2 QIQ i:'OUT OF OI:<DER *N GIQ * If you kill a page mark of an existing page within a file but not last page, each remaining page number will decrement by 1. 3-13 the USING MULTIPAGE FILES *K/2 GD %OUT OF ORDER *N~ *P'"'/l :*1* ~ 00100 00200 00300 0()40() 00500 006()O 00700 00800 00900 01000 01100 01200 01300 01400 01500 Oi600 PAGE 00100 00200 003()O 00400 C 101 102 OOBOO FOF~MAT (2F) CALL.. ADDEM(A,B) CAI... I... C DIFFE':~(A,B) GTOP END TH I S SUBF<OUT I Nt: ADDS THE TWO SUBROUTINE ADDEMM(A,B) C :::: A 101 NUMBERS + B TYPE 101,(; FORMAT (' THE SUM IS: I,F) f~ETUF,N END .'- r) C' C THIS SUBROUTINE SUBTRACTS THE LESSER NUMBER FROM THE LARGER NUMBER SUBROUTINE DIFFER(A~B) C :::: AIe ~3 (A _.. Ie) OO~jOO 00600 O()700 THIS IS AN EXAMPLE FORTRAN PROGRAM TYPE 101 FORMAT (' TYPE TWO NUMBERS: '$) ACCEPT 102,A,B 101 TYPE 101,C FORMAT (' THE DIFFERENCE IS: I,F) F;:ETURN END * Page 3 of our FORTRAN source program is now page 2. (Refer to Chapter 5, SOS Command description of the K command.) 3.9 Descriptions, for an in-depth RENUMBERING LINES IN MULTIPAGE FILES When you create or edit a file, the SOS program has a line-number default sequence of 00100 through 99900 with increments of 100. If you create a file with more than 1,000 lines of text, it is recommended that when you reach line 99900 you should renumber your file or create a new page starting with line 00100. You will find it easier to type line numbers in increments of 1, for example line numbers 00001, 00002, 00003, and so forth, because you will not have to type the trailing zeros. When you use line numbers in mUltiples of 10 or 100, you can insert lines between existing lines within your file. The N command renumbers the lines in your file. 3-14 USING MULTI PAGE FILES 3.9.1 Renumbering Your File When you use the SOS Number command to renumber your file, type Nand press RETURN. SOS will then renumber your file (regardless of page marks) starting with 100 and adding 100 to each sequential line number. After renumbering, SOS positions your pointer at the end of your file. For example, suppose file NUMBER. FOR is numbered from 10 in increments of 10 • • 50S NUMBER. FOR ~ EDIT: NUMBER.FOR.1 *P'"':* GiD 00010 00020 00030 00040 00050 00060 00070 00080 00090 00100 101 102 103 TYPE 101 FORMAT (' PLEASE TYPE A NUMBER.') ACCEPT 102,X FOF,MAT (F) TYPE 1()3,X FORMAT (' YOU TYPED THE NUMBER I,F) Y :::: 2 104 *N~ F' G!D * *X TYPE 1()4,X,Y FORMAT (' TWICE ',F' IS I,F) END END O:LOOO * Renumber the file by giving the N command. SOS positions your pointer at the end of your file. Now print the entire file again. *p'"':* ~ 00100 00200 00300 00400 00500 00600 00700 00800 00900 ()1000 10l 1()2 103 TYPE 101 FORMAT (' PLEASE TYPE A NUMBER.') ACCEPT 102~X FORMAT (F) TYPE 103,X FOF<MAT (' YOU TYPED THE NUMBER ',F) Y :::: 2 1()4 *X TYPE l04,X,Y FORMAT (' TWICE ',F,' IS I,F) END * The contents of each line change. do not change. 3-15 Only the line numbers USING MULTI PAGE FILES 3.9.2 Renumbering Using A Number Other Than 100 When you want to use some number other than 100 to renumber, type N followed by the number you want to use. Your file will begin with that number and will also increment by that number. You can use any number or combination of numbers within the range of 1 to 99999. In the following example, the file has been renumbered with increments of 15. *N1.5~ *F'r':*~ 00015 00030 101 0004~) 00060 102 ()007~:.; 00090 001 O~.:; 00120 103 OOL;~) 104 TYPE 101 FORMAT (' PLEASE TYPE A NUMBER.') ACCEPT 102,X FOf~MAT (F) TYPE 10~·5,X FORMAT (' YOU TYPED THE NUMBER ',F) Y :::: 2 00150 *X TYPE 104yX,Y FOHMAT (' TWICE ',F,' IS I,F) END * 3.9.3 Wrap Around When you create or edit a file and you exceed the number of lines allowed on one page (default is 99900 with 100 as the increment or 99999 with 1 as the increment), SOS will not allow you to enter any more lines until you either renumber your file or create a new page to resolve a possible Wrap Around. When you renumber a file with too large a number, you will quickly reach Wrap Around and the following message will appear on your terminal: %WRAP AROUND followed by the page number that contains the Wrap Around. To remedy this situation, type the following commands to Mark the current line as the beginning of a new page and then to renumber that page. *M.~ *N :L 0 0 ~ /2 (!Ii) * The example below is a IS-line file that has been renumbered increment of 10000 . • SOS S(')MPLE. TXT (!Ii) EDIT: ~~;,;f'1PI... E. TXT *N t O()OO (!Ii) %~JF:AF' AROUND PAGE :L *::;:<.~ ::.:.;0000/1 >:·::P~ 50000 LINE 15, PAGE 1 3-16 with an USING MULTI PAGE FILES At this time, use the Print command to see which lines contain Wrap Around; i.e., which lines are duplicates of or are less than numbers that precede them. For example, suppose the entire file appears as: *P/1 :12 ~ PAGE 1 LINE LINE LINE LINE LINE LINE LINE L.INE 10000 20000 30000 40000 50000 60000 70000 80000 90000 00000 10000 20000 30000 40000 50000 LH~E LINE L.INE L.INE LINE L.INE L.INE 1, PAGE 1 2, PAGE 1 ~5 , PAGE 1 4, PAGE 1 5, PAGE 1 6, PAGE 1 7, PAGE 1 8, PAGE 1 9, PAGE 1 10, PAGE 1 11 , PAGE 1 12, PAGE 1 13, PAGE 1 14, PAGE 1 :L 5, PAGE 1 * The Wrap command: Around duplicate-lines *F""':* ~ 00000 10000 20000 3()OOO 40000 50000 L.INE 10, LINE 11, L.INE 12, LINE 13, LINE 14, LINE 1~; , PAGE PAGE PAGE PAGE PAGE PAGE showed when you used the Print 1 1 1 1 1 1 * The lines themselves are in the proper order, but the line numbers are not in increasing order. Before you do anything else, fix the line numbers. To do this, give the N command with a smaller number than you had previously given. ltNl000 ~ *F"":*~ 010()O LINE 02000 LINE 03000 LINE 0400() L.INE o::'iOOO 06000 07000 08000 09000 100()() 11000 120()() 13000 14000 :I. ~.:;O()O 1 , PAGE :L .:.. r) , PAGE 1 3" PAGE l 4, PAGE 1 .::. LINE d' LINE 6" LINE 7" L.INE By LINE 9, LINE 10" LINE 11" LINE :1.2, LINE 1:3, LINE 14, LINE 1 ~:;, PAGE 1 PAGE :I. PAGE 1 PACi!::: :L PAGE :L PAGE 1 PAGE 1 PAGE :I. f'f)GE 1 PAGE 1 F'I~GE 1 * 3-17 USING MULTI PAGE FILES 3-18 CHAPTER 4 USING SOS OPTIONS Just as the Input, Edit, and Alter modes (see Chapter 1) modify the SOS program, options also modify SOS. They perform various functions. Some options supply a value; the PLINES option, for example, alters the number of lines normally printed by a Print command. Other options are either on or off, for example the DECIDE option which causes the Substitute commands to enter the decide mode. Still other options such as the Period (.) option provide information. 4.1 OPTION FORMAT Each option has a name and some have values preceded by a colon (:) or an equal sign (=) • The colon or equal sign can be used interchangeably. Thus, the format of a valued option is: option:value or option=value while the format of an "on-off" option is: option When printing or setting an option, all you have to do is type characters to uniquely identify the option name. Thus, sufficient for INCREMENT, and LaC is sufficient for LOCATION. 4.2 enough INC is THE SWITCH.INI OPTION FILE You can create a file in your logged-in directory containing any of the settable options of the SOS program. This file must be called SWITCH.INI. The SWITCH.INI option file may contain as many SOS option lines as you wish. When you type the TOPS-IO SOS command on your terminal, SOS extracts the options specified in the SWITCH.INI file as part of that SOS session. If there is no SWITCH.INI option file in your directory or if the file contains no options for SOS, SOS uses its own default options. If you misspell an option in the SWITCH.INI file, SOS will reply with an error message when you start the SOS program. For example, if your SWITCH.INI file contained the following line: • TYPE SWITCH.INIG!!) 00100 SOS/SEPERATORS 4-1 USING SOS OPTIONS this error condition would cause your SOS program session to start follows: as • SOS NUMlCEF~. FOR G!D ? Syntax error in default options FILE::: Section 4.4 and Appendix B contain a detailed description of available SOS options and their defaults. 4.2.1 all the SWITCH.INI Option File Line Formats The two possible line formats of the SWITCH.INI option file are: 1. SOS/optionl/option2/option3 ••• [/RUN:dev:program-name] 2. SOS:name/optionl/option2/ ••••• [/RUN:dev:program-name] You may use either or both formats in the same file, but SOS must be the word SOS. If you try to use any word other than SOS, SOS ignores the contents of the SWITCH.INI file and uses its default options. In the second format, name can be up to six alphanumeric characters and is used as a pointer with the Set /OPTION command (/OPTION:name). This type of line is used to override both the system defaults and your specified parameters that were given in a previous format. Thus, if you have a line format in your SWITCH.INI option file with a pointer name, your defaults for that line can only be set with the Set /OPTION command. If the pointer name used in the Set /OPTION command does not appear in the SWITCH.INI file, the SOS program outputs an error message and uses its defaults or previously set parameters. *IOPTION:ALLG!D ? Option not found * If an option is misspelled within a line that has a pointer name, replies with an error message and the Edit mode prompt character. SOS */OPTION:ALL ~ 1 Syntax error in option file * In both formats, the option(s) may be any of the settable SOS options described in Section 4.4 and Appendix B. Also, in both formats there are the optional switches specified by the word RUN. When using this RUN option, you can end an SOS session with the Go command, and immediately enter the program specified by the program-name. The dev is the device on which the program-name resides. The SOS default for this is SYS. 4.2.2 Including An Option In Your SWITCH.INI File If you want a particular option to be always in effect, include it in your SWITCH.INI file. Whenever you start the SOS program, all of the options you include in the SWITCH.INI file are automatically set. You must use the line format shown in the example below: 4-2 USING SOS OPTIONS • SOS SWITCH. INI G!D INPUT: SWITCH.INI 00100 SOS/OLD/NOBAK/EXPERT /C128 ~ 00200 $ t GQ *E~ [DSKC:SWITCH.INI[27,5107JJ If the options you desire take up more than one line in the SWITCH.INI option file, add a hyphen to the end of each line that will be continued • • SOS SWITCH. INI G!D EDIT: SWITCH.INI *R100~ 00100 SOS/DECI DE/NOBAK/OLD/START: 10/STEP: 10- GID 00200 / INCREMENT: 1 O/EXF'ERT ~ 00300 1 GC) *E~ [DSKC:SWITCH.INIC27,5l07JJ Since the /EXPERT option was placed in the SWITCH.INIfile when it was created above, the /EXPERT option remains in effect even when you edit the SWITCH.INI file. Thus, if you place an option, such as READONLY, in your SWITCH.INI, file you may have to delete your SWITCH.INI file and re-create it. To delete a file in your directory, use the TOPS-lO DELETE command. When you use "program-name" within your SWITCH.INI file, un sequence your SWITCH.INI file, because some programs do not recognize 50S line numbers. To unsequence the SWITCH.INI file, give the ES command when you save it. 4.2.3 Multiple Lines/Formats Within Your SWITCH.INI File The SWITCH.INI file may contain many 50S/option lines within it for a variety of purposes. If your SWITCH.INI file contains more than one 50S/option line having the SOS/optionl/ ••• format, the first line of the SWITCH.INI file will be the options that prevail for the 50S session. For example, if your SWITCH.INI file contained the following contents: • TYPE SWITCH. INI ~ 00100 SOS/EXPERT/NODEC!DE/NOBAK 00200 SOS/NOVICE/DEC!DE/BAK then the options as specified on line number options used when you start an 50S session. 00100 would Therefore, it is recommended that you SOS/optionl/ •••• format. one line 4-3 use just be the with the USING SOS OPTIONS The second format, SOS:name/optionl/ •••• , may be in multiple forms with each "name" being different. The options can only be set with the /OPTION:name command at SOS command level. For example, if your SWITCH.INI file contained the following line: • TYPE SWITCH. INI 0:!D 00100 SOS:ALL/EXPERT/NODECIDE/NOBAK/ISAVE:25/SAVE:25 then you must give che Set option command to set the options specified by ALL. *IOPTION:ALL0:!D * The following is an example of the creation of a SWITCH.INI file that allows you to enter succeeding SOS sessions using your own option parameters, return to the SOS default options, and return to your own option parameters without leaving the SOS program. t SOS SWITCH. INI G!D INPUT: SWITCH.INI 00100 SOS/EXPERT/C128/START: 10/INCF~EMENT: 10-(!!D 00200 /SEPARATORS/NOBAK/M:·53 (!!D 00300 SOS: fiEF IBAI,/C64/NOVJCE/NONSEPARATORB-· ~ 00400 ISTAF~T: :I. 00/1 NCf~EMENT: 100/M37~ 00:=.=;00 ~)OS: Mf)DE/EXPEF~T le:l. 2B/STAf~T: 1 O····~ 00600 ISEPAF~ATORB/INCF:EMENT: 10INOBAK/M33G:) f OO?O() *E~ GD [DSKC:SWITCH.INI[27,5107JJ • !:;Qn NUMBEI:~. FOf~ (!!D ED IT: NUMBEF;:. FOF~ *::::CASE G!D Ger-ar'at.oJ's UF"'f:'~'T' */OF'TION: [lEF G.!D *::::CASE @) Displa~ Model 37 C64 Upper */OPlION:MODE G!D *::::CASE (!!D GCF'i::: rat.o J'S (JPI·:'(o? T' * 4.3 SETTING OPTIONS In summary, you may set an SOS option by: 1. Including it in your SWITCH.INI file (See Section 4.2.2.) 2. Giving it with an SOS command (See Section 4.3.1.) 3. Including it in an indirect command file (See Section 4.3.2.) 4. Giving it from Edit mode (See Section 4.3.3.) 4-4 USING SOS OPTIONS To set any settable option in SOS, you must use the slash (I) character to precede the option specified. The slash (I) character is the Set command and can be used in the SWITCH.INI file, with the SOS command, in an indirect command file, or at Edit mode. 4.3.1 Giving An Option With The SOS Command To set an option while starting the SOS program, simply include it after the command name and either before or after the file specification. CD .SOS'SAMPLE.TXT/START:lO/INC:lO/EXF'ERT~ INPUT: SAMPLE.TXT 00010 or , CB .SOS/START:l0/INC:l0/EXPERT EDIT: SAMPLE. TXT SAMF'LE.TXT~ * The two examples above show the INCREMENT, and EXPERT options. SOS command setting the START, When you give option(s} with the SOS command, the' SOS program will first extract any options supplied in the SWITCH.INI file and then use the options supplied with the SOS command. That is, if an option given in the command overrides an option from the SWITCH.INI file, then that is the option used for the SOS session. This would happen, for example, if the line in the SWITCH.INI file contained: .TYPE 00100 SWITCH.INI@) SOS/EXPERT/C128/NOBAK and the SOS command contained: • ::)~lS/C64/DECIDE SAMPLE. TXT @) EDIT: SAMF'LE.TXT * C64 would override C128, and DECIDE would add DECIDE mode mode. NOBAK would remain in effect for the SOS session. NOTE Adding DECIDE mode to EXPERT mode enables you to make decisions with the Substitute command while the characteristics of EXPERT mode remain. 4-5 to EXPERT USING SOS OPTIONS 4.3.2 Including An Option In An Indirect Command File You may use an indirect command file, for example, to set an SOS option, perform SOS command(s), and then either preserve or reset that option or any options in the SWITCH.INI file. Below is an example of an indirect command file that sets the C128 option, substitutes the dollar sign character ($) for an Altmode character (ESCape key character), substitutes an up-arrow (~) C for the CTRL/C character, and resets the options specified by the pointer name DEF in the SWITCH.INI file • •,SOS/C128/EXPERT s. CMD ~ INPUT: S.CMD 00100 /C128~ 00200 5$ ~ 00300 "'C/;~;' I~,: ~ 00400 ' ':1 I :::'"' I"': *1* G!D 00500 /OF'T I ON: liEF ~ 00600 $ t *E~ GD [I1SKC:S.CMD] This S.CMD file, when executed by the Indirect command (@), will place the ESCape character and the CTRL/C character into a file wherever a $ character and AC character exist. (Refer to Chapter 6, "Typing Special Characters," for an explanation of entering special characters into a file.) 4.3.3 Setting An Option From Edit Mode To set an option from Edit mode, use the Set command; that is, simply type a slash character (/) and the option. You may set any option that Section 4.4 describes as settable. The following example sets the ISAVE and SAVE options to 10 at Edit mode. *1 ISAVE: 10 G!D */SAVE: 10 G!:Q * Using the Set command is another way to SWITCH.INI file. 4-6 override an option in the USING SOS OPTIONS 4.3.4 Finding The Status Of An Option To find the value or status of an option, use the Give command; that is, type an equal sign (=) and the name of the option you want. However, not all options are printable, and if you attempt to print the value or status of a nonprintable option, the error message %ILLEGAL COMMAND appears on your terminal. The following example finds the value of the START option. *,sr AR"J Gi.D 00100 * You may also give the =CASE command for information on some commonly used SOS options. (Refer to Section 4.4.6, CASE, for a description of this option.) 4.4 DESCRIPTION OF OPTIONS The following sections describe all of the valid SOS options. For each option, the section describes its name, whether you can set or print the option, its default value, how to reverse its setting, the function of the option, an example of the option in use, and any applicable restrictions. Each option is shown in its acceptable abbreviated form. The brackets ([]) enclose optional characters. Those options that cannot be set or printed will display the error message %ILLEGAL COMMAND on your terminal if you attempt to set or print them. Not all options that are settable can be set in the SWITCH.INI file or with the SOS command. For example, the NAME option can only be set at SOS command level, Edit mode. 4-7 USING SOS OPTIONS 4.4.1 BAR Settable: Yes IBAK Printable: Yes =BAK Default: On Reverse: By setting the NOBAK option Function: The BAK option causes the SOS program to rename the original file being edited. The file is r~named with a file specification of the same filename but with a file extension that begins with a Q. The contents of the file exist as if no edits were performed. The Qxt file (where xt is the last two alphanumeric characters of the file extension) is kept when you issue the End, Go, or World command. Example of setting BAK: */lIAI, G!O *=BAK~ BACKUP FILE WILL BE CREATED * Example of reversing BAK: *INOB(')K G!D *~BAK ~ NO BACKUP FILE WILL BE CREATED * Remember that although deleting a backup file will save disk space, it is safer to retain the file until you have examined your new file. Restrictions: Not Applicable 4-8 USING SOSOPTIONS BASIC 4.4.2 BASIC Settable: Yes /BAS[IC] Printable: Not Applicable Default: None Reverse: Not Applicable Function: The BASIC option should be specified with the SOS command when you start an SOS session to edit a file that was created by the BASIC program. When you set the BASIC option, SOS will accept the line number labels of BASIC as the line numbers of the SOS session. If the BASIC option is not set, SOS will not recognize the labeled line numbers in the BASIC program. Thus, your BASIC file will contain two line numbers for each line. Example: The following file, SQUARE.BAS, was created in BASIC: • TYPE SOUARE. BAS G!D 10 LET X::::l. 20 PRINT X,SQR(X) 30 LET X::::X+l 40 IF X<=5 GO TO 20 50 END without setting the BASIC option with the SOS command, your file would appear as follows: • SOS SQUARE. BAS ~ E[lIT: SQUARE.BAS *F'~ 00100 00200 00300 00400 00500 00010 00020 00030 00040 00050 LET X=l PRINT X,SQR(X) LET X::::X+l IF X<=5 GO TO 20 END * with the setting of the follows: BASIC option, .505 SmJARE. BAS/BASIC GID EDIT: S(~UARE. BAS *P~ LET X::::l 00010 00020 000;30 00040 00050 . PRINT X,SQR(X) LET X:~~X+l IF X<::::5 GO TO 20 END * 4-9 your file would appear as USING SOS OPTIONS The setting of the BASIC option will turn off the S option of the End, Go, or World command and the UNSEQUENCE option~ even if you set the UNSEQUENCE option, SOS will ignore it when you back up your BASIC file. Restrictions: You cannot set the BASIC option with the use of your SWITCH.INI option file or at SOS comma~d level. If you edit a BASIC program file without specifying the BASIC option, the S option of the End, Go, or World command will execute properly, but you will receive the error message: ? INTERNAL CONFUSION. You will be returned immediately to TOPS-IO command level and your saved BASIC file will be renamed to nnnSOS.TEM. This temporary file must then be renamed to your original BASIC file specification. (Refer to Chapter 10, How SOS Handles Files And Buffers, for an explanation and examp1es of temporary files.) If your BASIC program file becomes unsequenced for some unknown reason, SOS will reply with the following error message when you attempt to edit your file with the BASIC option set: +80S SGUARE.BAS/BASIC~ EDIT: SGUARE.BAS ?Bad ·BASIC· file format To solve this problem, start the SOS session without setting the BASIC option, so that SOS will assign new line numbers to your file. CAUTION using SOS to edit BASIC files can bring about some unpredictable results due to the setting of other SOS options. Therefore, it is recommended that you use the BASIC program, not the SOS program, to edit BASIC program files. 4-10 USING SOS OPTIONS 4.4.3 BIG Settable: Not Applicable Printable: Yes =BI[G] Default: None Reverse: Not Applicable Function: The BIG option prints the largest page number in the file being edited. This page number represents the total number of physical pages in your file during an SOS session. Example: *~;BIG C§:) 8 * The largest page number within the current file is 8. Restrictions: Not Applicable 4-11 USING SOS OPTIONS 4.4.4 C64 Settable: Yes /C6[4] Printable: Yes =CASE (via the CASE option) Default: On Reverse: By setting the C128 option Function: The C64 option makes SOS consider the single quote as a normal character of text. When SOS has the C64 option set, you may type any character from your terminal, but you are not permitted to use the special C128 representation that is available for some characters. (Refer to Chapters 6 and 7 for a detailed description of special characters.) Example: ·808 SAMF'LE.TXT/C128/DPY/M:3'7~ [DIT: SAMPL..E.TXT *~:;CASE GfD Model 3'7 Upper */C64 ~ Displa~ *::::CASE G!:D Display Model 3'7 C64 Upper * Restrictions: The only time you must set the C64 option is to reverse the C128 option previously set; i.e., when you no longer need to enter certain special characters into your file. 4-12 USING SOS OPTIONS 4.4.5 C128 Settable: Yes /Cl[28] Printable: Yes =CASE (via the CASE option) Default: Off Reverse: By setting the C64 o)tion Function: The C128 option gives you a means of entering certain special characters, namely control characters and ESCape, into your file. (Refer to Section 6.4 and Section 7.2 for additional information on special characters and the use of the C128 option.) To represent a special character, type an apostrophe (single quote character) followed by a punctuation mark or numeric character that represents the special character you want. If you need an apostrophe, type two apostrophes in succession. For example, to enter a CTRL/C into your file, set the C128 option, then type in '# (quote, pound sign} • Example: •nos SAMPLE t TXT CE:!.J EDIT: SAMPLE~TXT */C12B ~ *I"'~ 00050 /t ~ */C64~ *F'. @) OOO~:;O '·'C * Restrictions: If your terminal is unable to input or print lowercase characters, you can set both the UPPER option and the C128 option to input lowercase characters into your file. Each desired lowercase character must be preceded by a single quote character. When your file is typed on your terminal, it will appear as all uppercase, but when printed on the line printer, your file will appear as desired. Depending on the above restriction and your terminal type (see Chapter 6) and how you set your terminal's parameters, all desired uppercase characters can be entered into your file with the LOWER and C128 options set. All desired uppercase characters must then be preceded by the single quote character. 4-13 USING SOS OPTIONS I CASE 4.4.6 I CASE Settable: Not Applicable Printable: Yes =CA[SE] Default: C64 Upper Reverse: Not Applicable Function: The CASE option is only printable. It reports the you have and the status of the following options: type of Option Message Printed When Option Is Set: C64 C128 DPY M33 M37 SEPARATORS NONSEPARATORS LOWER UPPER C64 blank Display blank Model 37 Separators blank Lower Upper Example: The options C128, M37, DPY, and LOWER are set: *::::CASE ~ Displa~ Model 37 Lower * The options C64, SEPARATORS, M33, and UPPER are set: *:::CASE @) C64 SEP~RATURS UPPER * Restrictions: Not Applicable 4-14 terminal USING SOS OPTIONS DECIDE 4.4.7 DECIDE Settable: Yes /DEC[IDE] Printable: Yes =DEC[IDE] Default: Off Reverse: By setting the NODECIDE option Function: The DECIDE option permits you to decide whether each substitution should be made when using the Substitute command. The DECIDE option has a built-in list of DECIDE commands that allow you to make a choice of substitutions. The DECIDE option is the same as if you had specified the D option of the Substitute command. When you edit a file using the Substitute command with the DECIDE option set, SOS prints the line contents as if the substitution was made and then waits for one of five possible responses from you: Character Meaning - Result SPACE bar To accept this sUbstitution. DELETE key To reject this substitution. A To enter Alter mode immediately for that line only. E To return immediately to SOS command mod~ making this or any further substitutions. G To make this automatically. Q To quit now. The only substitutions that by are those that were confirmed substitutions. and all subsequent with these responses of the DECIDE option, substitutions made during an SOS session. 4-15 you can without substitutions are made previous control all USING SOS OPTIONS Example: • SOS/DECIDE NUMBER. FOR ~ EDIT: NUMBER.FOR *STIPE1TYPEr": * ~ @:) ~ 00010 G ()0020 00050 00060 00080 TYPE 101 101 103 FORMAt (' PLEASE TYPE A NUMBER.') TYPE 103,X FORMAT (' YOU TYPED THE NUMBER ',F) TYPE 104,X,Y *=DECIDE G!Q AUTO DECIDE * Restrictions: If you do not set this option it remains off. If you press any other character than one of the five allowable ones, SOS prints a question mark (?), sounds the bell on your terminal, and waits for another response. The A response of the DECIDE option causes you to enter Alter mode immediately. The A response of the D option of the substitute command causes you to make the substitution first and then enter Alter mode. 4-16 USING SOS OPTIONS DELETE 4.4.8 DELETE Settable: Yes /DEL[ETE] Printable: Yes =DEL[ETE] Default: Off Reverse: By setting the NODELETE option. Function: The DELETE option, if set, will cause SOS to delete both your input file to the SOS session and your output file from the SOS session when you issue an End, Go, or World command. This option may be useful when you want to recreate a file while in an SOS session, using the same file specifications. The DELETE option is the same as the D option World commands. of the End, Go, and Example: • SOS PRINT.CM[I~ EDIT: PRINT.CMD *F'~ 00100 F''"'/'''':*/* IDELETE GID ::.:DELETE G:D ** INPUT FILE WILL BE DELETED. *~JGD INPUT: 00100 00200 * DSKC:F'RINT.CMD[27,5107] P/1:.I* ~ $ t GK) INODELETE ~ *EGID [DSKC:PRINT.CMD[27,S107]] Restrictions: It is recommended that you retain some backup copies of your files (using different file specifications) if you use this option because all files with the filnam specification will be deleted regardless of the file extension. If you do not use this option, it will always input and output files will not be deleted. 4-17 remain off, and your USING SOS OPTIONS 4.4.9 ' DISK Settable: Not Applicable Printable: Yes =DI[SK] or =DS[K] Default: None Reverse: Not Applicable Function: The DISK or DSK option prints only your format of: current disk quota in the "nnnn" disk blocks in your area on "dev" "nnnnnn" blocks for all users on this structure Where: nnnn refers to the total number of blocks that you are allowed to use. This is the number of blocks assigned to your directory. A block consists of 128 words. Each word consists of 36 bits. dev is the structure (disk) that the output file written to. nnnnn is the total number of blocks structure for all users that structure. that have Example: .805 SAMPLE + TXT ~ EDIT: SAMPLE.TXT *:·[l18K G!.D 8460 disk blocks in ~our area on [lSKC 146740 blocks for all users on this structure * Restrictions: Not Applicable 4-18 reside access is being on the to that USING SOS OPTIONS 4.4.10 DPY Settable: Yes /DP[Y] Printable: Yes =CASE (via the CASE option) Default: Off Reverse: By setting the M33 option Function: The DPY option tells SOS that you have a VT05-type terminal. It gives your VT05 terminal the following characteristics that other terminals mayor may not have: 1. CTRL/R (AR) does not echo itself when it contents. 2. CTRL/U (AU) does not contents of a line. 3. Pressing the line feed key to print the next line causes that line to print over the asterisk prompt character. This allows you to display 20 lines on your terminal screen, thus eliminating double spacing. 4. Pressing the ESCape key to print the previous line causes that line to print over the asterisk prompt character. This too, allows you to display 20 lines on your terminal screen, thus eliminating double spacing_ echo Example: • SOS SAMPLE. TXT IDPY ~ EDIT: SAMPLE.TXT ::::CASF QIO *DISPLAY C64 UPPER *G) 00100 THIS IS LINE 00100 *F~. ~ 00100 THIS IS A TEST THIS IS A TEST ~ *~ 00200 *~ 00100 THIS IS LINE 00200 THIS IS A TEST * 4-19 itself when reprints you the line reenter the USING SOS OPTIONS NOTE The example above will appear in slightly different form on a VT05 with the DPY option set as this example was performed on a hard-copy terminal for printed example purposes. Restrictions: The DPY option will have an effect even when you are using other terminal types. 50S will send special VT05 characters to the terminal which may produce unpredictable results. If you specify the M33 or M37 option for 50S and then press the ESCape key to print the previous line, that line will print over the asterisk prompt character as if you had set the DPY option. 4-20 USING SOS OPTIONS ERROR 4.4.11 ERROR Settable: Not Applicable Printable: Yes =ER[ROR] Default: None Reverse: Not Applicable Function: The ERROR option prints the last error message that occurred on your terminal in its long-form format, even if the EXPERT option is in effect. Example: • SOS NUMBEF~ FOF~ ~ EDIT: NUMBER.FOR t * :::FEr~()F~ GIO */[XF'Ef~T ~ *F'* CT0 O()~;>OO END *GD %NLN *;:::EI~:F~()f~ GD No ~~l..Ich 1 inf:.' (s) * Restrictions: As shown in the example above, if you use this option before any error occurs, SOS replies only with the Edit mode prompt (*), because there was no previous error. 4-21 USING SOS OPTIONS ~XPERTI 4.4.12 EXPERT Settable: Yes /EX[PERT] Printable: Not Applicable Default: Off Reverse: By setting the NOVICE option Function: The EXPERT option, when used, puts you into the Expert mode of SOS. Expert mode gives short abbreviated error messages using five characters or less. (Refer to Appendix E for the abbreviated Expert mode error messages.) When you use the Delete and Replace SOS commands, Expert mode does not echo on the terminal the line/page numbers deleted, and does not print the option message MASSIVE DELETE OK? (Y OR N) when deleting the contents of an entire page. In Alter mode, the 0 and R instructions do not show the characters deleted and the backslash characters do not appear on your terminal. Example: .SOS/EXPERT NUMBER~FORG!D ED IT: NUMBE~-;:. F()F~ *F'10 C§) 00010 TIPE 101 *F:l0 G!!) 00010 GD *[1/1 ~ *F""':*~ TYPE 101 G!!) ~~NLN * The error message NLN, No Such Line(s), occurred because contents of page 1 was deleted with the 0/1 command. Restrictions: Not Applicable 4-22 the entire USING SOS OPTIONS IINCREMENT I 4.4.13 INCREMENT Settable: Yes /IN[CREMENT):n Printable: Yes =IN[CREMENT) Default: 00100 Reverse: Not Applicbale Function: The INCREMENT option permits you to specify the numeric value, n, as the increment for the line numbers you are inserting into a file. If you do not use the INCREMENT option, the default value is 100. That lS, each inserted line has a line number 100 greater than the previous line number inserted. If you are creating a new file, the increment value also becomes the first line number if the START option is not set. The INCREMENT option value is the default value for Insert and Replace commands when you do not specify an increment. If you do specify an increment preceded with a comma (,) in an Insert or Replace command, this increment will become the INCREMENT option value and will be used for further Insert and Replace commands. If you specify an increment preceded with a semi-colon (:) in an Insert or Replace command, this increment does not change the INCREMENT option value. The iincrement of the Insert or Replace command is an increment for only that command. You can use any numeric value for the increment from 1 to 99999. Example: • SOS/INCRE. MENT: 5 SAMPtE. TXT@) INPUT: SAMPLE. TXT 00005 THIS IS LINE 00005~ 00010 THIS IS LINE 00010G!I) 00015 $ t GD *::=INC G0 00005 *I12,2~ 00012 00014 * THIS IS LINE 00012~ USING SOS OPTIONS Restrictions: If you renumber your file with the Number command and do not specify a value, the N command will use its default of 100 with increments of 100. If you then Insert or Replace lines at the end of your file, the INCREMENT option value will take effect again. 4-24 USING SOS OPTIONS 4.4.14 ISAVE Settable: Yes /IS[AVE] :n Printable: Yes =IS[AVE] Default: Off Reverse: Not Applicable (zero or none) Function: The ISAVE option permits you to create a backup copy of the file being edited or created after a specified number, n, of new lines have been inserted. The number specified may be any value from 1 to 99999. The ISAVE option automatically creates a backup copy as if you had issued a World command. The ISAVE option, when printed, displays remaining before the next Auto-Save. the number of insertions Example: ~ SOS/ I SAVE::~ SGRT + ALG ~ INPUT: St~RT .. ALG 00100 BEGIN ~ 00200 HEAL X, Y; GID 00300 WRITE (. [2C] TYPE THE VALUE OF X: [DOING AUTO-SAVE? PLEASE WAIT .. ] [ll] [[ISKC:SQRT .. ALG] 00400 f~EA[I (X); G!D 00500 Y : ::::SQRT ( X ) ; GID 00600 WR I TE (. [C] THE SQUAREF~()OT OF [DOING AUTO-SAVE, PLEASE WAIT.] [DSKC:SQRT.ALG[27,5107]] 00700 00800 00900 PRINT WR I TE (X,:~,3); ~ IS·); ~ (. PRINT (Y,:3,3); CRD [DOING AUTO-SAVE, PLEASE WAIT.] [DSKC:SQRT.ALG[27,5107]] 01000 01100 END ~ * 4-25 .); G!:0 M ) , GIQ USING SOS OPTIONS Restrictions: If you give the World command before an Auto-Save is done, the ISAVE value is reset to the value specified when you had set this option. If you set the UNSEQUENCE option and the ISAVE option, Auto-Save will not un sequence your file when it is backed up and a warning message will be displayed on your terminal. 4-26 USING SOS OPTIONS LENGTH 4.4.15 LENGTH Settable: Yes /LE [NGTH] : nn Printable: Yes =LE[NGTH] Default: 55 Reverse: Not Applicable Function: The LENGTH option is used to set the page length of printed output. Its default value is 55. This 55 refers to lines of text and does not include page headers, .page numbers, or the spacing required. Example: • SOS SAMPLE. TXT G!.'0 EDIT: SAMPLE.TXT *::::LENGTH~ c!'I:," .. h,J * Restrictions: The LENGTH option can be used only when the Justification command has been assembled for SOS. That is, this option has no meaning without the previous use of the Je, JL, JR, JU, or JW comm8nd, and changing its default value will have no effect during an SOS session. 4-27 USING SOS OPTIONS ~MARI 4.4.16 LMAR Settable: Yes /LM[AR]:n Printable: Yes =LM[AR] Default: 1 Reverse: Not Applicable Function: The LMAR option is used to set the Left Margin of a output. Its default value is 1. printed page of Example: • fiGS f>AMPLE. TXT ~ EDIT: SAMPLE.TXT I... MAR ~ 1 *": Restrictions: The LMAR option can be used only when the Justification command has been assembled for SOS. That is, this option has no meaning without the previous use of the Je, JL, JR, JU, or JW command, and changing its default value will have no effect during an SOS session. 4-28 USING SOS OPTIONS LOCATION 4.4.17 LOCATION settable: Not Applicable Printable: Yes =LOC[ATION] Default: None Reverse: Not Applicable Function: The LOCATION option is printable only. It reports the current position at the beginning of the SOS buffer file. You can back up (save) the file, using the World command, from the position indicated by the LOCATION option to the current position being edited. Example: • SOS SOf~T. tiLG @) EDIT: SGRT.ALG *A40(): !:.)()O GID 00400 READ (X);· t 1~Q}D Y 00500 := S(~RT(X); t I~~ *:::LOCATION ~ 00100l:L *w~ [DSKC:SQRT.ALG[27,5107JJ * The file from line 100 on page one to the last line on the last page has now been saved. (Refer to Chapter 10 for a description of the SOS buffer files.) Restrictions: Not Applicable 4-29 USING SOS OPTIONS ILOWER I 4.4.18 LOWER Settable: Yes /Lot'HER] Printable: Yes =CASE (via the CASE option) Default: Off Reverse: By setting the UPPER option Function: The LOWER option permits you to enter lowercase alphabetic characters into a file. If your terminal is uppercase only, the characters appear as uppercase characters. However, when the characters are printed on the line printer, the characters appear lowercase. With an uppercase-lowercase terminal, you may set your terminal to LOWERCASE (LC) with the TOPS-IO command SET TTY LC. The uppercase-lowercase terminal permits you to enter uppercase and lowercase characters by pressing the SHIFT key as you would with a typewriter. The characters, when entered, appear as desired and when printed or typed on the terminal or line printer, the characters appear in their proper format. You can use the C128 option with the LOWER option to enter uppercase and lowercase characters during a single SOS session. With the Cll8 and LOWER set, all uppercase characters must be preceded with a single quote character ('). If your terminal is set to UPPERCASE (UC) and you set the LOWER option, all characters will be uppercase and will appear as uppercase during the SOS session. Example: (using a VT05 terminal) • SET TTY UC G!!) • SOS TEST. MEM ~ INPUT: TEST.MEM 00100 $ t ~ *::CASE 0!D C64 UPPER */LOWER G!D *1100G!.D 00100 ABCDEFGH I ,JKl..MNOF'(~RSTUVWXYZ G!D 00200 $ t ~ *EB~ [[lSKC:TEST.MEMJ t TYPE TEST t MEM ~ 00100 ABCDEFGHIJKLMNOPQRSTUVWXYZ 4-30 USING SOS OPTIONS The example above illustrates the- LOWER option set using a VT05 terminal. The VT05 terminal cannot print in lowercase. When this file is printed on a line printer, it will appear in its correct format. If you set your terminal to UC (uppercase), the M33 option is automatically set for you when you start 50S. If you set your terminal to LC (lowercase), the M33 option can only be set at Edit mode, since M37 is the default for lowercase terminal characteristics. (Refer to Chapter 6 for additional lowercase characters into a file.) Example: information about entering (using a LA36 terminal) ~SET TTY UC ~ • SOS TEST. MEM ~ Edit: TEST.MEM */LOWER~ *:=CASE ~ C64 Lower *F:l00 ~ 00100 ABCDEFGHI .JKLMNOf'(~RSTUVWXYZ ~ *P.~ 00100 *EB~ ABCDEFGHI.JKLMNOPQRSTUVWXYZ [dskc:test.mem[27,5107JJ • TYPE TEST. MEM GID 00100 abcdefghijklmnoPGrstuvwx~z A text line of all lowercase characters has been entered into the file TEST.MEM. With an uppercase-lowercase terminal set to uppercase, the line appears as uppercase during the 50S session, but when typed on the terminal or printed on the line printer, the text appears as lowercase. Example: .8ET TTY LC ~ • SDS test ~ 1TI(-;)1rI ~ Edit: TE8T.MEM *"=case ~ Model 37 C64 Upper *i200 ~ 00200 this line is all lowercase$ t GD *E.'b~ [dskc:test.ffieffi[27,5107JJ t'dF'E) 00100 00200 tf.~st. ffif:")ffi ~ abcdefghiJklmnoPGrstuvwx~z this line is all lowercase With an uppercase-lowercase terminal, such as a VT52, the LOWER option is not needed as the terminal can be set to lowercase. This setting will follow through for any program that you initiate while you are logged-in. 4-31 USING SOS OPTIONS Restrictions: The LOWER option can be set only at SOS command level and not in SWITCH.INI file or with any SOS command. 4-32 your USING SOS OPTIONS 4.4.19 M33 Settable: Yes IM33 Printable: Yes =CASE (via the CASE option) Default: On Reverse: By setting the M37 option Function: The M33 option sets normal terminal parameters, indicating that your terminal does not have lowercase alphabetic characters. When the M33 option is used with the C128 option, your terminal will not print lowercase characters and the C128 special-character convention will print instead. (Refer to Chapter 6, for more detailed information of this option when used with the C128, LOWER, and UPPER options.) (using a VT05 terminal) Example: + SET TTY UC @) + SOS/M:"33/C 12B INPUT: 00100 ALPHA. M3;"5 ~ ALPHA + M:"3~~ $ t ~ *;:::CASE G!D UF'PEF: */L()WEF~ @) *1100 @) 00100 'THIS IS AN 'M33 OPTION EXAMPLE f GD ['D'S'K'C:'A'L'P'H'A.'M33] */Uf'F'ER @) *F'. ~ T ' H.' I 'S ' I ' S ',A' N M3 3 ' () P ,. T ' I ' 0 'N ' E X ' A ,. M' F' , LIE • () 0 1 () 0 I I * This line when printed on the line printer would appear as: This is an M33 option example. Restrictions: If you set your terminal to uppercase (UC), the M33 automatically set for you when you start an SOS session. option is If you set your terminal to lowercase (LC), the M33 option is ignored if it is set with the SOS command, but it prevails if set in Edit mode after the SOS session has started. 4-33 USING SOS OPTIONS 4.4.20 M37 Settable: Yes IM37 Printable: Yes =CASE (via the CASE option) Default: Off Reverse: By setting the M33 option Function: The M37 option permits you to type and print lowercase alphabetic characters on your terminal. This option is dependent upon the type of terminal you are using to enter text in an 50S session. (Refer to Chapter 6, Typing Uppercase and Lowercase, for more detailed information on inputing uppercase and lowercase and your terminal type. ) On an uppercase-only terminal (one that will accept only uppercase characters), the M37 option will have no effect if set by itself and all alphabetic characters will type and print in uppercase only. If you have an uppercase-only terminal and you set the Cl28 option when the M37 option is already on, you should also set either the UPPER or LOWER option depending on which is more convenient for you, and then use the Cl28 conventions for entering uppercase and lowercase text. On a VT05-type terminal, the M37 option, when set, allows lowercase alphabetic characters to be entered as text. The characters appear as uppercase on the terminal screen, but when printed on the line printer, the characters appear lowercase. Example: (using a VT05 terminal) • SET TTY· LC G!) • SOS ALPHA. M37 GID INPUT: ALPHA.M37 00100 THIS IS AN M37 AND UPPER OPTION EXAMPLE 00200 ON A VT05 TERMINAL SET TO Le.$ t *=CASE~ MODEL 37 C64 UPPER * 4-34 USING SOS OPTIONS In the above example, you enter text by pressing the SHIFT key for uppercase as you would with a typewriter. The entire text appears as uppercase on your terminal screen, but when printed on the line printer, the test appears as follows: *F'100: 200 GIG 00100 This is an M37 and UPPER option example 00200 on a VTOS terminal set to Le. * Restrictions: If you set your terminal to lowercase (LC), the M37 automatically for you when you start an SOS session. option is set If you set your terminal to uppercase (Ue), the M33 option is in effect and the M37 option is ignored even if set with the sos command, but the M37 option can be set in Edit mode after starting the SOS program. 4-35 USING SOS OPTIONS [MAXLN I 4.4.21 MAXLN Settable: Yes /MA[XLN] :nnnnn Printable: Yes =MA[XLN] Default: 99999 Reverse: Not Applicable Function: The MAXLN option permits you to set the maximum line number (nnnnn) for input to a page of text within your file. After you have created the line whose number is the value of the MAXLN option, SOS automatically switches from Input mode to Edit mode. Example: + SOS/t1AXLN: 300 L. I NE • TXT GIG INPUT: LINE. TXT 001.00 THIS IS LINE 100 ~ 00200 THIS IS LINE 200 G!:D 00300 THIS IS L.INE 3()() C!!D *::::MAXLN ~ 00300 * Restrictions: When you have reached the MAXLN value, you must either create a new page or reset the MAXLN option. The value of the MAXLN option cannot be greater than 99999. When you use the Copy and Transfer commands, the lines copied or transferred may exceed the MAXLN value. You should then renumber (N command) your file, specifying a smaller increment for the line numbers. 4-36 USING SOS OPTIONS NAME 4.4.22 NAME Settable: Yes /NA[ME]:dev:filnam.ext[p,pn,sfdl, ••• ]<nnn) Printable: Yes =NA[ME] Default: None Reverse: Not Applicable Function: The NAME option permits you to change the full output file specification while at SOS command level. (Refer to Chapter 2, Giving Commands, for a complete description of full file specifications.) Example: • SOS SAMPL.E. TXT ~ Edit: SAMPLE. TXT */NAME: S(~RT. ALG ~ *~::NAME GID Df.)I~;C: SQFn" ALG t *E~ (DSKC:SQRT.ALG[27,5107]] The output file specification was changed during Edit mode. Restrictions: The NAME option can not be set in your SWITCH.INI file or with the SOS command at TOPS-lO command level, but only at the SOS command level. 4-37 USING SOS OPTIONS ~OBAK I 4.4.23 NOBAK Settable: Yes /NOB[AK] Printable: Yes =BAK Default: Off Reverse: By setting the BAK option Function: The NOBAK option permits you to suppress the Qxt file extension backup copy of a file when you give the End, Go, or World command. When you suppress the Qxt backup copy, the NOBAK option forces SOS to create a new source of the file being edited. Example: • SOS/NOBAK SAMPLE + TXT G!D Edit: SAMPLE. TXT *:::BAK~ No backup file will be created * Restrictions: If the OLD option is set with the NOBAK option, the OLD option override the NOBAK option and backup files will be created. 4-38 will USING SOS OPTIONS INODECIDE 4.4.24 I NODECIDE Settable: Yes /NODEC[IDE} Printable: Yes =DEC [IDE} Default: On Reverse: By setting the DECIDE option Function: The NODECIDE option permits you to suppress the DECIDE option for Substitute commands. By SOS default, this option is active when creating or editing a file. Example: • SO!:> NUMBFf-:. For;: ~~~ NUMBER.FOR EDIT: *::D[ClnF~ NO AUTO DECIDE */DECIDE(.::.C0 *:: DECIDE G~ (IUTO DECIDE * Restrictions: Not Applicable 4-39 USING SOS OPTIONS I NODELETE I 4.4.25 NODELETE Settable: Yes /NODEL[ETE] Printable: Yes =DEL[ETE] Default: On Reverse: By setting the DELETE option. Function: The NODELETE option is the SOS program default. The only time you must set the NODELETE option is when the DELETE option has been previously set to delete both the input file to an SOS session and the output file from an SOS session. The NODELETE option does not allow the deletion of your input file(s) when you issue the End, Go, or World command to save your file(s). Example: .80S SAMPL.E. TXT/DELETE GS> EDIT: SAMPLE. TXT *=:[IELETE ~ INPUT FILE WILL. BE DELETED. */NO[lf,LETE G!!) *=J;:'EL[TE (ill) INPUT FILE WILL NOT BE DELETED. * Restrictions: Not Applicable 4-40 USING SOS OPTIONS NONSEPARATORS 4.4.26 NONSEPARATORS Settable: Yes /NONS[EPARATORS] Printable: Yes =CASE (via the CASE option) Default: On Reverse: By setting the SEPARATORS option Function: The NONSEPARATORS option, when used, tells the SOS program that the period (.), the dollar sign ($), and the percent sign (%) characters are not punctuation marks and are alphanumerics (A through Z, o through 9). The NONSEPARATORS option is active by default when creating or editing a file. In Alter mode with this option, the Wand X instructions treat these three characters as part of the word being skipped or replaced. Example: • SOS NONSEF' .£XF' ~ Edit: NONSEF'.EXF' *Al00 ~ 00100 THE DOLLAR $IGN IS PART OF THE WORD -$IGN- t S$ *00200 * Restrictions: - - W S$ t t t WITH THE INONSEF'ARATORS OPTION IN EFFECT. Not Applicable 4-41 t USING SOS OPTIONS INONUMBER I 4.4.27 NONUMBER Settable: Yes /NONU[MBER] Printable: Not Applicable Default: Off Reverse: By setting the NUMBER option Function: The NONUMBER option permits you to suppress line-number printing on the terminal when you create or edit a file. This option is particularly useful when editing files that contain long lines for full-page printed output. The NONUMBER option is useful when editing extremely large files with increments of 1 that would contain Wrap Around. With a file this large# you can use the command formats of the Line Contents Specifications command to edit your file, thus avoiding line numbers. If you wish to use the standard SOS command format to create or edit your file, the NONUMBER option will allow SOS to use its default of 00100 with increments of 100, but the line ,numbers will not print. You may change the 100 default by using the Number command at SOS command level: the file will be renumbered, but the line numbers will still not print when specified with any SOS command as long as the NONUMBER option is set. Example: • SOS/NONUMBER TEST. MEM GD Edit: TEST.MEM *F'100 ~ ,, , , THIS IS LINE ONE GK)GD *P$ TWO$ @) ~~ :$FltJE$ G!.D ~ THIS THIS THIS THIS IS LINE TWO IS LINE THREE IS LINE FOUR IS LINE FIVE *Nl GID F'9 G!!) *THIS IS LINE NINE * 4-42 0SI~G 80S C?~rC~S The example above illustrates editing a file with the NONUMBER option set and using the Line Contents Specifications Print command format. (Refer to Chapter 8, Line Contents Specifications, for a description of this method of editing files.) Restrictions: If you specify any other options that pertain to line numbers, such as INCREMENT or START, SOS will ignore these options if the NONUMBER option with the SOS command is in effect. When you save your file after an SOS session using the NONUMBER option, SOS will save the file with line numbers unless you specify the S option of the End, Go, or World command, or set the UNSEQUENCE option. 4-43 USING SOS OPTIONS NOVICE 4.4.28 NOVICE Settable: Yes /NOV [ICE] Printable: Not Applicable Default: On Reverse: By setting the EXPERT option Function: The NOVICE option is the SOS program default. The only time you must set the NOVICE option is to change the setting from EXPERT. With the NOVICE option, error messages are printed in full on your terminal and the MASSIVE DELETE OK? message is displayed when you delete a large range of line numbers. with the Delete and Replace commands, the line number/page number(s) are echoed on the terminal. With the D and R instructions of the Alter mode, the deleted characters are echoed on your terminal enclosed in back-slashes. Example: + 80S/EXPERT NUMBER. FOR ~ Edit: NUMBER.FOR *Rl0 C!ID 00010 *INOVICE G!D TYPE 101 ~ *R*/l G!D 00090 ENII~ 1 Lines (00090/1) deleted * Restrictions: Not Applicable 4-44 USING SOS OPTIONS NUMBER 4.4.29 NUMBER Settable: Yes /NU[MBER] Printable: Not Applicable Default: On Reverse: By setting the NONUMBER option Function: The NUMBER option is the SOS program default. The only time you must set the NUMBER option is to change. from the NONUMBER option. The NUMBER option allows line numbers to print while you are creating or editing a file. Example: ... SOS/NONUMBEF~ BAMPLE ~ TXT~ INPUT: SAMPLE.TXT TH I SIS A NONUMBEF: OPT I ON EXAMPLE THAT WILL ~ CHANGE TO THE NUMBER OPTION.$ t */NUMBER ~ *F' C!!D 00100 00200 GD THIS IS A NONUMBER OPTION EXAMPLE THAT WILL CHANGE TO THE NUMBER OPTION. *[~ CDSKC:SAMPLE.TXTJ Restrictions: If you edit a file with the NONUMBER option set and during the SOS seSSIon you set the NUMBER option, SOS assigns the original line numbers to your file. The INCREMENT and START options used before the NUMBER option will have had no effect. 4-45 USING SOS OPTIONS 4.4.30 OLD settable: Yes /OL[D] Printable: Not Applicable Default: Off Reverse: Not Applicable Function: The OLD option permits you to create a Zxt file-extension backup-copy of the file being edited. If a Zxt backup-copy already exists, no new Zxt file will be created and the present Zxt file will remain unchanged. The OLD option does not suppress the Qxt file-extension backup-copy of an edited file, except on the first edit of a file. Example: • DIRECT G!D NUMBER FOR 4 (055) 2-FEB-78 DSKC: (27,5107] Total of 4 blocks in 1 files on DSKC: [27,5107] • SOS/OLD NUMBER. FOR 0!D Ed it: NUMBEr~. FOR *Hl() C!E) 00010 TYPE: 101G!D 1 Lines (00010/1) deleted *EG!D [DSKC:NUMBER.FOR[27,5107J] • DIRECT GID NUMBER FOF~ NUMBER lOR Total of 8 (055) 2--FEB-78 DSKC: <055) 2-FEB-78 block~; in 2 files on DSKe: [27,5107J 4 4 Restrictions: If the Zxt file extension already exists in your directory setting the OLD option will not create a new Zxt backup copy. area, If you set the OLD option with the NOBAK option, the OLD option override the NOBAK option. Thus, backup files will be created. will 4-46 USING SOS OPTIONS OPTION 4.4.31 OPTION Settable: Yes /OP[TION] :pointer-name Printable: Not Applicable Default: None Reverse: Not Applicable Function: The OPTION option permits you to set a list of option(s) identified in your SWITCH.INI file by "pointer-name". If, for example, you have a line in your SWITCH.INI file: .TYPE SWITCH.INI GIO 00100 SOS:DEF/M37/EXPERT/NONUMBERISEPARATORS where DEF is the pointer-name of the list of options, then you can set these options with the OPTION option by specifying DEF as the "pointer-name" in the /OPTION command. DEF is the pointer-name in your SWITCH.INI file that-has, in this example, the options DPY, M37, EXPERT, NONUMBER, and SEPARATORS assigned to it. (Refer to Section 4.2.3 for additional information about the Set option command and pointer-names.) Example: .80S NUMBER. FOR ~ Edit: NUMBER.FOR *.I0PTION:DEF ~ *·=CASE ~ Displa~ Model 37 C64 Separators Upper *,P~ 101 102 103 TYPE 101 FORMAT (' PLEASE TYPE A NUMBER.') ACCEPT 102"X FORMAT (F) TYPE 103,X FORMAT (' YOU TYPED THE NUMBER ',F) Y == 2 104 *X TYPE 104"X,Y FORMAT (' TWICE ',F,' IS ',F) END * Restrictions: If you specify a pointer-name that does not identify a list of options in your SWITCH.INI file, the error message? OPTION NOT FOUND will be displayed on your terminal. If you have misspelled an option within the list of options, the error message ? SYNTAX ERROR IN OPTION FILE will be displayed on your terminal. 4-47 USING SOS OPTIONS [] 4.4.32 Period (.) Settable: Not Applicable Printable: Yes . line number/page number Default: None Reverse: Not Applicable Function: The Period option prints the current position in the position consists of the line number and page number. file. Example: *=.~ 00700/3 * The current position within the file is line number 700 on page 3. Restrictions: Not Applicable 4-48 The USING SOS OPTIONS PLINES 4.4.33 PLINES Settable: Yes /PL[INES] :n Printable: Yes =PL[INES] Default: 16 Reverse: Not Applicable Function: The PLINES option permits you to change the number of lines that print on your terminal when you give the Print command. The n argument can be any value from 1 to 99999. The SOS default value for this option is 16 lines. Example: • SOS/PL I NES : 3 n(H~T. ALG Q!D EDIT: SQRT.Al.G *F' QIi) 00100 BEGIN 00200 REAL X, Y; 00300 WRITE C' [2C] TYPE THE VALUE OF X: *=PLINES QIi) 3 * Restrictions: Not Applicable 4-49 (B]')~ USING SOS OPTIONS IPMAR 4.4.34 I PMAR Settable: Yes /PM[AR] :n Printable: Yes =PM[AR] Default: 1 Reverse: Not Applicable Function: The PMAR option is used to set the first line indentation of a paragraph. Its default value is 1. The n can have a value from 0 to the width of the text. Example: .50S SAMPLE. TXT ~ Edit: SAMPLE. TXT *~:F'MAF~ @) 1 * Restrictions: The PMAR option can be used only when the Justification command has been assembled for SOS. That is, this option has no meaning without the previous use of the Je, JL, JR, JU, or JW command, and changing its default value will have no effect during an SOS session. 4-50 USING 50S OPTIONS IREADONLVI 4.4.35 READONLY Settable: Yes /R[EADONLY] Printable: Not Applicable Default: Off Reverse: Not Applicable Function: The READONLY option permits you to make NO updates to a file. When you use this option, you can only read the file; you can use only the following 50S commands: 1. Alter (A) 2. Find (F) 3. List (L) 4. Print (P) (the E, L, P, 5, and W Alter instructions only) 50S ignores the World command if the READONLY option is in effect; it accepts the End command as if you had issued an EQ command. All other 50S commands receive only the error message: %ILLEGAL COMMAND. Example: + SOS/f<EADONL Y SOSREF. F~NO G£) READ: SOSREF.RNO *[13::=;00 ~ XILLEGAL COMMAND *1:~2()O ~ %ILLEGAL COMMAND *C3()OO,. 7500: 80()() ~ XILLEGAL COMMAND *P;3000 ~ 03000 ~~DIGITAL\\. * 4-51 USING SOS OPTIONS Restrictions: You cannot remove this option during an SOS session~ session and start SOS again without this option. you must end the If you place the READONLY option in your SWITCH.INI file, the error message ? SYNTAX ERROR IN DEFAULT OPTIONS will appear when you start an SOS session. If the READONLY option is included in a list of options identified by a pointer-name, the error message? SYNTAX ERROR IN OPTION FILE will appear when you issue the /OPTION:pointer-name command. Therefore, the READONLY option can only be set with the SOS command at TOPS-lO command level. 4-52 USING SOS OPTIONS RMAR 4.4.36 RMAR Settable: Yes /RM[AR]:nn Printable: Yes =RM[AR] Default: 69 Reverse: Not Applicable Function: The RMAR option is used to set the Right Margin of a printed page of output. Its default value is 69. The value of n is dependent on the desired width of the text. Example: c.SOS SAMPLE. TXT ~ EDIT: SAMPLE.TXT *::::RMAR ( IUT-) 69 * Restrictions: The RMAR option can be used only when the Justification command has been assembled for SOS. That is, this option has no meaning without the previous use of the Je, JL, JR, JU, or JW command, and changing its default value will have no effect during an SOS session. 4-53 USING SOS OPTIONS 4.4.37 RUN Settable: Yes /RU[N]:dev:program-name.ext[p,pn,sfdl, ••• ] Printable: Yes =RU[N] Default: SYS:COMPIL Reverse: Not Applicable Function: The RUN option permits you to specify the program to be run when you end an SOS session with the Go command.' The "dev", if not specified, is SYS. The "program-name" can be up to six alphanumeric characters and can be any executable TOPS-IO program. The ".ext", if not specified, defaults to .EXE. The "[p,pn,sfdl ••• ]" is the directory path. (Refer to Chapter 2, Giving Commands, for a complete description of full file specifications.) Example: .sos NUMBER.FOR ~ Edit: NUMBER.FOR *=RUN ~ SYS:COMPIL */RUN: SYS: FORTRA. EXE ~ *STIPE $TYF'E $'" :*,N ~ t t GD CED *=RUN~ SYS:FORTRA.EXE *OG!!) [DSKC:NUMBER.FOR[27,5107]] FORTRAN: NUMBER MAIN. LINK: Loading [LNKXCT NUMBER Execution] PLEASE TYPE A NUMBER. 45 YOU TYPED THE NUMBER 45.0000000 TWICE 45.0000000 IS 90.0000000 END or EXECUTION CPU TIME: 0.12 ELAPSED TIME: 4.00 EXIT Restrictions: Not Applicable 4-54 USING SOS OPTIONS SAVE 4.4.38 SAVE Settable: Yes /SA[VE] :n Printable: Yes =SA[VE] Default: Off Reverse: Not Applicable (zero or none) Function: The SAVE option permits you to automatically back up the file being edited after the specified number, n, of SOS commands. The number that you specify may be any value from 1 to 99999. The backup takes place automatically without your having to leave the SOS session. This option works in the same way as the World command. The SAVE option, when printed, displays the number of editing SOS commands that must be given before an Auto-Save is performed. (The ISAVE option, in contrast, specifies the number of lines that must be inserted before an Auto-Save.) Example: • SOS/SAVE: 3 ALPHA. F~NO:=NOTE. RNO GB EDITt NOTE.RNO *Rl00 ~ 00100 +LOWER CASE.FLAG CAPITALIZE ~ 1 LINES (00100/1) DELETED *A500 G:0.) BECAUSE ALL CHARACTERS ARE MADE 00500 t 2SR *::=SAVE ~ 1. *X600 ~ 00600 • END NOTE ~ [DOING AUTO-SAVE, PLEASE WAIT.] [DSKC:ALPHA.RNO[27,S107]] *=SAVE ~ 3 * Restrictions: If you give the World command before an Auto-Save is done, the SAVE value IS reset to the value specified when you had set this option; that is, the full value of the SAVE option is needed before the next Auto-Save occurs. If you set the UNSEQUENCE option and the SAVE option, Auto-Save will not un sequence your file when it is backed up, and a warning message is displayed on your terminal. 4-55 USING SOS OPTIONS [SEPARATORS I 4.4.39 SEPARATORS Settable: Yes /SEP[ARATORS] Printable: Yes =CASE (via the CASE option) Default: Off Reverse: By setting the NONSEPARATORS option Function: The SEPARATORS option, when used, tells SOS that the period (.), the dollar sign ($), and the percent sign (%) are not alphanumerics and are punctuation marks. The SEPARATORS option is of particular use when creating or editing COBOL, FORTRAN, and MACRO source program files because you may use these three characters as part of the program language. In Alter mode with this option, the Wand X instructions treat these three characters as separators and not part of the word being skipped or replaced. Example: .'SOS/SEF'ARATORS NONSEF'.EXF'~ EDIT: NONSEP.EXF' *Al00:200 ~ 00100 THE DOLLAR $IGN IS NOT PART OF THE WORD ·$IGN· - t 00200 tt - t f SN t 3D G!:D * Restrictions: t tt t S$ WW W INOTG) ~ S$ wwGIQ WITH THE \\NON\\SEPARATORS OPTioN IN EFFECT. Not Applicable 4-56 USING SOS OPTIONS SEQUENCE 4.4.40 SEQUENCE Settable: Yes /SEQ[UENCE] Printable: Yes =SEQ[UENCE] Default: On Reverse: By setting the UNSEQUENCE option Function: The SEQUENCE option is the SOS default option; it leaves the line numbers in the output file when the SOS session ends. You only have to set this option when you have previously set the UNSEQUENCE option to remove line numbers. Example: t SOS/UNSE(~UENCE NOTE. RN()~ Elt:[ T: NOTE. F;:NO *:=SEUUENCE C!!2) NO SEQUENCE NUMBERS WILL BE ON OUTPUT FILE */SEUUENCE ~ *=SEHUENCE G!D SEmJENCE NUMBERS WILL BE ON OUTPUT FILE * Restrictions: Not Applicable 4-57 USING SOS OPTIONS 4.4.41 START Settable: Yes /STA[RT]:n Printable: Yes =STA[RT] Default: 100 Reverse: Not Applicable Function: The START option permits you to change the value of the starting line number from its default value of 100. The value may be from 1 to 99999. The START option by itself only indicates the number of the first line; all subsequent lines default to an increment of 100 plus the START value. Example: • SOS TEXT. TXT/STAf(f: 5 C!!D INPUT: TEXT.TXT 00005 THIS IS A START OPTION EXAMPLE.~ 00105 THE SECOND LINE IS 100 PLUS THE ISTART VALUE.~ 002()5 EACH LINE IS INCREMENTED BY THE DEFAULT OF 10().~ 00305 $ t GD *==START G!I) r~' ..I * Restrictions: When the START option is used for editing a file, that file must been un sequenced prior to the SOS session. have To have line numbers increment with the same value as the START option, set the INCREMENT or STEP option with the same value as the START option when you start the SOS session. 4-58 USING SOS OPTIONS ISTEP I 4.4.42 STEP Settable: Yes /STE[P] :n Printable: Yes =STE[P] Default: 100 Reverse: Not Applicable Function: The STEP option is similar to the INCREMENT option and can be used by itself to indicate the starting line number and each subsequent line number increment within a file. You may use the STEP option to change the SOS default. The numeric value that must be specified with the STEP option may be from 1 to 99999. Example: • SOS COBOL. CBL/STEP: 3 ~ INPUT: COBOL.CBL 00003 ID DIVISION. ~ 00006 AUTHOR. USER-ID.~ 00009 DATA DIVISION. ~ 00012 WORKING-·STORAGE SECTION. ~ 00015 $ ob *=STEP@) 00003 *=INCREMENT G!D 00100 * Restrictions: The Insert and Replace commands cannot change the value option, but they can change the INCREMENT option. 4-59 of the STEP USING SOS OPTIONS STRING 4.4.43 STRING Settable: Not Applicable Printable: Yes =STR [ING] Default: None Reverse: Not Applicable Function: The STRING option is printable only. It permits you to check the current default of a Find or Substitute command. The STRING option also prints the range contents used when you are editing a file by line-contents specifications. (Refer to Chapter 8, Line Contents Specifications, for a description of range specifications and the STRING option.) Example: .SOS NUMBER.FOR ~ EDIT: NUMBER.FOR *FTIPEl ~ GD 00010 TIPE 101 *STIP[$TYPE$ GIG t t GD QD 00010 TYPE 101 *=STRING GIG FIND: TIPE SUBSTITUTE: TYPE FOR: TIF'E LINE-CONTENTS: 1: ~~ : *sG!D 00020 00050 00060 00080 * Restrictions: 101 103 FORMAT (' PLEASE TYPE A NUMBER.') TYPE 1()3,X FORMAT (' YOU TYPED THE NUMBER ',F) TYPE 104,X,Y Not Applicable 4-60 USING SOS OPTIONS /UNSEQUENCEI 4.4.44 UNSEQUENCE Settable: Yes /UN[SEQUENCE] Printable: Yes =SEQ[UENCE] Default: Off Reverse: By setting the SEQUENCE option Function: The UNSEQUENCE option permits you to remove line numbers from the output file when ending an SOS session. The UNSEQUENCE option performs the same function as the S option of the End, Go, or World command. In fact, you may use the S option of the End, Go, or World command to unsequence your saved output file to avoid the use of the UNSEQUENCE option. Example: .SOS TEXT. TXT ~ EDIT: TEXT. TXT *::::SEl~UENCE ~ SEQUENCE NUMBERS WILL BE ON OUTPUT FILE */UN!3EQUENCE ~ *:::~;El~U[NCE 0ID NO SEQUENCE NUMBERS WILL BE ON OUTPUT FILE * Restrictions: If you set the UNSEQUENCE option and then give the WS command an SOS session, the following error message will appear: during • SOS/UNSE[~UENCE TEXT. TXT ~ Edit: TEXT.TXT *WS~ [WARNING: Seauence Numbers Preserved] lDSKC:TEXT.TXT[2J,510J]] This error message indicates that both backup file will contain line numbers. your current file and your If you give the ES command with the UNSEQUENCE option set, your current file is unsequenced, but your backup file (Qxt or Zxt) will contain line numbers. 4-61 USING SOS OPTIONS @PPERI 4.4.45 UPPER Settable: Yes /UP[PER] Printable: Yes =CASE (via the CASE option) Default: On Reverse: By setting the LOWER option Function: The UPPER option is the SOS program default for the alphabetic character representation. with either an uppercase-only terminal or an uppercase-lowercase terminal, all alphabetic characters appear as uppercase when typed. To enter lowercase characters into a file with the UPPER option set, you must specify the Cl28 option and precede each lowercase character with a single quote character ('). (Refer to Chapter 6 for additional uppercase characters into a file.) information about Example: SOS SAMPl.E. TXT G£D E[lIT: SAMPLE. TXT t *;";CASE~ C64 UPF'Er~ *I'~~ ()OO~)O TH I SIS AN 00050 THIS IS AN UPPERCASE EXAMPLE. *P. ~ UF'F'EF~CASE EXAMPl.E. (!~iJ */C128~ *1. GIQ 00075 T'H'I'S 'I'S LOWERCASE 'W'I'T'H UPPER 'O'P'T/I'()/N ~ */C64~ * 4-62 entering USING SOS OPTIONS Two lines are inserted at the beginning of SAMPLE.TXT • • SET TTY LC~ .t~pe sample.tHt~ 00050 00075 THIS IS AN UPPERCASE EXAMPLE. This is LOWERCASE with UPPER option • ••••••••• • set tt~ uc ~ • TYPE SAMPLE. TXT ~ 00050 THIS IS AN UPPERCASE EXAMPLE. 00075 This is LOWERCASE with UPPER option • ••••••••• The TOPS-IO command SET TTY LC or SET TTY UC affects only the input characters. This command does not affect output if your terminal will print lowercase characters. Restrictions: Not Applicable 4-63 USING SOS OPTIONS 4-64 CHAPTER 5 SOS COMMAND DESCRIpTIONS 5-1 SOS COMMAND DESCRIPTIONS SOS COMMAND DESCRIPTIONS Chapter 5 contains descriptions of all the SOS Commands for the TOPS-IO SOS program. The SOS Commands are in alphabetical order, each starting on a right hand page for easy reference. There are eleven possible headings in each description; these headings are listed and explained in the following text: Function Contains one or two sentences briefly describing what the command does. Format Describes the syntax of the command its command name, arguments, and options. Arguments Describes the attributes or values must be supplied with the command. Options Describes the attributes or values that are optional. Commands that have optional values may also have default values. Hints Outlines convenient functions the command can perform and references other commands you might use along with the one being described. Restrictions Describes the limitations and Also peculiarities of the command. explains common error messages you may receive while giving the command. Special Cases Describes specifically how the command operates in certain special cases. Instructions Describes the function and syntax each subcommand which you may give. Characteristics Describes special extended characteristics, features, or formats of the command. Operation Lists instructions describing how to give the command, with an example of a typical command. Examples Shows a few common ways to give the command. In examples, anything you type appears in red print, anything the system types appears in black. 5-2 that of SOS COMMAND DESCRIPTIONS I®I ~- 5.1 LINEFEED COMMAND Function The Linefeed command has three functions: 1. In Edit mode, the Linefeed command prints the the file. next line in 2. with the I instruction in Alter mode, Linefeed creates a line. (Refer to the description of the Alter command.) new 3. with the eXtend command, Linefeed creates a new line. (Refer to Section 5.27 for the description of the eXtend command.) Format Restrictions If you are located at the last line of your Linefeed command, SOS prints the message: file and give the %NO SUCH LINE(S) and returns to Edit mode. You may then give any SOS command. Examples 1. You print the next line in a file after line number 04550. *P4550 GD 04550 THIS IS LINE NUMBER 04550. *GO 04560 2. IN EDIT MODE, <LF) PRINTS THE NEXT LINE. * You try to print the next line, but you are already positioned at the last line of the file. *GD ?::NO SUCH LINE(S) * 5-3 SOS COMMAND DESCRIPTIONS 3. You alter line 300 by pressing the LINEFEED key instruction of Alter mode to create a new line. ,P300 ~ 00300 THIS IS AN ALTER EXAMPLE. *A300 ~ 00300 THIS IS AN ALTER t SRQQ 00350 EXAMf'LE. * 5-4 after the S SOS COMMAND DESCRIPTIONS ~- 5.2 ESCAPE COMMAND Function The ESCape command has five functions: 1. In Edit mode when you press ESCape as the only line, the previous line prints. input for a 2. In Input mode when you press ESCape, Input mode terminates. {Refer to the description of the Lnsert and Replace commands, Sections 5.12 and 5.21.} 3. In Alter mode when you press ESCape, the string you are inserting after an Alter mode I, R, or X instruction terminates. {Refer to the description of the Alter command, Section 5.3.} 4. In Edit mode with the Find and Substitute commands, ESCape terminates the existing-string and/or the new-string. {Refer to the descriptions of the Find and Substitute commands, Sections 5.7 and 5.23.} 5. In Edit mode with the eXtend command, ESCape ends the line extension and starts Alter mode. {Refer to the description of the eXtend command, Section 5.27.} Format Restrictions If you press the ESCape key when you are at the your file, your terminal prints the message: first %NO SUCH LINE{S} You may give another command; 5-5 no change has occurred. line of SOS COMMAND DESCRIPTIONS Examples 1. You press the ESCape key to print the previous line. *~ 05600 THE (ESC) COMMAND PRINTS THE PREVIOUS LINE. * 2. You use the Find command to locate the text string "WORDS" in lines 100 through 800. The ESCape key indicates the end of the existing-string. *FWORDS$l 00: 800 GIQ t 00600 GO ESCAPE ENDS THE STRING CALLED ·WORDS-. * 5-6 SOS COMMAND DESCRIPTIONS D MOVE COMMAND 5.3 Function The (Move) command moves your current position in the file but does not print the line. Format *.position~ Argument position indicates the line to which you want to move the pointer. The position can take the form of either line/page number or line contents. Hints The Print command performs the same function, but also prints the line. The Period option only prints your current position in the file. Restrictions If you indicate a nonexistent line, SOS prints the message: %NO SUCH LINE(S) then prints an asterisk. command. Find a nearby line and reissue the If you indicate a nonexistent page, SOS prints the message: %NO SUCH PAGE then prints an asterisk. command. Choose the correct page and reissue the 5-7 SOS COMMAND DESCRIPTIONS Examples 1. You make the current position line 900 on page 4. *.900/4 ~ * 2. You make the current position the first line on the first page. 3. You attempt to position on the first line of the last the last page does not contain any lines. page, but Y.No such line(s) * 4. By using line contents specifications, you move your position to a line in your file that contains the woras MOVE TO HERE. (Refer to Chapter 8, Line Contents Specifications, for a complete description of how to issue SOS commands in this format.) , ~ , @) *.$MOVE TO HERE$/l0D ~ * 5-8 SOS COMMAND DESCRIPTIONS 5.4 / SET COMMAND Function The / (Set) command sets an SOS option. Chapter 4 contains a complete description of all the SOS options. Appendix B contains a list of them. Format */option-name:value ~ Argument option-name is the name of the option that is settable. option :value is the option value. Some options do not take a value, because they are either on or off, as switches are. Hints Many options can be preceded by the prefix NO to counteract their operation. Restrictions If you give a nonexistent option name or misspell an option name, SOS prints the mes~age: %ILLEGAL COMMAND followed by an asterisk. You should find the correct option name and format from Appendix B and reissue the command. 5-9 SOS COMMAND DESCRIPTIONS Examples 1. You set the increment value to 50. *1 INCREMENT: 50 ~ 2. * You try to set the SEPARATORS option, but misspell it. */SEPERATORS G2) r.ILLEGAL COMMAND */SEF'ARATORS ( RH) * 3. You set all the options as specified by the pointer-name MODE your SWITCH.INI option file. *IOF'TION :MODE ~ * 5-10 in SOS COMMAND DESCRIPTIONS 5.5 = GIVE COMMAND Function The = (Give) command prints the value or setting of any printable option. (Refer to Appendix B, Summary of SOS Options, to find which options are printable.) Format *=option-name~ Argument option-name is the name of an option that is printable. Restrictions If you type a nonexistent name or mistype a name, SOS prints: %ILLEGAL COMMAND * Refer to Appendix B, Summary of SOS Options, and/or command. reissue the typing the Examples 1. You may request your current =CASE command. terminal settings by *"-::CASE GiD MODEL 37 C64 SEPARATORS UPPER * 2. If you get an error message when the EXPERT option is in effect and you want a fuller message, type the =ERROR option, and the error message will be printed in full. Y.ORDER *=ERROR~ r.OUT OF ORDER * 3. You want to know the current position of the pointer during an sos session. The period (=.) option prints the pointer's current line number/page number. *=.~ 01300/2 * 5-11 SOS COMMAND DESCRIPTIONS 5-12 SOS COMMAND DESCRIPTIONS 5.6 @ INDIRECT COMMAND Function The @ (Indirect) command takes commands from a file rather than from your terminal. When SOS reaches the end of the file, it prints the message: %INDIRECT EOF or %CMEND if the /EXPERT option is set. Format *@filespec~ Argument filespec is the file specification of the file containing the indirect commands. This argument can be specified as a full file specification as follows: dev:filnam.ext[p,pn,sfdl, •.• ]<nnn) (Refer to Chapter 2, Giving Commands, for a complete description of full file specifications and additional information on indirect command files and their use.) Hints Output from the indirect commands will unless you suppress it by using: print on your 1. The S option of the Print and eXtend commands 2. The N option of the Find and Substitute commands All error messages occurring from the execution command will appear on your terminal. of an terminal indirect If the indirect file contains a Substitute command with the D (Decide) option, you must respond to the decide prompt from your terminal, rather than from within the indirect file. (Refer to Example Number 2.) 5-13 SOS COMMAND DESCRIPTIONS Restrictions If a command in the indirect file is illegal, SOS prints the standard error message, %ILLEGAL COMMAND, plus another message indicating the incorrect-command. You can not give an indirect command from an indirect file; that is, you can not nest indirect files. If you try to, SOS prints the message: %ILLEGAL COMMAND COMMAND # OOOOn where n is its position in the indirect file. SOS will then continue to process the next command in the indirect command file, if another command exists. If there is an error reading the command file, SOS prints the following message and terminates taking commands from the file: ?ERROR READING INDIRECT FILE Examples 1. You take commands from the indirect command file COMNDl.CMD which contains commands to print line 100, print line 200, and delete line 300. 00100 00200 00300 PIOO P200 D300 Note that SOS reprints %INDIRECT EOF message. the last message after giving the * @COMNDl • CMD ~ 00100 THIS IS THE FIRST LINE OF TEXT 00200 THIS IS THE SECOND LINE OF TEXT 1 Lines (00300/1) deleted A::Indi rf:~ct EOF 1 Lines (00300/1) deleted 2. * You edit a text file TEXT.RNO that contains the word "may" where the word "can" should be. The indirect command file SUB.CMD contains one line S may '= can '=~:*,D (created in C128 mode) which causes SOS to substitute and decide on each substitution. The following example shows the results of executing SUB.CMD while in the Edit mode for the TEXT.RNO file. *@SUB • eMf! 0ID 00250 GO 00540 You can Print lines with an indirect file. The file extension can be omitted when GQ 00550 G) create an indirect file. You can i::Indi J'ect (OF * 5-14 ~ou SOS COMMAND DESCRIPTIONS 3. You edit a file with the indirect file COM.CMD, which appears as: 00100 00200 00300 plOO 8200 P300 Line 00200 contains an illegal command, 8200 instead of P200. *&COM ~ CMD G!::Q 00100 THIS IS THE FIRST LINE OF TEXT %Ille~al command COMMAND t 00002 THIS IS THE THIRD LINE OF TEXT %Indirect EOF * SOS indicates that the second command in the indirect file illegal and continues to process the indirect command file. 5-15 is SOS COMMAND DESCRIPTIONS 5-16 SOS COMMAND DESCRIPTIONS 5.7 ALTER - A COMMAND Function The Alter command starts Alter mode, which allows you to edit a line or lines without having to retype the unchanged portion. Alter mode has its own instructions which do not echo on your terminal. Format *Arange~ Argument range specifies the range of lines you want to alter. Hint To abort an Alter command, give the Alter mode Q instruction which restores the current line and returns to Edit mode. Restrictions When using the Alter C, I, R, and X instructions, the BACKSPACE key, used as a way to delete characters, will echo back a CTRL/H (ftH) for each backspaced character in the line being altered. If you specify an invalid range or lines that do not exist, SOS responds with the error message: %NO SUCH LINE(S). If you press any character or key that is not described in this section, the bell will sound on your terminal, because that character or key is invalid in Alter mode. Alter Mode Instructions After you give the Alter command, your terminal prints the number of the first line you want to alter. Give anyone of the following Alter mode instructions which operate in the following way: 1. The instructions themselves do not print on your terminal as do Edit mode commands; however, changes you make to the line do print. 2. While editing each line, the pointer of your terminal always points to your current position in the line. When counting characters, always consider the position of this pointer to be in FRONT of the character it is pointing to. After you alter the first line, continue to alter lines until you reach the end of the range you gave in the initial Alter command. 5-17 SOS COMMAND DESCRIPTIONS If you type any character that is not an Alter mode your terminal will sound the bell (CTRL/G). instruction, In the descriptions of the Alter mode instructions, the following symbols are used: Symbol Meaning - (underscore) Indicates the position of the pointer (that is, the carriage or cursor on your terminal) BEFORE you give the instruction. n Represents an integer number which, if omitted, defaults to 1. The n is used to make an instruction operate on the next n characters. - (minus sign) Indicates that the particular instruction can work either forward or backward from the present position. When you use the minus sign (-), the instruction operates on the last (or previous) n characters: otherwise, without the minus sign (-), the instruction operates on the next n characters. c Shows where you can type a format of an instruction. chrs Shows where you can type more than one character in the format of an instruction. 5-18 single character in the SOS COMMAND DESCRIPTIONS Alter Mode Format Instructions Function When you press RETURN, SOS prints the rest of the line, then ends Alter mode for the current line. You can then alter the next line (if one exists) in the range given with the A command. Pointer: After the instruction, the pointer is at the beginning of the next line. (You may still be in Alter mode or you may be in Edit mode, depending on the range of the Alter command.) *A90()~ 00900 n~ THE RETURN KEY ENDS ALTER MODE. * Advances the pointer n characters to the right. (Remember to count the character currently being po inted to.) Pointer: After the instruction, the pointer is in front of the nth character. *A5()()~ 00500 TO MOVE AHEAD, PRESS THE SPACE BAR t 8CD * 5-19 SOS COMMAND DESCRIPTIONS Alter Format Mode Instructions Function Moves the pointer back n characters. In moving the pointer, your terminal prints a single backslash (\), then the letters that are passed over. When you give the next Alter mode instruction, your terminal prints a second backslash. If you try to move past the beginning of the line, your terminal reprints the line number, glvlng you a fresh line to work on. This instruction does not delete the characters that it passes over. On a VT05 terminal, the RUBOUT key will operate in the same way as the DELETE key. Pointer: After the instruction, the pointer is in front of the nth character to the left. *P200~ 00200 THE DELETE INSTRUCTION MOVES LEFT. 00200 THE DELETE INSTRUCTION MOVES\SEVOM\MOVES LEFT. *A200~ t t 2SS t * Moves the pointer to the end of the line, printing the characters it passes over. When preceded by a minus sign, the TAB instruction moves the pointer backward to the beginning of the line, but this time your terminal encloses the characters in backslashes, prints them in reverse order, and starts a new print line. Pointer: )/I A33~:.i 00335 After a TAB instruction, the pointer is after the last character in the line. After a -TAB instruction, the pointer is in front of the first character in the line. GID MINUS TAB COMMAND\DNAMMOC BAT SUNIM\ t .... G;D 5-20 SOS COMMAND DESCRIPTIONS Alter Format Mode Instructions Function Cancels any changes you have made to the current line, then restores the current line so you can start your changes again. Pointer: After the instruction, the pointer is in front of the first character on the current line. *P~:500~ 00500 CTRL/U INSTRUCTION RESTORES THE LINE. *A500GIQ 00500 CTRL/U \\INSTRUCTION\\ RESTORES THE LINE.~U t 81 00500 t t llD CTRL/U INSTRUCTION RESTORES THE LINE. * nCchrs Deletes the next n characters (n is an integer), then lets you insert up to (and including) n new characters in their place. Your terminal does not print the deleted characters. If you type an incorrect character, you may use the DELETE or RUBOUT key to back up. SOS will print the incorrect character enclosed in backslashes. To retype the correct character, you must type it twice. If the pointer is initially at the end of the line, SOS ignores the instruction. You may not create new lines (that is, insert Linefeeds) with the Alter C instruction. If you want to insert less than n instruction new characters, use the Alter R instead of the C instruction. Pointer: After the instruction, the pointer is after the last character you inserted. *P4!:.:jO()~ 04500 THE C 1NSTRRCTION CHANGES T£8T+ *A4~:jOO~ 04500 THE C INSTRI\I\UCTION CHANGES TEXT • .- .... t t CI GIQ Uu::.~sn t cxGID * Note that in this example, the 2SR searches for the second R in INSTRRCTION. By mistyping an I instead of an U, you must press DELETE and type U twice to put it in the line. The 2SS after the U insertion searches for the S in TEST. This S is changed to X. 5-21 SOS COMMAND DESCRIPTIONS Alter Format nD -nO Mode Instructions Function Deletes the next n characters: if you include the minus sign, it deletes the previous n characters. Your terminal prints two backslashes and the deleted characters. When you give the next Alter mode instruction, your terminal prints a second set of backslashes to enclose the deleted characters in backslashes. If you set the EXPERT option, your terminal does not print the deleted characters. If the pointer is at the end of the line when the instruction is given, the instruction is ignored unless it includes the minus sign. Pointer: After the instruction, the pointer is after the last character you deleted. If you use the minus sign, the pointer is before the last character you deleted. *F'1 :3()0 0iD 01500 THE D INSTRUCTION DELETES CHARACTERS. *A.~ 01500 THE D \\INSTRUCTION \\ t SI *P.@) 01500 t t 12[1 E THE D DELETES CHARACTERS. * Note that in this example, 11 letters and the blank following the word are deleted; this helps maintain correct spacing in the line. E Ends Alter mode for this line without printing the rest of the line. *F'600~ 00600 THE E INSTRUCTION ENDS ALTER. *A.~ 00600 THE E INSTRUCTIDN t w t t ww * 5-22 t E SOS COMMAND DESCRIPTIONS Alter Instructions Function Format incIchrs ~ Mode Inserts characters, starting at the present position and continuing until you press ESCape. If you mistype any characters in the insertion, you can use the DELETE or RUBOUT key to correct the incorrect character insertion. If more than 497 characters are on the line (not including deleted characters), SOS prints the message %LINE TOO LONG and restores the line as it was before you entered Alter mode. New Lines: To insert a new line containing the characters from the present position to the end of the current line, press LINEFEED. The pointer is now before the first character of the new line. If you placed an increment before the I instruction (that is, inc) SOS uses that increment in creating the new line number; otherwise, it uses the current increment. If using the given increment makes the new line out of order, SOS uses a line number halfway between the current line and the next line. Should no more lines be available, SOS prints the message %OUT OF ORDER, retypes the current line up to the current position, and allows you to insert more characters. Terminating: To end the Alter I instruction, press either ESCape or RETURN. ESCape terminates only the Alter I instruction. RETURN terminates both the Alter I instruction and Alter mode for the current line. *F'6700~ 06700 *A.~ 06700 THE I INSTRUCTION CHARACTERS. THE I INSTRUCTION INSERTS CHARACTERS. t t IINSERTSGQ@:)@) 2SC * 5-23 SOS COMMAND DESCRIPTIONS Alter Format J Mode Instructions Function Places the rest of the line at the front of the next line in the file. If you are located at the last line in the file, SOS prints %NO NEXT LINE and reprints the line up to the current position. *F"":* G!D 00100 THE J INSTRUCTION BRINGS TEXT TO 00200 THE NEXT LINE. *Al00GD 00100 THE J INSTRUCTION t 00200 w t t W W t J BRINGS TEXT TO THE NEXT LINE. * nKc -nKc Deletes all the characters in the current line from the present position up to (but not including) the nth occurrence of the character c just as if you had given the necessary number of Alter D instructions. Given with a preceding minus sign, the K instruction deletes backwards through (and including) the nth occurrence of the character. Note that the nK instruction deletes up to the nth occurrence of the character, while the -nK instruction deletes through the nth occurrence of the character. *F'650~ 00650 *A.~ 00650 THE K INSTRUCTION IS A LONGER DELETE. THE K INSTRUCTION \\IS A LONGER DELETE\\. t *P.G!D t t GIO K. 3S1 00650 - .- THE K INSTRUCTION • * If n is not given in the format, the K instruction will not work and will not sound the terminal bell or print an error message. *P650~ 00650 THE K INSTRUCTION IS A LONGER DELETE. *A.G:£D 00650 THE K INSTRUCTION \\ NOITCURTSNI\\ t t 3SI *P.~ 00650 -2KI THE K IS A LONGER DELETE. * 5-24 t E SOS COMMAND DESCRIPTIONS Alter Format L Mode Instructions Function Prints the rest of the line on your terminal and then reprints the current line number with the pointer positioned before the first character. *Pl00~ 00100 THE L INSTRUCTIDN PRINTS THE L.INE. *Al00~ 00100 THE L t 00100 P SI INSTf~UCTION PRINTS THE LINE. t L.. Prints the rest of the line on your terminal and then reprints the current line and moves to the current position. *Pl00~ 00"750 THE P INSTr~UCTI()N REPRINTS TO POSITION. *A750~ 00750 THE P I NS Tf~UCT I ON REPRINTS TO POSITION. 00"750 2SR P THE P INSTRUCTION t Q t Restores the original contents of the current line, then Quits (that is, ends) Alter mode for the entire range. *F'985 ~ 00985 THE Q INSTRUCTION QUITS ALTER MODE. *A98t:;: 1000 ~ 00985 THE Q ,\INSTRUCTION\\ _. t SI - t l1D *P985~ 00985 t Q THE Q INSTRUCTION QUITS ALTER MODE. * 5-25 SOS COMMAND DESCRIPTIONS Alter Format Mode Instructions Function Deletes n characters, then gives an insert instruction. The R instruction lets you insert (replace) as many characters as you want (up to a line length of 497). With a preceding minus sign, the R instruction deletes through the previous n characters, then lets you insert. The n characters that are deleted are enclosed in backslashes as with the Alter D instruction. With the EXPERT option set, the deleted contents and the backslashes do not appear on your terminal. The number of characters deleted and the number of characters inserted do not have to match (as they do with the C instruction). Pointer: After the instruction, the pointer is after the last character you inserted. *PI010!2 ~ 01010 THE R COMMAND DELETES N CHARACTERS 01020 THEN PERMITS INSERTION. *AI0I0 ~ 01010 THE R \\COMMAND\\INSTRUCTION t SC */EXF'EF~T GD t 7RINSTRUClION GD t E *AI020 ~ 01020 THEN PERMITS ALLOWS INSERTION. - t W t W t ·-81:~AL..L()WS GQG)~ *F'1010! 2 ~ 01010 THE R INSTRUCTION DELETES N CHARACTERS 01020 THEN ALLOWS INSERTION. * 5-26 SOS COMMAND DESCRIPTIONS Alter Format nSc -nSc Mode Instructions Function Searches for the nth occurrence of the character specified by c. If no n is specified, the occurrence defaults to the first occurrence of the character c. If the minus sign is included before the number or the S, the S instruction searches for the last occurrence of the character specified by c moving from right to left on the current line. If the character c cannot be found, the pointer moves to the end of the line and waits for another Alter instruction. If you have an uppercase-lowercase terminal and your text contains both uppercase and lowercase characters, you must use the SHIFT key with the S command when searching for uppercase characters. Pointer: After the instruction, the pointer is at the character specified, but the character itself is not printed on the terminal. When the minus sign is used and the instruction is completed, the pointer is after the character specified and the character is printed on the terminal. * F'425 GIDTHE S INSTRUCTION SEARCHES FOR CHARACTERS. 00425 *A.G!D 00425 THE S INSTRUCTION SEARCHE\EHCRAES t t t 4SS '-58 E * 5-27 SOS COMMAND DESCRIPTIONS Alter Format nV Mode Instructions Function InVerts the case for n characters or to the end of the next word. This is an optional SOS Alter mode for your instruction and must be assembled inVert case installation of SOS. If the your SOS instruction is not assembled for installation, the bell will sound when you try to use this instruction. The V instruction will convert all lowercase characters in a word to uppercase or convert all uppercase characters in a word to lowercase, whichever happens to exist on the line being altered. The V instruction will operate on a word-by-word basis or by the number of characters specified by n. Pointer: After the V instruction has executed, the pointer is at the next character in the line being altered. *F'1600 ~ THE V INSTRUCTION INVERTS THE CASE. 01600 *A.~ 01600 The V Instruction inverts the case. t ~v *P1600 ~) 01600 * nW t t w GQv t V V t V t ~ The V Instruction inverts the case. Skips over n (partial or full) words, then skips over any blanks and tabs to position the pointer at the beginning of the next, word. A word is a string of any combination of letters and numbers followed by one or more spaces. Special characters, such as , i, @, are words by themselves. The., $, and % become words by themselves if the SEPARATORS option is set. *F'5~)0 ~ 00550 THE W INSTRUCTION SKIPS OVER WORDS. */SEPARATORS C§) *A.~ 00550 THE W INSTRUCTION SKIPS OVER WORDS. t W t t W 4W * 5-28 SOS COMMAND DESCRIPTIONS Alter Format Xchrs~ Mode Instructions Function Deletes a partial or entire word, the blanks and tabs that follow it, and then allows you to type characters which are inserted in the place of the deleted text. The deleted text is enclosed in backslashes. with the EXPERT option set, the contents and backslashes do not appear on your terminal. The inserted characters do not need to include a separator character unless you want a space between the characters you insert and the next word. *' F' 111 ! 2 GiD 00111 THE X COMMAND REMOVES A WORD 00112 AND PERMITS INSERTION. *A111!2 ~ 00111 THE X \\COMMAND \\INSTRUCTION t 00112 t t SC XINSTRUCTION(jQ E AND \\PERMITS \\ALLOWS INSERTION. ~- t SF' t XALLOWSGQ~ t QID *: F' 111 ! 2 QID 00111 THE X INSTRUCTION REMOVES A WORD 00112 AND ALLOWS INSERTION. * 5-29 SOS COMMAND DESCRIPTIONS 5-30 SOS COMMAND DESCRIPTIONS 5.8 COpy - C COMMAND Function The Copy command copies a range of lines to a destination in your file. The Copy command does not change the original lines in any way. Special Cases Copying lines from another Characteristics in this section.) file. (Refer to Extended Numbering the first and last pages with a different increment. (Refer to the first-page-inc and the last-page-inc under Options in this section.) Format *Cdestination,soqrce-range,first-page-inc,last-page-inc~ Arguments destination is the line number where SOS will place the copied lines. ,source-range is the range of lines you destination. want to copy to the Options ,first-page-inc is the increment SOS uses to number the first page of copied lines. All lines in succeeding pages (except the last page) retain their line numbers. If the increment is too large to fit the lines in the destination, SOS prints either %OUT OF ORDER or %WRAP AROUND and chooses a smaller increment, printing the message: INCl=first page increment ,last-page-inc is the increment SOS uses to number the last page of copied lines. If the increment is too large, SOS prints %OUT OF ORDER or %WRAP AROUND and chooses a smaller increment, printing the message: INC2=last page increment 5-31 SOS COMMAND DESCRIPTIONS Extended Characteristics The following two formats of the Copy command allow you to copy lines from another file into your current file being edited. These formats are particularly useful for creating files from sections of other larger files. Function (1) The following format of the Copy command copies lines from another file into your current file. with this format of the Copy command, you must know the range of lines to be copied. Format *Cdest=filespec,range,first-page-inc,last-page-inc ~ Arguments dest is the destination (line number/page number) where SOS will place the copied lines. =filespec is the file specification of the source file which you are copying the lines. The specification can consist of the following: from file dev:filnam.ext[p,pn,sfdl, ••• ] ,range (Refer to Chapter 2, Giving complete description of specifications.) Commands, these is the range of lines you source file. copying are for a file from the is the increment number SOS uses in numbering first page of copied lines. the is the increment SOS uses in page of copied lines. last Options ,first-page-inc ,last-page-inc numbering the Operation 1. Type a C and the destination; then type an equal sign (=). *Cl00:::: 2. Type the source file specification and a comma. 5-32 SOS COMMAND DESCRIPTIONS 3. Type the source range, a comma, and, if desired, type the first- and/or last-page-inc separated by a comma. Then press RETURN. In this example, SOS will place immediately after line 100 a range of lines from file TESTOR.FOR that extends from line 100 of page 1 to the last line of the last page; it will renumber the first page to increment by 100, and the last page to increment by 10. The middle pages will be unchanged. Function (2) The following format of the Copy command allows you to look at a file (that is, you can give Find and Print commands) before you have to specify the source range and optional increments. With this format of the Copy command, you do not need to know in advance the range of lines to be copied. Format *Cdestination=filespec/S~ Arguments destination is the line number where SOS will place the copied lines. =filespec is the file specification of the source file from which you are examining and/or copying the lines. The file specification can consist of the following: dev:filnam.ext[p,pn,sfdl, ... ] (Refer to Chapter 2, Giving complete description of specifications.) Commands, these for the allows you to search the source file desired lines to be copied. without the IS, this entire command is illegal. /S Operation 1. Type a C, the destination, and then an equal sign (=). *C 1 00:::: 2. for a file Type the source file specification. *C 1 () 0 T EST () • F () :~: F~ F~ 5-33 SOS COMMAND DESCRIPTIONS 3. Type a slash (/), an S, and press RETURN. SOS prints the prompt C*. You can now give Find and Print commands to find the range of lines you want to copy. *C100::~TESTOR. FORIS ~ C*FEND 11 GD t GD 00900 END C*FC GD $/1 GID t 00100 C* 4. ~ C THIS IS A TEST When you are finished looking through the file, give the E command. SOS prints SOURCE LINES=. Type the source range, and if desired, the first- and/or last-page-inc separated by commas, and press RETURN. C*E C§) SOURCE LINES=100/1:900/1~ * If you do not want to copy lines from this file, give the EQ command instead of the E command. The EQ command aborts the copy and returns you to your current file in Edit mode. Restrictions If you specify a file specification that does not exist when you are using either of the Extended Characteristic formats, SOS will reply with the error message: %FILE NOT FOUND You must then reissue the Copy command again using and file extension of a file that does exist. the filename If you issue a Copy command for a extremely large range of lines, you may receive the error message: %INSUFFICIENT CORE AVAILABLE Reissue the Copy command again using a smaller range of line numbers and repeat the Copy command until the entire range is copied. If you get either of the messages: %OUT OF ORDER or %WRAP AROUND, the contents of your file are intact, but the line numbers are not in ascending order. Renumber your file until you do not get either of these messages printed. 5-34 SOS COMMAND DESCRIPTIONS If your first-page-increment causes the lines to be out of order, SOS chooses another increment and prints its value in the message: INCl=first-page-increment Similarly, if your last-page-increment causes the lines to be out of order, SOS chooses another increment and prints its value in the message: INC2=last-page-increment Examples 1. You copy lines 500 through 900 on page 2 to a destination of line 100 on page 1. SOS provides an increment of 00010 per copied line. *C 1 001 1 ,500/2: 900/2 G.B INC1=00010 * 2. You copy the contents of three pages from SAMPLE.TXT to TEXT.TXT. TEXT.TXT now contains four pages instead of one, because the Copy command will copy the page marks of SAMPLE.TXT along with its contents • • SOS TEXT. TXT ~ EDIT: TEXT.TXT *F' G!D 00100 LINE ONE, PAGE ONE 00200 LINE TWO, PAGE ONE *C300:::SAMF'LE. TXT IS G!D C*EGD SOURCE LINES:/l:/3~ *=. C!B 00200/4 * When you gave the = (Give) command in the above example, it showed that your current position in the file TEXT. TXT is line 200 on page 4. Your file now contains four pages of text. 5-35 SOS COMMAND DESCRIPTIONS 5-36 SOS COMMAND DESCRIPTIONS 5.9 DELETE - D COMMAND Function The Delete command deletes all the lines in the specified and prints a message telling you which lines were deleted. range Format *Drange,Y ~ Argument range is the range of line numbers/page numbers that you want to delete from your file. The range may be one line, the entire contents of a page, or the contents spanning many pages. Options ,Y may be used to eliminate the SOS message: MASSIVE DELETE OK? (Y OR N) when you are deleting the entire contents of a page or multiple pages. The Y option simply supplies the Y response in advance. Special Cases If you give a Delete command prints the message: MASSIVE DELETE OK? that deletes a whole page, SOS (Y OR N) You can type Y (for Yes) or N (for No). SOS will respond with the ES of YES or the 0 of NO. If you want SOS to assume a Yes answer, include the ,Y option in the Delete command. If you set the EXPERT option, this question is not asked and SOS does not print the message telling which lines it deletes. If the range includes a page mark, the page mark is deleted and all subsequent page marks are decremented by 1. Any lines left on the deleted page are appended to the page where the deletion started. When the range does not include a page mark (but does include a page-number), for example the command D/page-number, the D command deletes only the contents of the page and not the page mark. (Refer to Chapter 3 for a description of the page mark format.) 5-37 SOS COMMAND DESCRIPTIONS Also, when a page mark is deleted, any lines left on the deleted page are appended to the page where the deletion started. If appended line numbers are not prints the message: in an increasing order, SOS %OUT OF ORDER Give the Number command to place the line numbers back in order. Hints Use the Kill command to delete page marks text. without deleting any Restrictions If there are no lines to delete, SOS prints the message: %NO SUCH LINES and prints the asterisk prompt character. Examples 1. You delete all lines from line 200 to (and including) line 400 on the current page (page 4). *D200:400~ 3 LINES (00200/4:00400) DELETED * 2. You delete the entire contents of page 3 from your file and then ask for a printout of page 3. After the deletion has been executed, the page mark for page 3 remains but the page is blank. *[1/3 @) MASSIVE DELETE OK? (Y OR N): YES 3 LINES (00100/3:00300) DELETED *P/3 GiD PAGE 3 3. * You delete from line 300 on page 2 to (and including) line 100 on page 4 and eliminate the MASSIVE DELETE OK? message with the Y option. The page mark for page 3 automatically has become the page mark for page 2. Because the line numbers are out of order, you then issue the Number command to correct the line-number sequence. *D300/2: 100/4, Y GID 7-0UT OF ORDER 5 LINES (00300/2:00100/4) DELETED *N G!2) * 5-38 SOS COMMAND DESCRIPTIONS 5.10 END - E COMMAND Function The End command ends the SO~ session. The instructions for saving or not saving your file. options give Format *Em: filespec G!!:) Options is a modifier that can be either a, D, Q, S, or combination of a and S. m a a suppresses creation of a backup file with the extension Qxt: also suppresses the creation of a backup file with the extension Zxt if the /OLD option is set. D deletes both the original file (input to SOS) your edited file (output from SOS). Q quits so that all changes to the original file from the time of the last backup to the present are lost. S unsequences (that is, strips the output file. :filespec line numbers and from) is the file specification of the output (destination) file. This file specification can consist of the following: dev:filnam.ext[p,pn,sfdl, ... ]<nnn> This argument is optional: if it is o~itted, the current file is used. (Refer to Chapter 2, Giving Commands, for a complete description of these file specifications.) Hints To save the file without line numbers, do one of the following: 1. Place the /UNSEQUENCE option in your SWITCH.INI file. When you do, the option automatically applies to every file you create or edit with SOS. 5-39 SOS COMMAND DESCRIPTIONS 2. Include the /UNSE~UENCE option in your SOS command: .SOS/UNSEQUENCE filespec~ 3. Set the /UNSEQUENCE option before you give the End command. 4. Give the ES command. After the End command has saved your file, SOS prints the file specification enclosed in square b~ackets. If you have not made any changes to the file since it was last saved, SOS prints the message: [NO CHANGES.] updates the date of the file, then ends the SOS session. Restrictions If you give the ED command, SOS will delete both the input file and the output file. The ED command cannot have any other options, such as the Q, S, B, or filnam.ext. If you specify a file specification of another file which already exists in your directory when you give the End command, SOS asks you to confirm the deletion of this currently existing file by printing: OUTPUT FILE EXISTS - DELeTE? (Y O~ N) : To confirm the new name of your edited file and the deletion of the existing file, you must reply with a Y (for Yes). You do not need to press RETURN after typing Y or N; SOS responds with the ES of YES or the 0 of NO. If your reply is NO, SOS asks for another name of the file: FILE: and you must supply a new file specification. SOS then saves the contents of the edited file in the file you specify. In some conditions, the Qxt backup file may become write-protected. SOS ignores the write-protection, creates the backup file, and prints the message: %BACKUP FILE PROTECTED - IGNORED If the file is protected and you cannot overwrite it, SOS prints: ?FILE WRITE PROTECTED, TRY ANOTHER NAME FILE: after which you should type a new file specification. 5-40 SOS COMMAND DESCRIPTIONS If you type an illegal file specification, SOS prints message: following %ILLEGAL COMMAND * Your file is specification. not saved until you give a correct file Examples 1. To save your file the first time since creating it, you give E command. the *E~ [DSKC:TEST.AL..GJ 2. You save your file without line numbers. *[S~ [DSKB:CHANGE.CBL[27,510J]] 3. You end the SOS session without saving the changes you have made, thus restoring the file back to the last backup. (With the EO command, as with the ED command, you can not specify any other option or a file specification.) 4. You try to save your file in another directory, but have access privileges to that directory. you do not *E: SAMPLE. TXT[27, 23~;J G0 XILLEGAL COMMAND * You now specify a directory that you do to. *,E:SAMPLE.TXT[27,5307]~ (DSKB:SAMPLE.TXT(27,5307JJ 5-41 have access privileges SOS COMMAND DESCRIPTIONS s. You start to save your file without line numbers and without a Oxt backup, specifying the output file as the current file being edited. SOS asks for confirmation to write over this file without line numbers and and without creating a Oxt backup file. *EBS:TRY .FOR ~ OUTPUT FILE EXISTS - [lELETE? (Y OR N): [[lSKC:TRY.FOR[27,5107]] 6. 'lES You give the End command when you have made no changes since last saved the file. [NO CHANGES.] 5-42 you SOS COMMAND DESCRIPTIONS 5.11 FIND - F COMMAND Function The Find command searches for the first occurrence of a string of characters located within a rang~ of lines. After the characters are found, SOS prints the line containing them. Format *Fstr ing$range ,A,N ,E,number ~ t ~ Argument string is the string of characters you want to find. If you omit the string, SOS uses the string you used in the last Find command. Uppercase letters match, lowercase letters and vice versa. If you want SOS to find an exact match, include the ,E option (below) • $ ends the string. characters. If pressing ESCape, pressing RETURN. range specifies where SOS will search for the character string(s). If you press ESCape and omit the range, SOS searches from the current position through to the end of the file. If you omit the starting place from the range, SOS starts at the next line (Refer to Special Cases below.) The you you string cannot exceed 200 omit the string and omit must end the command by Options ,A instructs SOS to enter Alter mode after finding the string. The Alter mode pointer is positioned before the first character of the string. The ,A option stays in effect when you give the F$ command for additional occurrences of the specified string (refer to Special Cases). ,N limits the Find command to print just the line number of a line, eliminating the printing of its contents. You cannot use both the ,A and the ,N options at the same time. The,N option stays in effect when you give a F$ command for additional occurrences of the specified string (refer to Special Cases). 5-43 SOS COMMAND DESCRIPTIONS ,E requires an exact match. Uppercase letters match only the corresponding uppercase letters; lowercase letters match only the corresponding lowercase letters. You must place the ,E option after the range, or after the ,A or ,N option if one is present. The ,E option stays in effect when you give a F$ command for. additional occurrences of the specified string (refer to Special Cases). ,number finds that number of lines containing the string. You can use this option instead of repeating the Find command many times. The ,number option does not stay in effect beyond the current Find command. Special Cases continues finding the next occurrence of the string specified in the last Find command, starting from the line after the last string found and proceeding to the end of the range specified in the last Find command. *FG!!) , ~ *F$~ continues finding the next occurrence of the string specified in the last Find command, starting from the line after the last string found, but proceeding through to the end of the file. G) *Fstr ingt: location G!.!) finds the first occurrence of the string, starting from the next line through to the location specified in the command. For example, *FITINERARY$:300/4 finds the first occurrence of ITINERARY located between the next line and line 300 of page 4. 5-44 SOS COMMAND DESCRIPTIONS Extended Characteristics *Fstr ingl @) string2~ string3~ str ing4 QID string5(RH) string6$range,A,N,E,number~ t ~ The above Find command searches for up to six strings, as long as the total length of the strings is not more than 200 characters. This form of the Find command prints the first line that matches anyone of the strings and then stops. Hints with the Find command and the /C128 option set, you can use any of the Special Matching Characters. (Refer to the Substitute command in this chapter and/or Chapter 7, Special Characters in Find and Substitute Commands.) Restrictions If SOS cannot find the string, it prints the message: %SEARCH FAILS and does not change your location in the file. If the string is not located on the current page, SOS prints its page number before printing the line providing you have specified a range of more than the current page. If you did not specify a range of more than one page, SOS will print the above error message. If you do not specify a string and you have not previously a Find command, SOS prints the message: given %NO STRING GIVEN To find out what the current string is, give the =STRING command. If you specify a string that exceeds 200 SOS prints the error message: characters in length, %STRING TOO LONG You must then reissue the Find command with fewer the string. characters If you specify more than six strings in the extended the Find command, SOS prints the error message: in format of the Find %TOO MANY STRINGS and the Find command is canceled. command with six strings or less. 5-45 You must reissue SOS COMMAND DESCRIPTIONS If you issue a Find command with the /C128 option set using incorrect, special-matching characters from those described in the Substitute command, SOS will print the error message: %SEARCH STRING TOO COMPLEX Examples 1. You search the text below using the Find command word FIND and alter it to FINDS. to locate the *F'100: 200 ~ 00100 THE F COMMAND FIND THE FIRST OCCURRENCE 00200 OF CHARACTERS LOCATED WITHIN RANGE OF LINES. G) ~ *FFIND$100,A QID 00100 THE F COMMAND FINDS THE FIRST OCCURRENCE t 4GD 2. t IS~~ * You search in lines 100 through 200 for two text strings that exactly match your typed input, and open the Alter mode to alter each string so that it is correct. *FOCCURRENCEQIQ ~J I TH.I N$l 00: 20() ~ A, E ~ t GD 00100 THE F COMMAND FINDS THE FIRST OCCURRENCE OF A STRING 00200 W IOF A STRING~~ OF CHARACTERS LOCATED WITHIN A RANGE OF LINES. - t t t - t *Pl00: 200 G!D 00100 THE F COMMAND FINDS THE FIRST OCCURRENCE OF A STRING 00200 OF CHARACTERS LOCATED WITHIN A RANGE OF LINES. * 5-46 SOS COMMAND DESCRIPTIONS 5.12 GO - G COMMAND Function The Go command permits you to end an SOS session, save your file, and perform your last COMPILE, LOAD, EXECUTE, or DEBUG command. You may also execute other TOPS-IO programs, compilers, and utilities with the Go command by setting the /RUN option before issuing the Go command. Format *Gm: filespec C§) Options is a modifier that can be either B, D, 0, S, or combination of Band S. m a B suppresses creation of a backup file with the extension Oxt: also suppresses the creation of a backup file with the extension Zxt if the /OLD option is set. D deletes both the original file (input to SOS) your edited file (output from SOS). o quits so that all changes to the original file from the time of the last backup to the present are lost. S unsequences (that is strips line numbers from) the output file. :filespec is the file specification of' the output (destination) file. This file specification can consist of the following: and dev:filnam.ext[p,pn,sfdl, ••• ]<nnn> This argument is optional: if it is omitted, the current file is used. (Refer to Chapter 2, Giving Commands, for a complete description of these file specifications.) Hints To save the file without line numbers, do one of the following: 1. Place the /UNSEQUENCE option in your SWITCH.INI file. When you do, the option automatically applies to every file you create or edit with SOS. 5-47 SOS COMMAND DESCRIPTIONS 2. Include the /UNSEQUENCE option in your SOS command: .SOS/UNSEQUENCE filespec GE) 3. Set the /UNSEQUENCE option before you give the Go command. 4. Give the GS command. You may include the /RUN option in your SWITCH.INI file to indicate the name of the program to which your file will "go" after giving the Go command. You can use the command /RUN:dev:filespec or the option /RUN:filespec. If you do not specify the device (dev), the SOS default SYS: is used. Restrictions If the file you indicate is the current file replies with the message: being edited, SOS *G:TEST.ALG G!D OUTPUT FILE EXISTS - DELETE? (Y OR N): To confirm that you intend to write over this file, you must reply with either a Y (for Yes) or a N (for No). You do not need to press RETURN. SOS responds with ES of YES or 0 of NO. If your reply is N, SOS asks for a new name of the file: FILE: and you supply a new file ·specification. SOS will then save contents of the current file in the file you specify. the In some conditions, the Qxt backup file may become write-protected. SOS will create or write over the backup file and, in addition, print the message: %BACKUP FILE PROTECTED - IGNORED If the file is 'protected and you cannot overwrite it, SOS prints: ?FILE WRITE PROTECTED. FILE: TRY ANOTHER NAME after which you should specify a new file specification. If you type an illegal file specification, SOS prints: %ILLEGAL COMMAND * If you give the Go command without setting the /RUN option or you have not previously given an EXECUTE, COMPILE, LOAD, or DEBUG command at TOPS-IO command level for your file, the system returns the TOPS-IO error message: ?CMLNPC NO PREVIOUS COMMAND 5-48 SOS COMMAND DESCRIPTIONS Examples The following two examples show two basic methods used Go command. 1. with the You compile a FORTRAN program source file at TOPS-IO command level, but find errors in the source code. You the edit the file using the Substitute command and issue the Go command with no arguments. SOS defaults to the last COMPILE command • •COMF'ILE NUMBEF< + F()F~ ~ FORTRAN: NUMBER 00080 TIPE 104,X,Y ?FTNNRC LINE:00080 STATEMENT NOT RECOGNIZED ?FTNFTL MAIN. 1 FATAL ERRORS AND NO WARNINGS .S08 NUMBER. FOR ( \{1.2) EDIT: NUMBER.FOR *STIPEiTYPE C~l~ r': * GD CiiO 00060 00080 *G CtillJ 103 FORMAT (' YOU TYPED THE NUMBER ',F) TYPE 104,X,Y [DSKC:NUMBER.FORC27,5107]] FORTRAN: NUMBER MAIN. 5-49 SOS COMMAND DESCRIPTIONS 2. You perform the same edit on the source program file and then set the IRUN option specifying the system program that will process your file when you give the Go command. You give a Go command (GBS:NUM.FOR) that suppresses the creation of a backup file, removes the line numbers, and specifies a new file specification for your source program code • • SOS NUMBEF~. FOR GID EDIT: NUMBER.FOR *STIPE$ fYPE$'o,: ~ t t GO GD 00060 00080 103 * FORMAT (' YOU TYPED THE NUMBER ',F) TYPE 104,X,Y */F~UN: SYS: F()RTF~A ~ *GBS : NUM • FOR G!D [DSKC!NUM.FORJ FORTF~AN: NUM MAIN. LINI{! LOADING [LNKXCT NUM EXECUTION] PLEASE TYPE A NUMBER. 4~:j~ YOU TYPED THE NUMBER TWICE 45.0000000 IS 45.0000000 90.0000000 END OF EXECUTION CPU TIME: 0.12 ELAPSED TIME; 4.00 EXIT 5-50 SOS COMMAND DESCRIPTIONS 5.13 HELP - H COMMAND Function The Help command prints on your terminal a summary of all commands, options, and additional information about 50S. SOS Format *H Restrictions If your system does not have a HELP file for SOS, SOS prints following error message: the %I'M SORRY I CAN'T HELP YOU Example Summar~ A of SOS commands ~V21(134) + l-APR-78 LCG/SDG Alter [<range>J nC<ch> Change n characters -nD Delete next/previous characters E Finish with no printing nI<text>$ Insert with temporar~ increment n J Break line and stick rest at front of next -nK<ch> Delete to n occurrences of <ch> L Print line and recycle P Print line and recycle to current position Q Quit ALTER (restore original line) -nR<text>$ Delete n char. then Insert text -nS<ch> Search forward/backward for n occurrence of <ch> nV (Optional) inVert case for n char's or to end of word nW Skip forward n words X<text>$ Delete word then Insert text n(SP> Space forward n characters <RET> Finish and print rest of line n<DEL> Backspace n characters Backspace n characters n<BS> -<TAB> Skip to end/start of line ~U Quit and restart ALTER 5-51 SOS COMMAND DESCRIPTIONS c Cop~ [I E m .. w B D n S F G H I J Je c- .... C l.. t< U W K L. M N NA NP P R S [<destination>,<ran~e>J or [<destination>=<filnam.ext>,(ranse)J or [<destination)=(filnam.ext)/SJ Delete [(ranSe>,YJ (,y for massive deletions) End r<m>:<filnam.ext>J Suppress .Qxt/.Zxt file creation Delete both input/outPut to SOS Quit (restore to ori~inal file) Unse~uence output file Find C<strin~>$<ran~e),<options>J or [<strin~1> thru (string6)$(range),(options)J Go [(m>:(filnam.ext>J (End and do last Load-class command) Help (t~pes this text) Insert [(position>,(increment>] Join C{position>] Justif~ (Optional) C(c><ranse)] Justif~ center Justif~ - flush left Justif~ - flush ri~ht Justif~ and fill Justif~J word Kill [/(psge-number)J List (on LPT) [<range),S] (,S for no line no's) Mark [<position>] Number [{increment>,<ran~e>,(start>] Add (increment> to <range) Preserve line numbers over pa~e marks Print [(ran~e>,SJ (,5 for no line no's) Range C<ranse),(increment>] Substitute (strinS>$<new-string>$<range),(options)]. Of' [<string1> thru (string6>$ <new-strinSl> thru <new-strin~6)$ (ran~e>,(options>] T Vc C :~: l.. U V W x @ / <l..F> <EBC> <DEL> <CTRL/C> <CTF~L/G> <CTI:~L/R> {CTF\L/U> Transfer [(destination),<:range>] inVert (Optional) [<c)(range)] Invert uppercase to lowercase Invert lowercase to uppercase Invert upper to lower/lower to upper World (Save-the-World, same as [, but doesn't end SOS) eXtend [(ranSe),S] (,S suppresses t~peout) Move pointer [<position)] Indirect [{:filnam.ext)J Giv£~ [<option>] Set r<option>:<value>J P.t1 (Print next line) P.-l (Print previous line) (Delete one character) (StopSOS) (Yes? T~pe H for Help) ( Cance I 80S comlTlsnd) (Print line without line number) (Erase and ret~pe current line) **** Optional commands must be assembled for 5-52 ~our SOS **** SOS COMMAND DESCRIPTIONS SOS name Options: (Y for Yes, N for No) set(/) print(=) BAK Y BASIC Y BIG N C64 Y C128 Y CASE N DECIDE Y DELETE Y N DISK DPY Y ERROR N EXPERT Y INCREMENT Y ISAVE Y LENGTH Y LMAR Y N LOCATION LOWER Y M33 Y M37 Y MAXLN Y NAME Y NOBAK Y NODECIDE Y NODELETE Y NONSEPARATORS NONUMBER Y NOVICE Y NUMBER Y OLD Y OPTION Y • (Period) N PLINES Y PMAR Y READONLY Y RMAR Y RUN Y SAVE Y SEPARATORS Y SEQUENCE Y START Y Y STEP STRING N UNSEQUENCE Y UPPER Y Y N Y default meanin~ On Off CASE CASE Y Y Y Y CASE Y N Y Y Y Y Y CASE CASE CASE Y Y BAK DECIDE DELETE Y N N N N N Y Y Y N Y Y Y CASE Y Y Y Y SEa CASE Create backup file <.Oxt) Edit BASIC pro~ram Print lar~est pa~e no. On 64 character set Off 128 character set Give case information Off Auto ,D for S command Off Delete input/outPut file Disk ~uota information Off VT05 terminal twpe Print last error messa~e Expert assumption Off 100 Default line increment o Auto-Save for insertion Printed lines/pa~e 55 1 Left mar~in Fir~t line in SOS buffer Input lowercase chrs Off On Terminal characteristics Off Terminal characteristics 99999 Maximum line numbers input Output file specification No backup file creation Off No auto ,D for S cmd. On On No delete of 1/0 files On %,$,. not punctuation CASE No line no. printin~ Off On Normal mode assumption Print line numbers On Off Create <.Zxt> backup file Set options in SWITCH.INI Print current <position> Number lines bw P(RET> 16 Parasraph mar~in 1 Off Read file onlw, no edits 69 Risht mar~in SYS:COMPIL Set run specifications o Auto-Save for editins Off %,$,. are punctuation On Se~uence output file 100 First line number seauence 100 Se~uence & increment lines Current F & S strings Off Unse~uence output file Input uppercasechrs. On DECIDE Mode (,D option of S command) Commands: <SP> (DEL> A E G Q To To To To To To accept this substitution. reject this substitution. do this substitution, then enter Alter mode. reject substitution and return to Edit mode. accept this substitution and all others. auit substitutions and Decide NOW. 5-53 SOS COMMAND DESCRIPTIONS SOS (options) of the Find and Substitute Com~ands: (option) ,A ,D ,N ,E ,number Heanins: Enter Alter mode (F co~mand onl~) Give Decide mode commands (S command onl~) Suppress t~peout of line (~ and S command) Exact match of upper/lower case (F and S command) Inteser value for number of lines (F and S command) SOS Special Characters (for Find & Substitute commands): Ref' 1 acen,ent: Hatch: . "'Ie ' "'0 '* '7 next match strirlS '*<number}'* is n'th match strins Quote neHt character '"'E '"'N 'r. not ""T '/ an~ ') .• '7 , nun,ber of character QI.Jote ne>,t character separator arbitrar~ S~mbols: SOS Position * present line or paSe first line or pase last line or pase 80S Definitions and Meaninss: (rar,se> <position> <line> <paSe> <content> <destination> <numb£·~ Y' > <strins> ·.-..... .. ·..... <position)[!(number) or :(position)J - [(line-number>][/(pase-number>] - [<number) or <content) or ·.--. ·......·..-·.......- • or * or -][(+-)<number)] [<number) or • or * or '"'][(+-)(number)] $<strins>$<ranSe>,<options> <position> (an~ positive integer .LE. 2~35-1) strins of characters) (200 maximum with F & 8 commands) (497 maHimum per line contents) (an~ 5-54 SOS COMMAND DESCRIPTIONS 50S Monitor Command Format: .SOS /options filnam.ext .505 filnam.ext/options .R SOS-/options filnam.ext .R SOS-filnam.ext/options <fi lnaft',. ext> or or or ::= (filename and file extension) or <filna2.ext>=(filna3.ext> where: (filnam.ext> = file to create/edit <filna2.ext> = output file (filna3.ext> = input file <f i 1 naft',. e>~t> <fi lna2. e>~t> <filna3.eHt> ::= [dev:J[filnamJ[.extJ[<path>J[<prot>J[<ke~>] ··.-.._. ·..-- <prot> [-J [pr,psJ [pr,ps,sfdJ ["sfdJ defa l.Jl t <nnn> octal protection code pr·~n full path specification use owrl ppn «uP to 20 characters» 80S: path onl~ encr~ption ke~ Insufficient Disk Space - WELL? Commands: (No GI.JeJ rantees! ) G - do the output (now and forever>. T - test disk space and do outPI.Jt if space available. R - sive resources and do output if space available. W - wait until either space appears or a different response. [End of 808.HLf'J * 5-55 ~ou t~pe SOS COMMAND DESCRIPTIONS 5-56 SOS COMMAND DESCRIPTIONS 5.14 INSERT - I COMMAND Function The Insert command starts Input mode for one or more lines. If you insert more than one line, you must press ESCape to leave Input mode. Format *Iposition,increment~ or *Ipositioniincrement~ or *Ipositioni!number~ Argument position is the position of the line you want to insert. If the line already exists, SOS selects a line by adding the current value of the INCREMENT option to the indicated line number. If the resulting line also exists, then SOS chooses a line halfway between the indicated line and the next line in the file. To insert a line at the very top of a page, use the up-ar~ow (~) ; e.g. I~. SOS chooses a line halfway between line 0 and the first line in the page. To insert a new page mark, use a position/page-number format, where page-number is the current page. SOS starts inserting a new page immediately after the indicated page. SOS automatically increments subsequent page marks by one. Option ,increment is the numeric increment SOS uses for creating new lines during execution of the current and further Insert commands. The, (comma) increment changes the value of the INCREMENT option. Further Insert commands will use this increment by default for as long as lines can be inserted on that page. You may choose to stop inserting lines by pressing ESCape. 5-57 SOS COMMAND DESCRIPTIONS ,increment is the numeric increment SOS uses for cr%ating new lines during execution of the current Insert command. The, (semicolon) increment does not change the value of the INCREMENT option beyond the command itself. Further Insert commands will use the value of the INCREMENT option (default is 100) if an increment is not specified in the command. ilnumber specifies the number of lines to insert following the position. SOS increments the lines using a table of increment values that are within the SOS source-program. The table values ~re 1, 2, 5, 10, 20, and 100. SOS determines which increment value to use by examining the line number following the position and the number you specified. Line numbers are inserted until the number is exhausted, until the increment is exhausted, or until you press ESCape to end the insertion. Hints To start inserting on a new page, give the Insert command with a page number position, not a line number position. SOS will increment each new line with the INCREMENT option value. Restrictions If you indicate a nonexistent page number, command and prints the following message: SOS cancels the %NO SUCH PAGE If you try to insert an existing line when SOS cannot fit a line between the existing line and the next line in the file, SOS cancels the command and prints the message: %ILLEGAL REPLACEMENT ON INSERT 5-58 SOS COMMAND DESCRIPTIONS Examples 1. You insert three lines and then stop Input mode ESCape. The default increment of 100 is assumed. by pressing *1500 ~ 00500 THIS TEXT IS ON LINE 500 ~ 00600 THIS TEXT IS ON LINE 600~ 00700 THIS TEXT IS ON LINE 700~ 00800 $ t GO * 2. You insert six lines immediately after the existing line 300 on page 3. By specifying an increment of , (comma) 10, you have changed the value of the INCREMENT option. *:::INC GIi) 00100 *1300/3, 10 ~ 00310 BOSWORTH ~ 00320 REDCORTG!.D 00330 MULL.EN GD 00340 FOXHILL~ 003~jO BEL.KNAF'~ 00360 00370 MILLWOOD ~ $ t GO *:::INC GIi) 00010 * 3. You insert a line at the top of page 4. *1'"'/4 GIi) 00050 4. THIS PF<OGRAM CONVERTS FROM POUNDS TO KILOGRAMS. QID * You start a new page after the existing page 2, the current page. *P*/2 ~ 00900 THIS IS THE LAST LINE ON PAGE 2. *1/. ~ 00100 00200 00300 THIS L.INE IS THE FIRST LINE ON THE THIRD F'AGEG!::D OF THE F 1 LE. QID $ t * 5-59 SOS COMMAND DESCRIPTIONS 5-60 SOS COMMAND DESCRIPTIONS 5.15 JOIN - J COMMAND Function The Join command joins two consecutive lines together by appending the contents of the second line onto the end of the first. After appending the second line, SOS deletes it from the file. Format *Jposi tion G:0:) Argument position is the first line to which the next consecutive line will be appended. For example, the command *J200 will join line number 300 to 200 and delete 300 from the file (assuming the SOS increment default of 100). Restrictions If joining the two lines creates a line containing more than characters, SOS prints: 497 %LINE TOO LONG and does not join the lines. If the line is the last line on the page or the last line in file, SOS prints: the %NO NEXT LINE and cancels the command. Example 1. You print lines 100 and 200 and then join the line line number 200 to the end of line number 100. *00100 P100: 200 THIS IS THE FIRST LINE ~ 00200 - THIS IS THE SECOND. *Jl00~ *F'100:200 ~ 00100 THIS IS THE FIRST LINE - THIS IS THE SECOND. * 5-61 contents of SOS COMMAND DESCRIPTIONS 5-62 SOS COMMAND DESCRIPTIONS 5.16 JUSTIFICATION - JC, JL, JR, JU, JW COMMANDS Function The Justification commands are optional SOS commands and must assembled for your installation of SOS. be The Justification commands allow you to perform text justification (text arrangement) when you are editing a text file. A text file contains information such as the contents of a book. When this command is in effect, the LENGTH, LMAR, PMAR, and RMAR options can be changed in value and will have an effect during an SOS session. The MAXLN option may also have some effect, if the text file exceeds its option value (99999 by default). Format *Jcrange CE:D Argument must be a C, L, R, U, or W, and must accompany the J command. If they are not used, the Justification command becomes a Join command. c C centers the text lines specified by the range between the LMAR value and the RMAR value. Spaces are padded from the left margin to center the lines. L justifies the text lines specified by the range so that each line starts at the left margin. R justifies the text lines specified by the range so that each line ends at the right margin. U justifies and fills the text lines specified by the range so that each line will fill the number of positions in the line. The number of positions is determined by RMAR-LMAR+l = line length. When the JU command is executing, the line numbers, carriage returns, and linefeeds in the range are ignored. W justifies by word, but does not fill with spaces, the text lines specified by the range so that each line will be justified to the value of the LMAR option. If the next word cannot fit on the line, the word becomes the first word on the next line in the range. There is no justified right margin. When the JW command is executing, the line numbers, carriage returns, and linefeeds in the range are ignored. 5-6;3 SOS COMMAND DESCRIPTIONS range specifies the range of text lines you want to justify. If the range specified is the argument of the JU or JW command, only the specified lines are justified up to the first line that exceeds the MAXLN value. These two commands will insert line numbers and/or renumber the file. (Refer to the examples for a better of how these commands work.) understanding Restrictions If a text line exceeds the right margin (RMAR) value during execution of the JC, JL, or JR commands, SOS prints the following error message for each text line in the range: %LINE TOO LONG If for some reason the right margin (RMAR) value becomes less than the left margin (LMAR) value, SOS will print the error message: %MARGIN ERROR and justification will not take place. Examples The following examples illustrate the Justification commands using the text taken from the first two paragraphs of this section of Chapter 5. The first two lines illustrate the positions of the text characters with various values of the LMAR, PMAR, and RMAR options. 1. The following example shows the file as it was created. + 80S JUST + MEM ~ Edit: JUST.MEM *P/l G!D Pase 1 00010 11111111112222222222333333333344444444445 12345678901234567890123456789012345678901234567890 00020 00030 00040 The Justification commands are optional 80S commands 00050 00060 and must be assembled for OOOlO ~our installation of SOS. 00080 00090 Thf~ Justi fication cOlTlmands allow ~ou to perform text 00100 00110 Justification (text arrangement) when ~ou are 00120 00130 editing a text file. A te~·~t file 00140 00150 contains information 00160 such as the contents of a 00170 book. *IRMAR: 50 G2:) * 5-64 SOS COMMAND DESCRIPTIONS Line 00030 contains all spaces and a carriage return. Line 00080 contains a TAB and a carriage return. For demonstration purposes, the RMAR value has been set to 50. LMAR and PMAR have their default value of 1. MAXLN will remain at its default value of 99999, and the LENGTH option will remain at 55. 2. The following example illustrates the JC command for the range of lines 30 through 170: *JC30:170 ~ *F'/l ~ Pase 1 00010 00020 00030 00040 000:::;0 00()60 00070 00080 11111111112222222222333333333344444444445 12345678901234567890123456789012345678901234567890 The Justification commands are optional 80S commands and must be assembled for ~our installation of SOS. OO()(,O The Justification commands allow ~ou to perform text Justification (text arrangement) when ~ou are editing a text file. A te~·~t fi Ie contains information such as the contents of a book. 00100 00110 00120 001 :~O 00140 00l~;0 00160 00170 * In the above example, each line is centered in the file. are added to the left margin for center justification. 3. Spaces In this example, the JL command justifies this text file to the left margin as it was in-the first example. The only difference will be LMAR with a value of 5. */LMAR:5 ~ *JL30:170 GD *P/l GB Page 1 0001·0 00020 00030 00040 00050 00060 00070 00080 00090 00100 00110 00120 00130 00140 00150 00160 00170 11111111112222222222333333333344444444445 12345678901234567890123456789012345678901234567890 The Justification commands are optional SOS commands and must be assembled for ~our installation of SOS. The Justification commands allow YOU to perform text Justification (text arrangement) when ~ou are editin9 a text file. A text file contains information such as the contents of a book. * 5-65 SOS COMMAND DESCRIPTIONS with the LMAR option set to 5, each line will start at that position. Each line ends with a carriage return after the last word. 4. In this example, the JR command is used with the RMAR option to 50. set */RMAR:50~ *JR30:170 ~ *P/1 ~ Page 1 00010 00020 00030 00040 00050 00060 00070 00080 00090 00100 00110 00120 00130 00140 00150 00160 00170 11111111112222222222333333333344444444445 12345678901234567890123456789012345678901234567890 The Justification commands are optional SOS commands and must be assembled for your installation of SOS. The Justification commands allow you to perform text Justification (text arran~ement) when you are editing a text file. A text file contains information such as the contents of a book. * 5. In the example above, each line ends at the RMAR option value 50, and spaces are padded to the left of each line. of In this example of the JU command, the PMAR option is set to RMAR is set to 50, and LMAR is set to 5. 10, */PMArn 10 ~ */RMAR:50~ */LMAR:5 ~ *JU30: 170 GD *P/1 ~ Page 1 00010 00020 00030 00040 000~:55 00067 0008;·5 00101 00120 00140 11111111112222222222333333333344444444445 12345678901234567890123456789012345678901234567890 The Justification commands are optional SOS commands and must be assembled for your installation of SOS. The Justification commands allow ~ou to perform text Justification (text arrangement) when ~ou are editing a text file. A text file contains information such as the contents of a book. * In the example above, the JU command justified the text file and added spaces between words to fill the entire length of the line (RMAR-LMAR+l=line length). Any word that ends with period (.), question-mark (?), or exclamation (1) may have additional spaces padded to it to fill out the line. 5-66 SOS COMMAND DESCRIPTIONS The JU command deletes line numbers and creates new line numbers when the contents of the line_ can be appended to the line preceding it. For example, the first line (00030) was expanded to include the contents of lines 00040, line 00040 became the contents of lines 00050 and 00060. The remainder of line 70 became line 00055, etc. The indentation of the first line of a paragraph is determined by the following conditions: 1. a TAB as the first character of a line, or 2. a line filled with spaces, or 3. a page mark, or 4. the beginning or ending of the specified range. Line 00030 in example 3 contained a carriage return and also was the beginning of the range. Line 00080 contained a TAB and a carriage return indicating a new paragraph. Therefore, a new paragraph was created when the JU command used the contents of lines 00090 through 00170. If the specified range had exceeded the value of the MAXLN option, the JU command would have stopped at the point before the first line that exceeded the value. Any remaining lines would remain in their original context and format. If a TAB is encountered as the first character of a paragraph, the TAB will become the first character of the paragraph and the PMAR option value is ignored. In the example above, the first character in the second paragraph started in position 9, since a TAB preceded it. 6. In this example, the JW command is used on the text file as it appears in the first example of this section. The JW command will fill the contents with blanks (or spaces) when the next word it encounters cannot fit into the line being created. */PMAF~: 10 ~ */LMAR:5 ~ Ir~MAR: 50 G!D * *JW30:170~ *F'/I @) F'a~jf:~ 00010 00020 00030 OO()40 00055 0006"7 00083 00101 00120 00140 1 11111111112222222222333333333344444444445 12345678901234567890123456789012345678901234567890 The Justification commands are optional SOS commands and must be assembled for your installation of SOS. The Justification commands allow ~ou to perform text Justification (text arran~ement) when ~ou are editinS a text file. A text file contains information such as the contents of a book. * 5-67 SOS COMMAND DESCRIPTIONS In the example above, the JW command justifies each line to the value of the LMAR and PMAR options; and does not fill each line with blanks as the JU command does. The exception is that the JW command treats words ending with a period (.), question- mark (?), or exclamation (1) the same as the JU command. Additional words from each preceding line are added to the previous line to justify that line. If the word is too long to fit, it becomes the beginning word of the next line. Since line numbers are ignored, line number insertion is done at random increments. CAUTION If you assemble your installation of SOS so that this command is operational, it is recommended that you practice using the Justification commands since they may produce some unpredicitable results when the LMAR, PMAR, and RMAR options have been reset from their default values. 5-68 SOS COMMAND DESCRIPTIONS 5.17 KILL - K COMMAND Function The Kill command deletes the indicated page mark and appends the page contents onto the previous page; that is, the Kill command deletes only the page mark, not the contents of the page. Format *K/page-number~ Argument page-number is the number of the page mark you want deleted. Hint The Kill command is the only command that deletes just a page mark. The D command is capable of deleting both page marks and text. Restrictions If any of the line numbers following the page mark match or are smaller than the line numbers on the page to which they are appended, SOS prints the message: %OUT OF ORDER To renumber the lines, give the Number command. If you specify a page number that does not exist, SOS prints message: the %NO SUCH PAGE and returns you to SOS command level. Examples 1. The following text file will command: *P G!D be used to 00100 THIS IS PAGE ONE FOR THE K COMMAND 00100 THIS IS PAGE TWO FOR THE K COMMAND PAGE 2 PAGE 3 00100 THIS IS PAGE THREE FOR THE K COMMAND PAGE 4 00100 THIS IS PAGE FOUR FOR THE K COMMAND * 5-69 illustrate the Kill SOS COMMAND DESCRIPTIONS 2. You kill the page mark for PAGE 4 and then renumber the file. "OUT OF ORDER *N~ 3. * You attempt to kill the same page mark again and message: %NO SUCH PAGE. get the error "NO SUCH PAGE * 4. You set the SOS session to EXPERT mode and continue to kill all additional page marks. Note that page mark 2 is the first page mark in the file, thus the command K/I is illegal. */EXPERT GID *K/3 G!]) "ORDER *.K/2~ "ORDER *N~ *K/l~ "NSF' *=ERROR~ "NO SUCH PAGE *P/l GID PAGE 1 00100 00200 00300 00400 THIS THIS THIS THIS IS F'AGE ONE FOR THE K COMMAND IS PAGE TWO FOR THE K COMMAND IS PAGE THREE FOR THE K COMMAND IS PAGE FOUR FOR THE K COMMAND * 5-70 SOS COMMAND DESCRIPTIONS LIST - L COMMAND 5.18 Function The List command prints on the line printer, without ending SOS, the range of lines specified in the command. After you give the List command, your current position is after the last line printed. Format *Lrange,S ~ Argument range specifies which lines SOS prints. prints the entire file. If omitted, SOS Option ,S stops SOS from printing and page numbers. line numbers, headings, Hints To make the line printer listing more readable, SOS gives each page a heading that includes the name of the file, the time and date of the printing, and a page number. Each SOS page starts a new line printer page. Page numbers have the form s-l: s is the SOS page number, 1 is the sub-page number of that SOS page. If it takes 4 line printer pages to print SOS page 4, the pages are numbered 4, 4-1, 4-2, and 4-3. Remember, to eliminate the headings, line numbers, numbers, use the ,S option of the List command. and page Restrictions When you give the List command, the system attempts to print the specified contents on any available printer. If no line printer is available at that time, the operator of the system must issue a command to continue the request for a line printer. 5-71 50S COMMAND DESCRIPTIONS It is recommended, for best results, that you spool your to avoid any possible problems with the List command. CJD output, GQ ~ • SET 'SPOOL' LPT • 80S ~;AMPL.E. TXT~) EDIT: SAMF'LE.TXT *1.. ~ S( * I{fT ) In this example, the List command will spool your output will print when a line printer becomes available. and it Examples 1. *L100 ~ * When this List command is executed, the printed output on the line printer appears as follows. The headings give the file name (LIST.EXP), the current date and time, and the page number. LIST.EXP 00100 2. 22-JUL-77 14:39:03 PAGE 1 THE L COMMAND LISTS A RANGE OF LINES *l~~) * When this List command is executed, the line printer appears as follows: printed 22-JUL-77 14:43:58 LIST.EXP 00100 00200 00300 00400 3. output on the PAGE 1 THE L COMMAND LISTS A RANGE OF LINES ON THE LINE PRINTER. IF YOU DO NOT SPECIFY A RANGE, THE SYSTEM LISTS THE ENTIRE FILE. ltL,S(~~) It When this List command is executed, the line printer appears as follows: THE L COMMAND LISTS A RANGE OF LINES ON THE LINE PRINTER. IF YOU DO NOT SPECIFY A RANGE, THE SYSTEM LISTS THE ENTIRE FILE. 5-72 printed output on the SOS COMMAND DESCRIPTIONS 5.19 MARK - M COMMAND Function The Mark command inserts a new page mark immediately before the specified line. Your position is now the first line of a new page. (Refer to Chapter 3 for a description of the page mark format.) After inserting the page mark, SOS renumbers the subsequent pages; lines retain their numbers, but each page number increases by 1. For example, if your file has 5 pages and you insert a new page mark in the middle of page 3, the new page mark is page 4, the old page 4 is now page 5, and the old page 5 is now page 6. Pages 1 and 2 remain the same. Format *Mline-number/page-number ~ Argument line-number is the line number before which SOS inserts the page mark. -If omitted, SOS uses the first line on the page. Option /page-number is the number of the page where the line is located. If omitted, SOS uses the current page. Special Cases If the line does not exist, SOS inserts the page mark on the indicated page just before the line with the next lower number. If the line is the first on the page, SOS inserts the new page mark after the existing page mark. Thus, the lines on the existing page now have their page number increased by 1. Hints The I/page-number command inserts a page mark and then allows you to insert lines, whereas the Mark command only allows you to insert the page mark. To review how to delete a page mark, refer to the Kill command. Restrictions If the Mark command specifies a page-number that does not SOS prints the message: %NO SUCH PAGE and does not attempt to insert a page mark. 5-73 exist, SOS COMMAND DESCRIPTIONS Examples 1. The following text file is used to illustrate the (notice that, at present, it is a one-page file): ,. SOS MARK. TXT GO E[lIT: MARK. TXT *PG!!) 00100 THIS IS LINE ONE, THIS IS LINE ONE, 00200 THIS IS LINE ONE, 00300 00400 THIS IS LINE ONE, * 2. Mark command PAGE ONE FOR M COMMAND EXAMPLE. PAGE TWO FOR M COMMAND EXAMPLE. PAGE THREE FOR M COMMAND EXAMPLE. PAGE FOUR FOR M COMMAND EXAMPLE. You mark line number 200 on page 1 as the page mark for page, page 2, and then you print the contents of page 2. a new *M200/1 CBD *F'/2 C!!D PAGE 2 00200 00300 00400 THIS IS LINE ONE, PAGE TWO FOR M COMMAND EXAMPLE. THIS IS LINE ONE, PAGE THREE FOR M COMMAND EXAMPLE. THIS IS LINE ONE, PAGE FOUR FOR M COMMAND EXAMPLE. * 3. You mark line number 300 as the next page in your file. After marking the line, SOS is now at the beginning of page 3. You print the contents of page 3. *M300~ *:P/3~ PAGE 3 00300 00400 THIS IS LINE ONE, PAGE THREE FOR M COMMAND EXAMPLE. THIS IS LINE ONE, PAGE FOUR FOR M COMMAND EXAMPLE. * 4. You mark line number 400 as the next page in number 400 is now the first line on page 4. your file. *M400QIG * 5. After renumbering your file, it appears as follows: *N C!ID *P/'"':/*GB PAGE 1 00100 PAGE 2 00100 THIS IS LINE ONE, PAGE ONE FOR M COMMAND EXAMPLE. THIS IS LINE ONE, PAGE TWO FOR M COMMAND EXAMPLE. PAGE 3 00100 THIS IS LINE ONE, PAGE THREE FOR M COMMAND EXAMPLE. 00100 THIS IS LINE ONE, PAGE FOUR FOR M COMMAND EXAMPLE. PAGE 4 * 5-74 Line SOS COMMAND DESCRIPTIONS 5.20 NUMBER - N COMMAND Function The Number command renumbers the line numbers within your file. If you issue a Number command without any of its options (described below), SOS defaults to a starting line number of 100 for each page in your file with increments of 100. Format *Nxincrement,range,starting-number ~ Options x to Extended can be A or P. (Refer Characteristics below for a description of either the A or P option.) increment is the number SOS adds to calculate each succeeding line number. This number will also be the first line number if the starting-number option is not used with this command. If you omrt the increment number, it defaults to 100. ,range is the range of lines you want SOS to renumber. The range may be from a few lines to multiple pages. If the range is omitted, SOS renumbers the entire file. ,starting-number is the number SOS assigns to the first renumbered line. If it is omitted, SOS uses the increment number. Special Cases There are cases where line numbers can get out of sequential order. While renumbering your file, SOS never reorders the actual line contents of your file, just the line numbers. The paragraphs below describe the circumstances and remedies for out-of-order line numbers. Hints You will probably need to give delete a page mark. (Refer command.) 5-75 the Number command after you to the Restrictions of the Kill SOS COMMAND DESCRIPTIONS Restrictions %OUT OF ORDER Whenever SOS prints the above error message, your file has at least one page (if not more) with line numbers that are not in an increasing order. You should use the Number command to eliminate the confusion. When you kill page marks in files that have many pages or are extremely large in content, the %OUT OF ORDER error message may appear again after you issue a Number command. You should continue to issue the Number command as many times as necessary unt~l the %OUT OF ORDER message no longer appears. %WRAP AROUND If you increment a page or pages of your file with an increment that does not leave enough line numbers between 0 and 99999 for the contents of that page, SOS nevertheless attempts to keep adding the increment to produce the next line number. But, if the resulting line number is greater the 99999, SOS subtracts 100000 to yield the line number it uses. This action is referred to as WRAP AROUND. You can correct it by giving another Number command with a smaller increment. Extended Characteristics *NAincrement, range ~ NA adds an increment to a given range of line numbers. This is useful when you want to shift a block of line numbers, but preserve the low-order digits. In this example, you print the contents of your file, then renumber the file as a block of line numbers, each beginning with 10000 plus its original line number. PAGE 1 00100 ONE 00200 TWO 00300 THREE O()4()0 FOUR 005()0 FIVE 00600 SIX *NA10000,/1 G:I) *P/lCiliTJ PAGE 1 10100 10200 10300 1()400 10500 10600 ONE TWO THREE FOUR rIVE SIX * 5-76 SOS COMMAND DESCRIPTIONS *NPincrement,range,starting-number ~ NP renumbers your file in one continuing sequence; that is, SOS does not reset the line number to the SOS default of 100 at the beginning of each page. In this example, you mark line 10400 (from the previous example) to begin page 2 and then you renumber the entire file. Printing the file shows two pages with duplicate line numbers. You renumber the lines of both pages so there are no duplicate line numbers. *Ml040() ~ *N@) *P/l:/2@) PAGE 1 00100 00200 0030() ONE TWO THI~~EE PAGE 2 00:1. O() FOUI~~ 002()O FIVE 003()() SIX *NF'l()()'/:L t/2 GID *P/l :/2 @) PAGE 1 00100 00200 ONE TWO O()~30() THF~EE PAGE 2 00400 FOUr;: OO~)()O FIVE O()6()O SIX * 5-77 SOS COMMAND DESCRIPTIONS Examples 1. You kill page mark 2 and receive the error message: %OUT OF ORDER. By typing the Number command with the SOS default of 100, you correct the situation. *P/1 :/2@) PAGE 1 00100 00200 00300 ONE TWO THREE PAGE 2 00100 FOUR 00200 FIVE 00300 SIX *1</2 G!i) r.OUT OF ORDER *N~ *P/1~ PAGE 1 00100 00200 00300 00400 00500 00600 ONE TWO THREE FOUR FIVE SIX * 2. You renumber the entire file starting line number of 75. * N2 5 , 11 , 75 00 *P/l GD PAGE 1 00075 00100 00125 00150 00175 00200 ONE TWO THREE FOUR FIVE SIX * 5-78 with increments of 25, and a 50S COMMAND DESCRIPTIONS PRINT - P COMMAND 5.21 Function The Print command prints a line or range of lines within your file. If the range extends to a new page or pages, the page-mark(s) are also printed. Format *Prange,S ~ Options range is the range of lines you want SOS to print on your terminal. The range may be a single line number, a per iod (.), a up-ar row ('''), an aster isk (*), or the range may extend from a beginning line number/page number through an ending line number/page number. ,S specifies that you do not want the line numbers to print. When using this option, you must press RETURN once after the S and then press RETURN again after the lines have printed to get the SOS prompt character (*) to reappear on your terminal. Hints If you do not specify a range, SOS prints a group of lines as specified by the value of the PLINES option. The default for this option is 16. Pressing Linefeed (LF) prints the next line within your file. Pressing ESCape (ESC) prints the previous line within your file. Restrictions %NO SUCH LINE(S) Whenever SOS prints the above error message on your terminal, you have specified a range of lines that does not exist within your file. This message will also appear if you press either LF or ESC when the pointer is at the end of your file or at the beginning, respectively. If you specify a range of lines that begins with a line number that does exist to a line number that does not exist, no error message will appear and only those lines that exist will print on your terminal. 5-79 SOS COMMAND DESCRIPTIONS Examples 1. You print line number 100 and the following line. *F'100! 2 GiQ 00100 THIS IS LINE ONE, PAGE ONE 00200 THIS IS LINE TWO, PAGE ONE * 2. You press (LF> and print the next line within your file. *GQ 00300 THIS IS LINE THREE, PAGE ONE * 3. You press (ESC> and print the previous line within your file. *l~ 00200 THIS IS LINE TWO, PAGE ONE * 4. You attempt to print line number 400, which does not exist. *F'400 0::0 i.:NO SUCH LINE(S) * 5. You print a range of line and page numbers. The page marks and contents of page 1 and page 2 print on your terminal. Page 3 does not exist and there is no error message. *P /1 ! / 3 (~,~~/ PAGE 1 00100 00200 00300 THIS IS LINE ONE, PAGE ONE THIS I C'..1 LINE TWO, PAGE ONE THIS 1<"' LINE THREE, PAGE ONE ,;) PAGE 2 00100 00200 00300 THIS IS LINE ONE, PAGE TWO THU3 IS LINE TWO, PAGE TWO THIS 1<-"'d LINE THREE, PAGE TWO * 6. You print line 300, suppressing the printing of the line number. By pressing RETURN either twice in succession or once again after the lines have printed, you cause the SOS prompt character to reappear on your terminal. *THIS ::;'300.? (',':';;) IS LINE:. THREE, PAGE TWO RET * 5-80 SOS COMMAND DESCRIPTIONS 5.22 REPLACE - R COMMAND Function The Replace command replaces a line or range of lines with a completely new line or range of lines that you type into the file. Format *Rrange, increment ~ or *Rrange: increment ~ or *Rrange: !number GID Argument range is the set of specified lines you want to replace. Option ,increment is the numeric increment SOS uses for creating new lines during execution of the current and further Replace commands. This , (comma) increment changes the value of the INCREMENT option. Further Replace commands will use this increment by default if the lines can be inserted. You must then press ESCape to stop inserting lines. : increment is the numeric increment SOS uses for creating new lines during execution of the current Replace command. This (semicolon) increment does not change the value of the INCREMENT option. Further Replace commands will use the value of the INCREMENT option if an increment is not specified in the command and if the lines can be inserted. You must press ESCape to stop inserting lines. :!number specifies the number of lines to insert following the position being replaced. SOS increments the lines using a table of increment values that are within the SOS source-program. The table values are 1, 2, 5, 10, 20, and 100. SOS determines which increment value to use by examining the line number following the position and the number you specified. Line numbers are inserted until the number is exhausted, until the increment is exhausted, or until you press ESCape to end the insertion. 5-81 SOS COMMAND DESCRIPTIONS Special Cases You can terminate the Replace command and return to level by pressing ESCape. SOS command Delete command Hints The Replace command functions as if you followed by an Insert command. g~ve a If you replace lines at the end of your file, the Replace command converts internally to the Insert command and allows you to continue inserting lines. Restrictions When you replace an entire file or page within a file, the message: MASSIVE DELETE OK? (Y OR N): appears on your terminal. You must reply with a Y for Yes or N for No. This message will not appear if you are using the EXPERT option. If you specify a line or range of lines that do replies with: not exist, SOS %NO SUCH LINE(S) Check the line number(s) within your file and retype the command. Examples 1. You replace line numbers 100 through 300 of a file. *00100 Rl00:300 ~ THIS IS LINE 100 G!.D 00200 THIS IS LINE 200 ~ 00300 THIS IS LINE 300(iiFT) 3 LINES (00100/1:00300) I1ErETEII * 5-82 Replace SOS COMMAND DESCRIPTIONS 2. You use the Give command to find out the present value INCREMENT option, and then you replace line numbers 400 resetting the increment value to 50. SOS inserts line 450 and 550. Line 550 is added to the end of your file. point you may continue to insert lines. To return to SOS level, press ESCape. of the and 500 numbers At this command *::::INC G!D 00100 *R400: 500, 50 ~ 00400 REPLACE LINE 400 ~ 00450 INSERT LINE 450~ 00500 REPLACE LINE 500 ~ 00550 CONTINUE INSERTING LINES UNTIL YOU PRESS ESC KEY ~ 00600 $ t GD 2 LINES (00400/1:00500) DELETED *=INC G:O 00050 */INC: 100 G:O * When you specify an increment of 50 and use a comma before the 50, you change the INCREMENT option value. To reset the INCREMENT option value, use the / (Set) command or issue another Replace command with the desired increment value. If you do not want to change the INCREMENT option value with the Replace command, use a semicolon before the .increment. 3. You replace line number 200 and insert line 210 and 220 before line number 300 in your file. The ;10 does not change the value of the INCREMENT option. *::.~INC~ 00100 *R200,10 ~ 00200 REPLACE LINE 200 OF THIS TEXT FILE ~ 00210 AND INSERT LINE 210 THROUGH ~ 00220 LINE 220 BEFORE LINE 300 OF THIS FILE $ ... •t 1 LINES (00200/1) DELETED *::::INC G8 00100 * 5-83 SOS COMMAND DESCRIPTIONS 5-84 SOS COMMAND DESCRIPTIONS SUBSTITUTE - S COMMAND 5.23 Function The Substitute command finds an existing string of characters, substitutes a new string of characters for the existing string, and prints the resulting line. The Substitute command performs this function for every line in a range. Your position is immediately after the last successful substitution. Format *Sexisting-string$new-string$range,D,N,E,number~ t ~ t ~ Arguments existing-string is the string of characters that currently exists in your file. Unless you include the ,E option, uppercase characters match lowercase characters and vice versa. You may also use any combination of the special matching characters described below. $ ends the existing-string. The cannot exceed 200 characters. new-string is the string of characters that SOS substitutes for the existing string of characters. Both uppercase and lowercase characters are substituted exactly as you type ,them~ that is, if you type a lowercase character, SOS places a lowercase character in the line. You may also use any combination of the special matching characters described below. $ ends the new-string. 200 characters. range is the range over which SOS performs the substitution. If it is omitted, SOS makes the substitution only on the first line that contains the character string to be substituted. If you issue another Substitute command in the *S shortcut format (shown below), the substitutions will take place throughout the rest of the file. 5-85 existing-string The new-string cannot exceed SOS COMMAND DESCRIPTIONS Options ,D lets you decide whether each substitution should be performed. (Refer to the paragraph below describing the D option.) ,N causes SOS to suppress the printing of the substitution for each line that contains the existing-string. The only response you receive will be the SOS asterisk prompt character. ,E requires an exact match for the existing-string. Uppercase characters match only uppercase characters and lowercase characters match only lowercase characters. Place the ,E option after the ,N and ,D options, or else, if neither is present, after the range. ,number specifies the maximum number of lines on which SOS is to perform the substitution. D Option After specifying the ,D option, you are allowed to check each substitution before SOS places it in the file. SOS prints the modified line and leaves a blank line. Then you may type one of the following characters: confirms the substitution for that line only and permits SOS to display the next line in the range where the substitution is to take place. deletes the substitution and the line is retained in its previous form. SOS proceeds to the next line in the range that contains the existing-string and displays it on your terminal, continuing the Decide mode. A enters Alter mode with the substitutions made in the line. All Alter mode instructions are valid~ the pointer is positioned at the first character in the line. E exits from the Decide mode and returns you to SOS command mode without making this or further substitutions. G confirms the current substitution and lets SOS make the rest of the substitutions without asking for confirmation, i.e., ending the Decide mode. Q quits Decide mode for the current Substitution command. You immediately return to SOS command level. The only substitutions made were those that were confirmed previously. 5-86 SOS COMMAND DESCRIPTIONS Special Cases *sGIQ performs the last Substitute command from the next line through the end of the file. If you have not already given a Substitute command, SOS prints the message: %NO STRING GIVEN *S$range,D,N,E,number~ t ~ substitutes the same new-string for the same existing-string as you gave in the last Substitute command. If you have not already given a Substitute command, SOS prints the message shown under the *S special case. Notice that you may leave out both strings, but you must press ESCape once. Extended Characteristics *Sexisting-str ingl ~ existing-string2~ existing-str ing3 ~ existing-string4 ~ existing-string5~ existing-str ing6$new-str ingl G!!) t ~ new-str ing2 G!.D new-str ing3 GIG new-str ing4 ~ new-str ing5 ~ new-string6$range,D,N,E,number~ t GO The above Substitute command substitutes new-stringl for existing-stringl, new-string2 for existing-string2, and so forth. You may use up to six existing-strings and six new-strings. However, you may not have more than 200 characters total in all the strings. If you exceed either of these limits SOS prints one of the following messages: %TOO MANY STRINGS %STRING TOO LONG To substitute the same new-string for more than one existing-string, specify more existing-strings than new-strings. SOS subs~itutes the last new-string for the extra existing-strings. 5-87 SOS COMMAND DESCRIPTIONS Special Matching Characters The following characters perform special matching. They represent a very powerful, yet sometimes complicated, way of using the Substitute command. For a complete description of the techniques used with these characters, refer to Chapter 7. You must set the IC128 option before specifying any of the special characters described below. The following characters: two Character Can match: 'I I : characters can represent variety a of any single character any separator, that is, any character other than a letter, number, period ( .) , percent (%) , or ESCape ($ ) The next three characters modify the characteristics of the character that follows them in a command so that that character "matches" as follows: Character Modifies the next character to: '% match anything except normally matches '7 quote the next special character, character I ) the character(s) it or next any match any number of occurrences of itself Special Replacement Characters You can use the following characters only in the new-string. These characters take the value of one of the special matching characters that you may have used in the existing-string. Character Can: '*n'* take the value of the characters matched by the nth special character in the existing-string ," take the value of the characters matched by next sequential special character in existing-string the the ,7 quote the next special character in replacement-string or any next character the 5-88 SOS COMMAND DESCRIPTIONS Restrictions SOS prints the following message when it tries to use an combination of the above characters: illegal %ILLEGAL SEARCH STRING If you give a very complex search string which requires excessive amount of internal space, SOS prints the message: an %SEARCH STRING TOO COMPLEX If SOS cannot find the existing string, it prints the message: %SEARCH FAILS and leaves your position at the current line. If you issue a Substitute command without an existing-string and there was no previous Substitute command, SOS prints the error message: %NO STRING GIVEN If you specify an existing-string and new-string that exceeds 200 characters, SOS prints the error message: together %STRING TOO LONG You must then reissue the Substitute command with characters in the existing-string and the new-string. fewer Examples These two examples illustrate the Substitute command by replacing the word TIPE with TYPE in a file. 1. This first example shows that after you typed the Substitute command once, it will continue the previous substitutions. GD GD , l *STIPE$TYPE$10 GB 00010 TYPE 101 *S~ 00020 00050 00060 00080 101 103 FORMAT (' PLEASE TYPE A NUMBER.') TYPE 103,X FORMAT (' YOU TYPED THE NUMBER ',F) TYPE 104,X,Y * 5-89 SOS COMMAND DESCRIPTIONS 2. This second example shows a similar Substitute command, but uses the D option for the first substitution, then S to cover all other substitutions in the file. The E command ends the substitution. ~~ • J *00010 ST I PE$ TYPE$l 0, D GiD TYPE 101 (]Q *S~ 00020 G) 00050 101 FORMAT (' PLEASE TYPE A NUMBER.') TYPE 103,X E 3. * The following example illustrates the Extended Characteristics of the Substitute command using multiple strings of substitutions. The text file is printed (line 2100 and the next 5 lines) to show the results before and after the substitutions are made. *P2100! 5GID 02100 LINE A 02200 LINE B 02~300 LINE C 02400 LINE [I 02500 LINE E *SLINE A G!D l.INE B GID l.INE CQID LINE DGE) LINE E$LINE V~ t GD LINE WGID LINE X 0!D LINE Y~ LINE Z$2100:2500,N,5QID t ~ *P2100! 5 G!D 02100 LINE V 02200 LINE W 02300 LINE X 0;~400 LINE Y 02500 LINE Z * 4. The following Substitute command replaces the word THAT at the beginning of line 900 with the word THIS. Notice the '% (not) 1/ (any character) matches the beginning of the line; (i.e., not any character THAT matches 00900 THAT since the line number and the tab are not part of the actual line contents). */C128 G!D *P900 GD 00900 THAT METHOD CAN BE USEFUL. *S'7.' ITHAT$THIS$900GIQ t 00900 (ED t GD THIS METHOD CAN BE USEFUL. */C64~ * 5-90 SOS COMMAND DESCRIPTIONS 5. The next example-illustrates the same special characters as the previous example does, but in a different content. The .'%'/ in the Substitute command represents "a period and not any character". Therefore, only the period at the end of the line is substituted with a semi-colon (i). (At the end of the line, there is "not any character" not even the space character.) */C128~ *P1900~ 01900 THIS. METHOD. CAN. BE. USEFUL. *S. '1.'1$; $. ~ ~ck THIS. METHOD. CAN. BE. USEFUL; 01900 6. * In the next example you switch the numbers before a 5, with the numbers before a 6. (period) on line 1600. The I') '/5 matches 1 and any number of any character until a 5 is reached. The ') ' / matches all the characters from the comma after the 5 up to the 1 in 1976. The I') '/6. (period) matches 1 and any number of any character until a 6. (pet"iod) is reached. Now, in the new string, '*3'* supplies the characters from the third pattern, 86; '*2'* supplies the middle characters, BUT NOT INi (semicolon) and '*1'* supplies the characters from the first pattern 97. */C128 ~ *P1600 G!D 01600 THEY WERE KNOWN WELL IN 1975, BUT NOT IN 1866. *Sl')'/5')'/l/)'16.$1/*3'*5/*2/*1'*1'*6.$1600~ t t 01600 GD GD THEY WERE KNOWN WELL IN 1865, BUT NOT IN 1976. */C64 ~ * 5-91 SOS COMMAND DESCRIPTIONS 5-92 SOS COMMAND DESCRIPTIONS TRANSFER - T COMMAND 5.24 Function The Transfer command transfers a line or range of lines so the first line being transferred starts at the specified position or after the specified position (destination). The Transfer command automatically deletes the specified line or range of lines from their original position in the file. Format *Tdestination,source-range,first-page-inc,last-page-inc ~ Arguments destination is the starting line number (and page number, if different from the current page number) where the transferred lines will be placed. If this destination already exists, the transferred lines will start directly after this destination. ,source-range is the range of source lines with or without page numbers that are transferred to the destination and then deleted from their original position in the file. Options ,first-page-inc is the increment SOS uses to number the first page of transferred lines. All lines in succeeding pages (except the last page of the file) retain their line numbers. ,last-page-inc is the increment SOS uses to number the page of transferred lines. last Special Cases If you specify an increment for the first page or last page that is incorrect or cannot be used, SOS will choose another increment and indicate that increment with the message: INCl=increment-number for the first page, and INC2=increm~nt-number for the last page. 5-93 SOS COMMAND DESCRIPTIONS If you do not specify an increment, SOS will create its own increment for the transferred lines. If the lines are transferred to the end of a file and you are using the SOS default of 100, the SOS prompt character (*) will be the only reply to indicate that the transfer was executed properly. If the lines are transferred to a destination between two existing lines, SOS will reply with a message to indicate that the transfer was executed properly: INCl=increment-number Hints SOS will create a page mark in the transfer execution only when the source-range contains a page mark. When you complete a transfer of a source range of lines including a page mark, your file may have additional page marks that are not needed. In actuality, the Transfer command causes SOS first to make a copy in memory of the source range and page marks (if specified) and then to delete the source range but not the page marks from the file. At this point, SOS makes the transfer to the specified destination from the memory source range. Thus, SOS may add page marks that are unwanted to your file. containing more than one page. Restrictions %TEXT INSERTED AT END OF FILE When this message appears, you have transferred a range of line/page numbers to the end of your file where no page marks exist for the contents of -the transferred lines. When examining your file after this message appears, you will find an additional page mark in your file that you may wish to delete (Kill command} • %INSUFFICIENT CORE AVAILABLE When this message appears, you have exhausted all available memory for the transfer. Reissue the Transfer command again using a smaller range of line numbers for the transfer and repeat the Transfer command until you transfer all the lines you want moved. % WARNING - COPY ASSUMED When this message appears, you have typed a Transfer command in the same format as a Copy command by specifying a source file or an IS. SOS assumes that you have decided to change the Transfer to a Copy command; i.e., to copy but not delete (the Transfer command cannot transfer from one file into another file). If you receive the error message: %ILLEGAL COMMAND with the above message, you did not complete. the specifications of the Copy If you receive the INCl=nnnnn (nnnnn is an increment) command. message with the above message, you specified a correct filename, file extension, and source range and the Transfer command ·performed as if it were a Copy command. If you receive a C* with the above message, you may print lines within the file to find the source range to be copied to your file. (Refer to the Copy command for the correct command specifications.) 5-94 SOS COMMAND DESCRIPTIONS %OUT OF ORDER When this message appears, you have specified an increment the transferred lines (any page) that is too large for destination. SOS will choose another increment on its own reply with the message INCl=increment: or, if the increment for the last page, SOS will again choose another increment on own and reply with the message INC2=increment. for the and was its %ILLEGAL TRANSFER DESTINATION When this message appears, you have specified a destination for the Transfer command that cannot be used. An example of this error would be if you attempted to transfer the contents of an entire page to a nonexisting line number within the same page. You should examine your file and issue the Transfer command again, specifying a legal destination. Examples You have the following one-page file: *F' GD 00100 00200 00300 00400 1. THIS THIS THIS THIS IS IS IS IS THE THE THE THE LAST LINE OF TEXT. SECOND LINE OF TEXT. THIRD LINE OF TEXT. FIRST LINE OF TEXT. * By transferring the line 400 to the top of your file and then transferring line 100 to 400, you will place the file contents in its correct order. *T'"',400 GIG INC1=00050 ltp. @) 00050 THIS IS THE FIRST LINE OF TEXT. *T400,1.00 GIQ * Your entire file now appears in the following format: P/lGIG 00050 00200 00300 00400 THIS THIS THIS THIS IS IS IS IS THE THE THE THE FIRST LINE OF TEXT. SECOND LINE OF TEXT. THIRD LINE OF TEXT. LAST LINE OF TEXT. * 5-95 SOS COMMAND DESCRIPTIONS 2. You attempt to transfer the contents nonexisting line within the current page: of your file to a %ILLEGAL TRANSFER DESTINATION * 3. You transfer the contents of page 1 including the page mark to destination specified as line number 100/2 (page 2): a *T100/2,/:L ~ %TEXT INSERTED AT END OF FILE * If you examine your file after the above command is executed, you see that your file now contains three pages because the Transfer command does not delete page marks, but only the source contents. The lines were transferred to page 3, not page 2. To avoid this result, specify the actual line numbers in the range with the appropriate page number. PAGE 1 PAGE 2 PAGE 3 00100 00200 00300 00400 THIS THIS THIS THIS IS IS IS IS THE THE THE THE FIRST LINE OF TEXT. SECOND LINE OF TEXT. THIRD LINE OF TEXT. LAST LINE OF TEXT. * Since there is no page mark for page one, SOS creates a page maik for the transfer because the range specified the entire contents of page 1. The transferred range in memory has a page mark (created by SOS) and the destination specifies a page number that does not exist. SOS inserts a page mark for page 2 and then inserts the transferred range in memory into your file. Thus, when the Transfer command has finished, you will have two additional page marks. 5-96 SOS COMMAND DESCRIPTIONS 4. You maintain a two-page file and issue a Transfer command to transfer the contents from line 100 on page 1 through line 300 on page 1 to a destination of the last line on page 2, specifying an increment of 15 for the transferred lines. PAGE 1 ONE TWO THREE 00100 00200 00300 PAGE 2 00100 00200 00300 FOUR FIVE SIX *T*/2, 100/1 : ~~OO/l, l~:j ~ *F'~ /~: *1* ~ PAGE 2 00100 00200 00300 00400 00415 00430 FOUR FIVE SIX ONE TWO THREE * The contents of the first page (00100/1 through 00300/1) was transferred to the end of page 2. Since the range did not specify the entire contents of page 1 (/1), SOS did not create a page mark for page 1, and a page mark for page 2 already existed in your file. 5-97 50S COMMAND DESCRIPTIONS 5-98 SOS COMMAND DESCRIPTIONS 5.25 INVERT - VV, VL, VU COMMANDS Function The inVert commands (VV, VL, VU) are optional SOS must be assembled for your installation of SOS. commands and The inVert commands allow you to perform uppercase/lowercase inversion. That is, when you are editing your file, you can change all uppercase characters to lowercase characters, all lowercase characters to uppercase characters, or both inversions at the same time for any specified range of lines. Format *Vcrange ~ Arguments must be a V, i, or U command. c and must accompany V uppercase to V inverts lowercase to uppercase lowercase at the same time. L inverts uppercase characters to lowercase characters; ignores all lowercase characters. U inverts lowercase characters to uppercase characters; ignores all uppercase characters. range and the specifies the range of lines you want to invert. Restrictions If you specify a range of line(s) that do not exist, SOS prints: %NO SUCH LINE(S) If you specify any character than a V, L, or U, SOS prints: %ILLEGAL COMMAND 5-99 SOS COMMAND DESC.IPTIONS Examples The following text file will be used commands: to illustrate the inVert *00100 P/1 G!2) ABCDEFGHIJKLMNOPQRSTUVWXYZ 00200 00300 00400 00500 abcdef~hijklmnoPGrstuvwx~z AaBbCcDdEeFfG~HhliJjKkLlMmNnOoPp * 1. The following example illustrates the VV command on line 500: *VV500~ *P500~ 00500 aAbBcCdDeEfF~GhHiljJkKlLmMnNoOpP * As the example shows, all uppercase characters were inverted to lowercase characters and all lowercase characters were iriverted to uppercase characters. 2. The next example illustrates the VL command on line 100: *VL100~ * P100 CE) 00100 abcdefghijklmnoparstuvwx~z * In this example, the VL command inverted all uppercase characters to lowercase characters. If there were any lowercase characters on line 100, they would remain lowercase. 3. In this example, the vu command inverted lowercase characters uppercase characters: to *VU300 G.8 *P300~ 00300 ABCDEFGHIJKLMNOPQRSTUVWXYZ * If any uppercase characters had existed in line 300, remain in uppercase. 5-100 they would SOS COMMAND DESCRIPTIONS WORLD (SAVE-THE-WORLD) - W COMMAND 5.26 Function The World command saves your file without ending the SOS session. Format *Wm: filespec ~ Options is a modifier that can be either B, D, Q, S, or combination of Band S. m a B suppresses creation,of a backup file with the extension Qxt; also suppresses the creation of a backup file with the extension Zxt if the fOLD option is set. D deletes both the original file (input to SOS) your edited file (output from SOS). Q quits so that all changes to the original file from the time of the last backup to the present are lost. S unsequences (that is, strips the output.file. :filespec line numbers and from) is the file specification of the output (destination) file. This file specification can consist of the following: dev:filnam.ext[p,pn,sfdl, ••• ]<nnn) This argument is optional; if it is omitted, the current file is used. (Refer to Chapter 2, Giving Commands, for a complete description of these file specifications.) Hints After the World command is finished saving your file, SOS the file specification enclosed in square brackets. prints By using the World command periodically while in SOS, you protect your files against power failures and other system crashes; or instead of issuing the World command, you may want to set the ISAVE and SAVE options to automatically backup your file. When you specify a file specification with the World command, further World commands default to that file specification. 5-101 SOS COMMAND DESCRIPTIONS But when the ISAVE or SAVE options are set, all auto-save backups default to any last specified filename and extension. Restrictions If you give the WD command, SOS will delete both the input file and the output file. At this point, SOS converts its mode to Input mode and creates a temporary file, nnnSOS.TEM (nnn is your system job number). You can now input the contents of a new file, which will have a temporary filename and extension, or you can end the SOS session with the EQ command. (Refer to Chapter 10 for additional information about temporary files and how to use them.) * W[I GD I Nf'UT: DSI"C: 00100 $ t GQ *EQ~ If you set the /UNSEQUENCE option and then command, SOS prints the warning message: [WARNING: give a W or WS SEQUENCE NUMBERS PRESERVED.] because the file is saved as it appears in its entirety. If you want to un sequence your file with the World command, give the WS command with the SEQUENCE option set (SOS default). If you have not made any changes to the file since saved, SOS prints the warning message: it was last [NO CHANGES.] and changes just the date on your file. If you specify an existing file when you give the World command, SOS will ask for you to confirm the deletion of the existing file. The following message will appear: OUTPUT FILE EXISTS - DELETE? (Y OR N) : You must reply with either a Y (for Yes) or a N (for No). You do not need to press RETURN after typing Y or N. SOS responds with the ES of YES or the 0 of NO. If your reply is N, SOS asks for another name of the file: FILE: You must supply a new file specification. SOS will then save the contents of the edited file in the file you specify. In some conditions, the Qxt backup file may become write-protected. SOS ignores the write-protection, creates the backup file and prints the message: %BACKUP FILE PROTECTED - IGNORED 5-102 SOS COMMAND DESCRIPTIONS If the file is protected and you cannot overwrite it, SOS the message: prints ?FILE WRITE PROTECTED, TRY ANOTHER NAME FILE: after which you should type a new file specification. If you type an illegal following message: file specification, SOS prints the %ILLEGAL COMMAND Your file is specification. not saved until you give correct file /UNSEQUENCE option a Examples 1. You give a World command to save your file: *W~ [[ISKC: TEST. ALG] * 2. You give a World command, but you have the set, so you receive the warning message. *W~ [WARNING: SEQUENCE NUMBERS PRESERVED.] [DSKC:NXTFIL.MAC[27,5107]] 3. * You save your file without line numbers. [DSKC:CHANGE.CBL[27,235]] * 5-103 SOS COMMAND DESCRIPTIONS 4. You save your file in another directory with a new name, but do not have access privileges to that directory. you *W:SAMPLE.TXT[27,235JGID 7-ILLEGAL COMMAND * 5. You now specify a directory that you do to. have access privileges *W:SAMPLE.TXT(2l,530lJG!.:D [DSKB:SAMPLE.TXT[27,5307J] * 6. You give the World command, but you have made you last saved the file. [NO CHANGES.] * 5-104 no changes since SOS COMMAND DESCRIPTIONS 5.27 EXTEND - X COMMAND Function The eXtend command moves the pointer to the end of the line(s) specified and allows you to enter text to the end of the line(s). The line(s) mayor may not be printed in their entirety depending on whether the ,S option is specified or not. You may press ESCape to enter Alter mode, or press RETURN to return to Edit mode and end the extension. Format *Xr ange , S 0!!) Argument range is the range of lines that you want to extend. When you indicate more than one line, SOS automatically proceeds to the next line. Option ,S stops SOS from printing the line. Instead, SOS prints just the line number; anything you type from that point on is added to the end of the line. Operation 1. Give the eXtend command; SOS prints out the entire line leaves the pointer at the end of the line. and *X::500: lOO GfD 00500 2. THIS IS A TEST OF Type the characters you want to add to RETURN; SOS prints the next line. oo~;oo THIS IS A TEST OF THE EXTEND ~ 00600 COMMAND AND 5-105 the line and press SOS COMMAND DESCRIPTIONS 3. Type the characters you want to add or press ESCape to stop inserting characters and to be able to give Alter mode instructions. In this step, you press ESCape to enter Alter mode after mistyping the word ALTER. After correcting the word ALTER, you press RETURN and go on to the next line. 00600 COMMAND AND ALTTER MODE. t ~L 00600 COMMAND AND ALT\\T\\ER MODE. - t t [I~ 28T 00700 4. THIS IS LINE Last, you extend line 700 and end the range specified in eXtend command. 00700 the THIS IS LINE 700 ~ * Special Cases To insert new lines, press the Linefeed (LF) key instead of ESCape or RETURN: SOS prints a new line number. Type the line contents. Each eXtend command terminates only after you press RETURN. Refer to the example below. *X600 G!O 00600 TYPE 101 G:D When you gave the eXtend command, SOS printed the line, you typed 101 and pressed Linefeed. 00650 101 FORMAT ('STARTING THE RUN.')~ SOS created a new line number, you typed an entire new line, and then pressed Linefeed. 00675 TYPE 101 G!O SOS created a second new line number. You typed this new line and ended the eXtend command by pressing RETURN. * 5-106 SOS COMMAND DESCRIPTIONS Examples 1. The following two examples illustrate the extend command and with the S option: without *>(100:200 ~ 00100 THIS IS LINE ONE FOR THE X COMMAND EXAMPLEGB 00200 THIS IS LINE TWO FOR THE X COMMAND EXAMPLE G£) * *Xl00: 200, S GID FOR THE X COMMAND EXAMPLE ~ 00200 FOR THE X COMMAND EXAMPLE GIG *F' 100 : 200 GID 00100 THIS IS LINE ONE FOR THE X COMMAND EXAMPLE 00200 THIS IS LINE TWO FOR THE X COMMAND EXAMPLE 00100 2. * The following example illustrates an eXtend command in which you enter Alter mode after extending the text line in order to recreate and correct text in the original line. *X500~ 00500 THIS IS AN XTEND XAMPLE WITH ALTER MODE/EDOM RETLA HTIW t G).-~ ELPMAX [tNETX NA SI SIHT\ THIS IS AN EXTEN[t EXAMPLE WITH ALTER MODE 00500 - t SX t IEC!D - t SX IEG'QG8 * 5-107 SOS COMMAND DESCRIPTIONS 5-108 CHAPTER 6 UPPERCASE, LOWERCASE, AND SPECIAL CHARACTERS When you start an SOS session with the SOS command and no options, the SOS program uses the following defaults: 1. Terminal characteristics of the TOPS-IO SET TTY command 2. /C64 and the TOPS-IO system default of M33 (UC) 3. /BAK, /INCREMENT:lOO, /LENGTH:55, /LMAR:l, /MAXLN:99999, /NODECIDE, /NODELETE, /NONSEPARATORS, /NOVICE, /NUMBER, /PLINES:16, /PMAR:l, /RMAR:69, /SEQUENCE, /START:lOO, and /STEP:lOO You can change the defaults by specifying options with the SOS command, by specifying them In your SWITCH.INI option file, or by setting them at the SOS command level (the M33 and M37 options are unique in that they can be determined by setting your terminal (SET TTY) to UC (uppercase) for M33 or to LC (lowercase) for M37). 6.1 SOS AND YOUR TERMINAL SETTING You can identify all of your terminal characteristics (parameters) giving the TOPS-IO command INITIA TTY. by The SOS program uses the terminal type set by the TOPS-IO command SET TTY UC or SET TTY LC. You can display this type on your terminal during SOS by giving the =CASE command. For SOS purposes, your terminal is either uppercase-only, M33 (VT05, VT06, VT50), or uppercase and lowercase, M37 (VT52, LA36). Uppercase-only terminals respond to your commands in uppercase characters only. Uppercase-lowercase terminals respond to your commands in both uppercase and lowercase characters. Depending on your terminal type and characteristics and the options you set, all alphabetic characters that you enter as text to a file during an SOS session will appear in the format and case you specified. 6-1 UPPERCASE, LOWERCASE, AND SPECIAL CHARACTERS 6.2 TERMINAL TYPE: UPPERCASE-ONLY A termina~ with uppercase type only, such as a VT05 terminal, still make use of the lowercase argument of the SET TTY command. can On a VT05 terminal when SET TTY LC is in effect, you use the SHIFT key with letters you want to be uppercase; that is, you type as if using a conventional keyboard. All alphabetic characters will appear as uppercase on the terminal screen, but when printed or listed on the line printer, the text will appear in uppercase and lowercase as you typed it. A VT50 terminal displays all alphabetic characters as uppercase. If you set your VT50 terminal to lowercase (SET TTY LC), it will have no effect. To enter lowercase characters in an SOS session using a VT50 terminal, you must set the /LOWER and /C128 options to have the characters appear as lowercase when printed on the line printer. 6.2.1 Typing Uppercase On Uppercase-Only Terminals To type uppercase characters into a file from an uppercase-only terminal is, of course, the simplest input task. The ordinary SOS default settings suffice; you do not have to set any options when you start the SOS session (/C64 and /UPPER are set by default). If the file you are working with already has lowercase characters in it, they appear as uppercase characters on the terminal screen • • 8DS UPPER. TXT ( RU ) (using a VT50 terminal) EDIT: UPPER. TXT *::=CASE ~ C64 UPPER *1600 ~ 00600 THIS IS AN UF'F'ERCASE·-ONL Y EXAMPLE. ( i U ] ) 00700 $ t ~ *P600 G!0 00600 THIS IS AN UPPERCASE-ONLY EXAMPLE. * In this example, you start SOS on a uppercase-only terminal, insert line 600, print it on your terminal, and use the List command to print it on the line printer. All characters are uppercase. The line appears on the line printer as: 00600 THIS IS AN UPPERCASE-ONLY EXAMPLE. 6-2 UPPERCASE, LOWERCASE, AND SPECIAL CHARACTERS 6.2.2 Typing Lowercase On Uppercase-Only Terminals To type only lowercase characters into a file on an uppercase-only terminal of the VT50 type, set both the /LOWER and /C128 options. For the VT05 type terminal, you need only set your terminal to lowercase with the SET TTY LC command at TOPS-IO command level. The characters will appear as uppercase when entered and printed on the terminal; but when the text is printed on a line printer that has a lowercase character set, the characters will be lowercase. In the example below, you can create the file LOWER.TXT with one of all lowercase characters • • SET TTY L.C ~ line (using a VT05 terminal) .f:;OG L.OWEF:. TXT ~ INPUT: LOWER. TXT 00100 THIS LINE IS ALL LOWEF~CASE CHAF~ACTERS. ~ 00200 $ t GC) *W~ (: DSI\C: L.OWEF<" TXT::I *L.l00 G8 * The line appears on the line printer as: 00100 this line is all lowercase characters. Remember, to enter both uppercase and lowercase characters into a file from a VT50 terminal, set the /C128 and /LOWER options; from a VT05 terminal use the SET TTY LC command. 6-3 UPPERCASE, LOWERCASE, AND SPECIAL CHARACTERS You can create a text line in the UPPER. TXT file using the /UPPER option default and specify the /C128 option. with the /UPPER and /C128 options set, the single-quote character (I) indicates that the following character is lowercase (it is said to "quote" the next character): SOS sees the two characters as one lowercase character • • SOS/C128 UPPER. TXT C@ (using a VT50 terminal) EDIT: UPPER. TXT *Rl00~ 00100 T'H'I'S '1'5 'A'N UPPERCASE-ONLY 'E'X'A'M'P'L'E.~ 1 LINES (100/1) DELETED 00200 f Go *::::CASE~ MODEL 3"7 UPPER 00100 T'H'I'S 'I'S 'A'N UPPERCASE-ONLY 'E'X'A'M'P'L'E. If you reset the /C64 option after the line has been entered with the /C128 option in effect, all characters on the text line will appear in uppercase on an uppercase-only terminal without single-quote indications. */C64 G!D 00100 THIS IS AN UPPERCASE-ONLY EXAMPLE. *Ll00 ~ * When the line is listed on the line printer, the line appears as: 00100 This is an UPPERCA'SE-ONLY example. You can specify the /LOWER option with the /C128 option on an uppercase-only terminal. With these two options set, the single-quote character (I) indicates that the next character is uppercase and SOS sees the two characters as one uppercase character. 6-4 UPPERCASE, LOWERCASE, AND SPECIAL CHARACTERS In the example below, you edit the file UPPER.TXT by inserting line number 200 with the /C128 option specified in the SOS command and the /LOWER option set at SOS command level. (SOS will recognize the /LOWER option setting only at SOS command level.) • SOSIC 128 UPPER. TXT ~ (using a VT50 terminal) [DIT: UPPER. TXT */LOWER ~ * :::CASE GB LOWER *·1200 GIG 0()20( 00300 $ 00200 'THIS IS AN 'U'P'P'E'R'C'A'S'E-'O'N'L'Y EXAMPLE. t On a line printer, line 00200 would appear as: 00200 This is an UPPERCASE-ONLY example. By resetting the /C64 option, all characters on the text line appear in uppercase on an uppercase-only terminal without single-quote indications; but when listed on the line printer the text line appears in its proper format as follows: */C64~ *F'. G!D O()200 THIS IS AN UPPERCASE-ONLY EXAMPLE. ~L200 ~ * This is an UPPERCASE-ONLY example. 6-5 UPPERCASE, LOWERCASE, AND SPECIAL CHARACTERS 6.3 TERMINAL TYPE: UPPERCASE-LOWERCASE An uppercase-lowercase terminal (VT52 or LA36) can display all alphabetic characters in both their uppercase and lowercase format. If you set your uppercase-lowercase terminal to lowercase (SET TTY LC), you can input alphabetic characters into a text file the same way as you would with a typewriter. By pressing the SHIFT key, you type uppercase characters. Thus, all alphabetic characters will be lowercase unless you press SHIFT and type the character. For SOS purposes, you do not need to set any SOS options when you use the command SET TTY LC. The uppercase-lowercase terminal gives you the option of either uppercase-only or uppercase and lowercase, and you do not have to change the SOS default options of /C64 and /UPPER. 6.3.1 Typing Uppercase On Uppercase-Lowercase Terminals To type uppercase characters on an uppercase-lowercase terminal, set your terminal to uppercase (SET TTY UC) and start SOS without specifying any of the SOS options, just as if the terminal were uppercase-only. The /C64 and /UPPER options are set by SOS default. Any lowercase characters already in a file will appear as lowercase characters on the terminal . • SET TTY UC Gi0 .80S UPPER. TXT (Rf~ Edit: UPPER. TXT (using a VT52 terminal) *1:200 G~ 00200 00300 00400 ":"HIS IS AN UPPERCASE :EXT LINE ( RU ) 'DN AN UPPERCASE-tOWERCASE TERMINAL. (RH ) ~ '~~~ *;:'/1 C~~') Page 1 00100 00200 00300 this text line is all lowercase characters. THIS IS AN UPPERCASE TEXT LINE ON AN UPPERCASE-LOWERCASE TERMINAL. * When printed on the line printer or typed on the appears as follows: the file If your terminal is not set to lowercase (LC), the file would appear in the above format on an uppercase-lowercase terminal. still 00100 00200 00300 terminal, this text line is all lowercase characters. THIS IS AN UPPERCASE TEXT LINE ON AN UPPERCASE-LOWERCASE TERMINAL. 6-6 UPPERCASE, LOWERCASE, AND SPECIAL CHARACTERS 6.3.2 Typing Lowercase On Uppercase-Lowercase Terminals To type lowercase characters into a file on an uppercase-lowercase terminal, specify the TOPS-IO command SET TTY LC before starting your SOS session. You do not have to set any SOS options to enter lowercase characters into a file on an uppercase-lowercase terminal. All alphabetic characters you type will be in lowercase. By pressing the SHIFT key, alphabetic characters can be entered as uppercase. When printed or listed on the line printer, the characters will appear as you typed them • • SET TTY lC ~ • s os. lowe r • t~·~ t ~ (using a LA36 terminal) Edit: LOWER. TXT *::=case~ Model 37 C64 Upper *i200 ~ 00200 this line is all lowercase characters. ~ 00300 $ * ob When the above text line is listed on the line printer, it will appear as: 00300 6.4 this line is all lowercase characters. TYPING SPECIAL CHARACTERS Special characters can be alphabetic, numeric, or punctuation characters; they must be preceded with the single-quote character ('). All special characters that are typed into a file or used in the SOS Substitute command must be used with the /C128 option set. Unless the /C128 option is set, SOS does not see the two characters as one character, but as two. When entering numeric and punctuation special characters during an SOS session, no SOS option will have an effect on the special characters except the /C64 option, which reverses the /C128 option; the /LOWER and /UPPER options only affect the alphabetic characters. Table 6-1 lists the control characters with their American National Standards Institute (ANSI) name, their/C128 representation, and their meanings, if applicable, when used in SOS commands or command files. NOTE Because SOS is a line-oriented editor, you cannot enter into your file any special characters for linefeed and carriage return. 6-7 UPPERCASE, LOWERCASE, AND SPECIAL CHARACTERS Table 6-1 Control Characters and Their IC128 Control Character and its ANSI name IC128 Representation "'A , ! "'B "'C "'D "'E "'F "'G "'H "'N '" ,# (SOH) (STX) (ETX) (EOT) (ENQ) (ACK) (BEL) (BS) (SO) "'0 (SI) "'p (DLE) "Q (DCl) "'R (DC2) "'S (DC3) "T (DC4) "u (NAK) "'V (SYN) "'W (ETB) "'X (CAN) "Y (EM) .. z (SUB) '" [ ESCape \ (FS) "'] (GS) (RS) ,. (US) , Accent Grave { Left curly brace I Vertical bar } Right Curly brace '" , Tilde DEL .. R~presentation Meaning (if applicable) Match any letter (A-Z, a-z) Next match string ,$ ,% Not next character (Search) Match any uppercase (A-Z) Abort (for Inserts) Backspace - also deletes Zero or more of next char. n'th match string Any decimal digit (0-9) , & ,'\( ,) ,* ,'+, , , -. Matches any character 'I '0 'I '2 One or more of next char. Match any lowercase (a-z) Match any alphanumeric '9 '6 '4 ESCape from input mode Matches space or tab Matches end of line Quote next character '= ,< ,> '7 '8 '@ '[ ': '] '3 ', Character delete (Refer to Appendix C for a complete special-character ANSI names and abbreviations.) 6-8 table and all CHAPTER 7 SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS In some instances, you may be required to edit a large or complex file, where the Find and Substitute commands with the /C64 option set require changes to the existing-string argument. For this reason (and possibly others), you may choose to enter special characters in the Find and substitute commands to give them additional power and versatility. You must set the /C128 option before using the special characters. (Table 6-1, Special Characters, gives a list of special characters available to you. Refer to Appendix C for all available special characters and their ANSI names and abbreviations.) 7.1 COMMAND FORMAT DEFINITION As shown in Chapter 5, the Find command has the following format: *Fexisting-stringtrange,A'N,E,number~ GD and the Substitute command has the following format: *sexisting-stringtnew-stringtrange,D,N,E,number~ GD GD Special characters can be used in the above formats. 1. You can use special "matching" characters instead of the exact characters for the existing-string contents of the Find and Substitute commands. 2. You can use special "replacement" characters instead of exact characters to match characters from the existing-string contents of the Substitute command. Thus, the Find and Substitute follows: command formats can also appear *Fmatch-stringfrange,A,N,E,number ~ GD and *smatch-stringtrePlacement-stringtrange,D,N,E,number~ ~ ~ 7-1 as SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS 7.2 SPECIAL MODE - /C128 When you start the SOS program, the /C64 option, the SOS default, is set. This option is adequate for most applications. If you desire to use any special characters in a file, such as matching and replacement characters or special control characters, you must set the /C128 option. The /C128 option, when set, allows you to enter any of the ~haracters from the complete ASCII l28-character set, except for carriage return, line feed, and null. All special characters (matching characters, replacement characters, and control characters) are indicated by a single-quote character (') plus a punctuation, alphabetic, or numeric character. An alphabetic character with a single quote preceding it, for example, indicates an uppercase character (if the /LOWER option is set) or a lowercase character (if the /UPPER option is set). Another example is I n which appears to SOS as CTRL/B, STX (start of text). In summary, when the /C128 option is in effect, SOS interprets the single-quote character and the following character (punctuation, alphabetic, or numeric) as a single character. 7.3 SPECIAL MATCHING CHARACTERS Special matching characters can be used in both the Find and Substitute commands to match any of the characters that exist in the text of a file. Special matching characters are in two groups as follows: 1. Special characters that represent any single character in the file contents without a character specification following the special character. 2. Special characters that represent any string of characters in the file contents with a character specification following the special character. with these two groups, you can issue Find and Substitute commands to determine different text strings of characters that have some similar features or positions within a file. These two groups, their representation, function, descriptions appear in the next two sections. 7-2 and examples with SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS 7.3.1 Character Match, without Character Specification The following special characters match single characters: IC64 IC128 Character Mnemonic "T II any single character I (vertical I : any single separator, that is, any character other than a letter, number, (%) , period ( ) , percent or dollar-sign ( $ ) bar) Matches . (For the ANSI names and abbreviations of the IC64 characters, refer to Tables C-l and C-2 in Appendix C.) Examples using the IC128 mnemonics: 1. You replace any character (II) in the line number 1200 with an x. *F'1200 ~ 01200 ABCDEFGHIJKLMNOPQRSTUVWXYZ */C128 GID *8/ I$X$. i~ t t G) ~-) XXXXXXXXXXXXXXXXXXXXXXXXXX 01200 * 2. You replace any three characters followed by a period (.) and the period itself, since it too is in the match-string, with the word TWO. for lines 300 through 500. */C128 C~ *P30()! 3 ~ 00300 THIS IS LINE THREE, PAGE ONE. 00400 THIS IS LINE FOUR, PAGE ONE. 00500 THIS IS LINE FIVE, PAGE ONE. S / I / I I • $ TWO. $ 300! 3 ~ * I t t GOG) 00300 0040() () () ~:.:j () () THIS IS L.INE THREE, PAGE TWO THIS IS LINE FOUR, PAGE TWO THIS IS LINE FIVE, PAGE TWO * 3. You replace any two separators, in this case two slashes with a comma and a space on the current line in a file. */C120~ *P.~ 00100 *'.. YOU CAN INSERTI/DELETEIIOR PRINT LINESII · ·i' <fT· ~ S /.I'~ 00100 ~ YOU CAN INSERT, DELETE, OR PRINT LINES, * 7-3 (II), SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS 7.3.2 Character Match, With Character Specification The following special characters match single or multiple occurrences of characters when specified with a character or special character. IC64 Character IC128 Mnemonic "E 1% not the character special character "N I ) arbitrary number of; any number of occurrences of itself; must only be used with another special character 17 quote next character; quote any special character that may be used in a file or any string of characters ........ Meaning of Character following this (For the ANSI names and abbreviations of the IC64 characters, refer to Tables C-l and C-2 in Appendix C.) Examples using the IC128 mnemonics: 1. This example illustrates a substitution of an A: for occurrence of an A and a separator that is not a colon ( : ) . any *F'750 G!D 00750 A.B A,C A?D A:B A:C A:D A$B A&C A@D */C128 G:D *sA' " : $A; $750 G8 t t ~~ 007500 * The next two examples illustrate a special feature of the character 1%. The first substitution replaces THIS for the occurrence of THAT at the beginning of the line only. The second substitution replaces THIS for the occurrence of THAT at the end of the line only. The 1% (not) II (any character, Section 7.3.1) when used in this way will match the beginning or ending of a line. 2. *P600: 700 G!D 00600 THAT NEWEST METHOD IS USEFUL; THAT 00700 CAN BE COMPLEX. */C128 GID *S' /.' ITHAT$THIS$600 GID t t ~GD 00600 THIS NEWEST METHOD IS USEFUL; THAT * and 7-4 SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS 3. *P600~:0 * Ii 00600 THAT NEWEST METHOD IS USEFUL; THAT STHAT'/.' TH1Sf 600 ~ ~ 00600 li.0 THAT NEWEST MET~OD IS USEFUL; THIS * 4. You replace the word ST~UCTURE for the word TREE on line number 300 on page 1. The Substitute command specifies that an Sand any arbitrary number of any characters ending with E will be replaced with TREE. *1<300/1 ~ 00300 THE FORK STRUCTURE MAY BECOME COMPLEX. */C128 ~ *SS')' IE$T~~EE$. ~ t t ~GD 00300 THE FORK TREE MAY BECOME COMPLEX. * If this Substitute command were given for a large file containing many words that begin with S and contain an E, the word TREE would replace all occurrences as shown below: *P500~ 00500 SAVE, SINGLE, SUBSTITUTE, SAMPLE, SPACE */C128 ~ *SS / ) / IEf TF:EEf • @) GD GO 00500 TREE, TREE, TREE, TREE, TREE * It is important, therefore, that you understand the effects of the special character I) (any arbitrary number of) when used with another special character in a Substitute command. 5. This example illustrates any arbitrary number semicolon being replaced by a comma (,). *P300/2 ~ 00300 YOU CAN INSERT; DELETE; OR PRINT LINES. */C128~ *S')':;$,$.@) t t GO~ 00300 YOU CAN INSERT, DELETE, OR PRINT LINES. * 7-5 of the separator SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS 6. In this example you must switch '7 and the two up-arrows (~~) on line number 100. The '7'7 quotes the special character '7 in the text line. This text is again used in Section 7.4 to illustrate the "quote next character" ('7) in the replacement string. */C128 ~ *Pl100 ~ 01100 THE'7 IN IC64 IS THE SAME AS *S'7'7 ~ ~~ IN IC128. GD ~ ~@) ............ , '7f1100 ~ GO IN IC64 IS THE SAME AS "7 IN IC128. 01100 THE */C64 ~ *F'. ~ 01100 THE ~~ IN IC64 IS THE SAME AS '7 IN IC128. * 7.4 SPECIAL REPLACEMENT CHARACTERS Special replacement characters allow you to take a pattern of matched characters, as specified by the special match characters in the match-string, and replace them in the text line(s) of a file without retyping them. The following special characters may be used only in the replacement-string of the Substitute command, with the exception of the '7 character which may be used in both the match-string and the replacement-string: IC64 IC128 Character Mnemonic ~B ," Takes the Value of the characters matched by the next sequential special character in the match-string. '*n'* the characters matched by the nth special character in the match-string. ,7 quot~s the next character~ next character may be a special character or a string of characters. (For the ANSI names and abbreviations of the IC64 characters, refer to Tables C-l and C-2 in Appendix C.) The examples the contents character in represented text line. use the ICl28 mnemonics. The example below illustrates of the three lines of text being changed. The '" special the repLacement-string will replace any single character by the 'I special character in the match-string for each 7-6 SPECIAL CHARACTERS IN FINQ AND SUBSTITUTE COMMANDS */C128 GID *P1400! 3 GID 01400 PTR1: TEMPAtl; 01500 PTR2: TEMPA+2; 01600 PTR3: TEMPA+3; *STEMPA+ 11$ tTEMF'A$1400: 1600 ~ t I II t ~ GD PTR1: l+TEMPA; F'TR2: 2+TEMPA; PTR3: 3+TEMPA; 01400 01500 01600 * in the In the example below, the words DOG and FOX must be reversed text line. The I II special character in the replacement-string specifies the pattern of characters from the match-string as specified by the I) 1/ special characters (which represent any arbitrary number of any character). */C128 GIG *Pl00 0i:0 00100 THE QUICK BROWN DOG JUMPED OVER THE LAZY FOX. *SDOG IFOXfFOX [lOG1. (lli-) I 00100 ) I I • GD C~~J THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG. * You can also change this text line using special the replacement-string as shown below: character */C128 ~ *Pl00 ~ 00100 THE QUICK BROWN DOG JUMPED OVER THE LAZY FOX. *SDOG/)'IFOXfFOX/*l/*DOGt·~ ~ 00100 GO THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG. * 7-7 I*n l * in SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS The following diagram illustrates the pattern replaces the matched pattern of characters: ( *5 DOG G JUMPED OVER THE LAZY $ FOX FOX t GO of \6 characters DOG $ t that G!D ~ The special replacement characters '*1'* could also be '". The example below shows the same Substitute command with special represents a space. text line and a more complex characters. The 'b' character *Pl00~ 00100 THE QUICK BROWN DOG JUMPED OVER THE LAZY FOX. */C128 G!D *S' ) , ID' ) , Ib' ) , IF' ) , I • $ I • F '*4' *b I *3 I *[1' *2' *. $1 00 ~ t t ~ 00100 GD THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG. * 7-8 SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS The following diagram illustrates. the pattern replaces the matched pattern of characters: THE QUICK BROWN D OGb 1)1/0 I ) lib *s " THE QUICK BROWN F of characters JUMPED OVER THE LAZY F I ) IIF ox. I) 'I. JUMPED OVER THE LAZY D , *3'*D I "F that OG. 1*2 1• In the example below, the text line contains the special character '7, which must be reversed with the two up-arrows (ftft). The '" special replacement character takes the value IN /C64 IS THE SAME AS, and the '7'7 quotes (or places) this special character at the end of the replacement-string. */C128 G!D *f'1200 G!D 01200 THE'7 IN IC64 IS THE SAME AS *8' 7' 7' ) , I~'" l ' 7 f1200 ~ t. . . ,· 01200 GO THE ~~ ~~ IN IC128. I GD IN IC64 IS THE SAME AS '7 IN IC128. * The '7 special character's main purpose is to quote any special but it may quote and also replace any characters used in a file; character in /C128 mode. 7-9 SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS In the example below, the characters Y and X are reversed. */C128 ~ *F'80 ~ TYPE 104(Y,X); 00080 *8' ) , / ( , ) , /, , ) , / ) $ , 1 ' 3' t * *( , * *, , *2 ' *) $. GIQ GD t GO TYPE 104(X·,Y); 00080 * The following diagram illustrates the pattern replaces the matched pattern of characters: 's TYPE 104( GD GD I II I ( of f characters that Xl lill ,~ GD GD TYPE 104( I * 11 • ( 0.......-. The first pattern of characters 1*1 1*( is TYPE 104(, the second pattern of characters 1*2 1*) is Y, and the third pattern of characters 1*3 1 *, is X. 7-10 SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS The example below illustrates a Substitute command using special matching and replacement characters that will replace any pattern of characters on a text line with the matched pattern, eliminating all trailing spaces from the line. Null strings of spaces will not be removed. The Ib l character represents a space. *F'~:* ~ 00100 00200 00300 00400 THIS THIS THIS THIS IS LINE ONE. IS LINE TWO. IS A NULL STRING: IS LINE FOUR. * Line numbers 100, 200, and 400 contain ten trailing spaces as shown with the Alter command below: can be *Al00 GIQ 00100 THIS IS LINE ONE. -- t 13S~ */C128 ~ *S I /';bb I ) b I/,; I If Ifro,: *GID I GD GD 00100 00200 00400 THIS IS LINE ONE. THIS IS LINE TWO. THIS IS LINE FOUR. *p,o,:* ~ 00100 00200 00300 00400 THIS IS LINE ONE. THIS IS LINE TWO. THIS IS A NULL STRING: THIS IS LINE FOUR. * If you perform the same Alter command on line number 100, the will be placed after the period (.). *A100 GID 00100 THIS IS LINE ONEt .... t 13S~ pointer .... t @) * The special characters l%bbl)bl%lj in the match-string represent the The special last nonspace character and any trailing spaces. character III in the replacement-string represents the matched last nonspace character of the line. This form of the Substitute command is useful for storing files within a directory. 7-11 saving space when SPECIAL CHARACTERS IN FIND AND SUBSTITUTE COMMANDS 7-12 CHAPTER 8 LINE CONTENTS SPECIFICATIONS To reference the contents of a line in an SOS file, you usually use the line number and/or page number. SOS formats, for example, use the words "position" and "range" which refer to line numbers. However, there is another way to reference a line or lines. You can use the contents of the line(s) instead of the line number(s). One advantage of this technique is that it gives you a choice when you work with unsequenced files, i.e., files stored without line numbers to save storage space. You can resequence the file and use line numbers or you can use the line contents directly. This method for editing your file is most useful when your file contains more than 99,999 lines (the /MAXLN option default value) and you do not wish to create new pages for additional input or for editing. 8.1 LINE CONTENTS COMMAND FORMATS The SOS commands have a different command format when you specify line contents instead of line/page numbers: Gp ~ *any-SOS-Command~start-here! ~ : ffinish-heref ~ OK) GD Arguments: start-here is a string of characters in the line where the SOS command will start its operation. The first occurrence of the string after the present position will be used. If the string start-here is not found, SOS prints the message: %NO SUCH LINE(S). finish-here is a string of characters in the line where the SOS command will end its operations. If the string finish-here is not found, SOS prints the message: %NO SUCH LINE(S) and no action is taken. 8-1 LINE CONTENTS SPECIFICATIONS If only the string start-here is specified, the range contains one line, the one that contains the characters of start-here. The command format takes the form: ~ Gp *any-SOS-Command!start-here~~ ~ You may also combine line contents specifications and the regular line/page-number specifications in the SOS command to specify the range to search for the start-here string. The command format takes the form: @) Gp *any-SOS-Commandtstart-here~~ :line/page-number~ (Notice that the line/page-number follows the colon.) When you use line contents specification, the pointer will only move forward through a file. To move the pointer backward through a file, an additional argument, line/page number, must be specified after the start-here<ESC> and before the <RET>. The command format takes the form: Gp Gp *any-sos-command~start-here~line/page-number~ :ffinish-heret~ GO ~ CEO The character string finish-here<ESC> may be followed by a line/page-number argument in this command format or it may be omitted. The line/page-number (/1 and /2 used in examples) is useful when you are not sure of your current position relative to the end of the file, since it guarantees the entire file will be searched. 8.2 LINE CONTENTS SPECIFICATION EXAMPLES Line contents specifications are somewhat more complex than line/page-number specifications, but they may be helpful when you are editing large files. The following examples illustrate some of the 80S commands that use line contents instead of a range specification. An explanation follows each example. 8-2 LINE CONTENTS SPECIFICATIONS 1. , GOCGD ! *p ONE$ 0!:D : $TEN$GIQ t t G:DG=> C@ 00100 00200 00300 00400 00500 00600 00700 00800 00900 01000 LINE ONE LINE TWO LINE THREE LINE FOUr~ LINE FIVE LINE SIX LINE SEVEN LINE EIGHT LINE NINE LINE TEN * You issue a Print command showing the file that will be the examples. 2. used in all GQGf *Ci TE N$/1 C@ 'foNEt/1 C@ GDGQ :lrwof/l C@ GDGQ ~ GpGp *P~TENt/1 C!B :/1 C@ 01000 01100 01200 LINE TEN LINE ONE LINE TWO * For demonstration purposes, you issue a Copy command, copying the first two lines of text and placing them at the end of the file. When the pointer is at the end of the file (as a result of the Copy command), the /1 specification (with the line contents specification format) is needed to force SOS to look through the entire contents of the file. 8-3 LINE CONTENTS SPECIFICATIONS ~GQ 3. 1 1 F'$SIX_/l G!D G!D 00600 LINE SIX GD~ *MJSIXl/lG:Q ~ ~~ *F'iSIxi/2G!D ~ 00600 LINE SIX * You mark a page mark for page 2 on the line that contains the word SIX as contents. You move the pointer (. command) to the line at the beginning file where the word ONE exists. 5. of the GU *XiSFVENi G!D (ED PAGE 2 :fEIGHTf C§) G.D ~ 00700 00800 GD L.INE BEVEN OF TEXTG!D LINE EIGHT OF TEX.TG:Q * You issue an eXtend command for a range of lines that contain the word SEVEN through EIGHT. SOS prints PAGE 2 indicating that word SEVEN, at the beginning of the range, was found on page 2. Whenever you issue an SOS command using line contents as a range specification, SOS takes the command, after you press RETURN the first time, as if a Find command were issued. If the contents cannot be found, SOS types the message %NO SUCH LINE(S). 8-4 LINE CONTENTS SPECIFICATIONS 8.3 LINE CONTENTS SPECIFICATION IN THE SUBSTITUTE COMMAND The Substitute command with takes the form: Gp *Sexisting-str :jfiniSh-heref GO GD the line contents . GD~ ~ range specification ing~new-str i.ngttstart-heret~ GD This format establishes a range of lines. An additional feature of this Substitute command exists when line contents are specified. You can specify up to three boundaries for the substitutions to execute in the contents of your file. (Refer to the last two examples in this section, for a description of how these boundaries are used.) ~ ~~ ~ *sexisting-string!new-stringttstart-here!~ ~ This format establishes a range of one line only. In either of the two Substitute command formats shown above, the substitute options or line numbers or both may be specified at the end of the command. with the file used in the previous section of following examples illustrate the Substitute contents as a range specification. 1. this chapter, the command with line You substitute the word ELEVEN for the word TEN on contains the word TEN. ~ @) *STENiELEVEN!$ TEN$ t ~ 01000 t ~ ~~ TEXT ELEVEN * 8-5 a line that LINE CONTENTS SPECIFICATIONS 2. When you use the original file, you substitute the word TEXT for all occurrences of the word LINE. The line contents specification (i.e., the "range") is from the line that contains ONE to the line that contains TEN. (Another explanation of the range from ONE to TEN is to call it a "boundary" if this file were to expand many lines or many pages.) The substitute option number is specified to force the substitution to occur ten times. .,, ~ (lS( ~ G) *SLINE$TEXT$$ONE$/l GD t G~ ~~ • • :$TEN$,10~ C§:) 00100 00200 00300 00400 00500 00600 00"700 00800 00900 01000 TEXT ONE TEXT TWO TEXT THREE TEXT FOUf:: TEXT FIVE TEXT SIX TEXT SEVEN TEXT EIGHT TEXT NINE TEXT TEN * 3. In the next example, you issue a Substitute command with three boundaries as specifications for the range the substitution will execute in. When your file is extremely large and you are editing without line numbers, this Substitute command is useful when you want to explicitly set the range (boundary) for the substitution. Using the text file from the previous examples, an inner boundary of lines that contain the words FOUR through SIX are set to substitute the word TEXT for LINE. A second boundary is specified as the lines that contain the words THREE through SEVEN, and a third boundary is specified as the lines that contain the words TWO through EIGHT. This example is impractical for a small file,' but it will illustrate the full use of three boundaries and the =STRING command. 8-6 "- LINE CONTENTS SPECIFICATIONS • SOS/NONUMBEF~ SAMPLE. TXT(® EDIT: SAMPLE.TXT *f;'fONEf~ GDGD :fTENf Q!D GDGD GID LINE ONE LINE TWO LINE T~H~EE LINE FOUl:;: LINE FIVE LINE SIX LINE BEVEN LINE EIGHT LINE NINE LINE TEN , , ~GD : $SIXf$THREEf.ll Q!;D ~ @:) @:) GD JSEVENtiTWOV1~ ~~ G})G}) :tEfGHT!/l ~ GID ~ GI0 TEXT F()UI;~ TEXT FIVE TEXT ~:)IX * 8-7 LINE CONTENTS SPECIFICATIONS 4. Now you give the Print command to display the entire file, line contents specifications as the range. using ~~ *f'iONE! GD~ ~ :iTEN1~ ~ LINE ONE LINE TWO LINE THREE TEXT FOUR TEXT FIVE TEXT SIX LINE SEVEN LINE EIGHT LINE NINE LINE TEN * 5. When you give the =STRING command, the entire Substitute command specifications are listed so that you can check the characters and the line contents used as boundaries. *::::STRING ~ FIND: SUBSTITUTE: TEXT FOR: LINE LINE-CONTENTS: SIX 2: SEVEN 3: EIGHT * 8-8 CHAPTER 9 SOS FILE BACKUP It is recommended that, while you are creating or editing a file on your installation of the TOPS-IO monitor, you back up your file often enough to protect your inputs and edits. SOS file backup may be accomplished with the /ISAVE or /SAVE option or with the World command without ending your SOS session. It is good practice to back up your files every 15 minutes or so during an SOS session. In that way, you are sure of not losing more than 15 minutes' work if the system crashes. Though backing up your file may be time-consuming, it will prevent you from having to st~rt allover again. 9.1 THE WORLD (SAVE-THE-WORLD) COMMAND The World command saves your file, but lets you continue editing without ending the SOS session. The world command does not change your place in the file. It is good practice to give the World (or End) command before walking away from your terminal so that your work is saved. To give the World command, type a W at SOS command level and press RETURN. SOS prints the name of the file and leaves you at SOS command level. CDSKC:SAMPLE.TXT[27,5107J] * The World command creates a backup file with the file extension .Qxt and saves all edits to your file made since the last backup file was created. In the example above, SAMPLE.TXT was saved with the current edits and a SAMPLE.QXT file was created. SAMPLE.QXT consists of your input file without the current edits. If the /OLD option was set, a file extension of .Zxt would be created (instead of a .Qxt-extension file) if a .Zxt-extension file did not already exist. 9-1 SOS FILE BACKUP 9.2 THE AUTO-SAVE FEATURE The auto-save feature is initiated when you specify or set the /ISAVE or /SAVE options. If you are creating a new file, specify the /ISAVE:n option in the SOS command before or after the entire file specification. If you aLe editing a file, specify the /SAVE:n option in the SOS command before or after the entire file specification. Both options must be specified with a number (n), from 1 to 99999, which sets the auto-save feature to occur after that number of SOS commands. The difference between /ISAVE and /SAVE is that /ISAVE is intended for the Input mode and /SAVE is intended for the Edit mode. The /ISAVE operates after n lines have been input whereas /SAVE operates after n SOS commands have been given that change the file contents. The /ISAVE or /SAVE option remains in effect for the duration of the SOS session or until you change it. 9.2.1 File Backup While Inputting In the /ISAVE:n option, the "n" specifies that auto-save will be performed after "n" lines have been entered as text into your file. In the example below, you create a file SAMPLE.TXT, specifying the /ISAVE option with the" number :3 • •SOS/ISAVE: 3 SAMPL.E. TXT INPUT: SAMPLE. TXT 00100 LINE ONE ~ 00200 LINE TWO ~ 0()300 LINE THREE ~ [DOING AUTO-SAVE~ ~ PLEASE WAIT.] CDSKC:SAMPLE.TXTJ 00400 After every third line is entered into the file, SOS performs an auto-save automatically and then continues with the next sequential line number to be entered. If you end the SOS session at line number 400 with an EQ command, your file will be saved because it was backed up by the auto-save feature. If you issue a World command before your file is saved by the auto-save feature, the /ISAVE value is reset to zero and the count begins again to auto-save automatically after n lines. 9.2.2 File Backup While Editing in the /SAVE:n option, the "n" specifies that auto-save will occur after "n" SOS commands have been issued. SOS commands not counted by this option are those commands that do not change the contents of the text within the file. In the example below, you edit the file SAMPLE.TXT, specifying the /SAVE option with the number :3. 9-2 SOS FILE BACKUP .SOS/SAVE:3 SAMF'LE.TXT EDIT: SAMPLE. TXT ~ *Xl00~ 00100 LINE ONE PAGE ONE~ *R200 G!D 00200 TEXT LINE TW00!D 1 LINES (00200/1) DELETED *It300~ 1 LINES (00300/1) DELETED [DOING AUTO-SAVE, PLEASE WAIT.] (DSKC:SAMPLE.TXTl27,5107]J * After every third SOS command that changes the contents of the file, an auto-save will automatically be performed and you will be returned to Edit mode (SOS command level). If you issue a World command before your file is saved by one of the auto-save options, the /SAVE value is reset to begin its count from that save. 9.3 SAVING YOUR FILE The End command will save your file and end SOS. The Go command will also save your file, end SOS, and execute the last COMPILE, EXECUTE, LOAD, or DEBUG command that was given at TOPS-IO command level prior to the SOS session. SOS creates a backup file with a file extension of .Qxt when your file is edited for the first tim~. The "xt" of the extension is the last two alphanumeric characters from the file extension of your input file. Thus, if your file was named FILNAM.ABC, your .Qxt file is named FILNAM.QBC. The .Qxt file is updated automatically each time you save your file. You can suppress the creation or update of this .Qxt file by setting the /NOBAK option or by using the B option of the End or Go command. 9.3.1 Ending SOS Saving The-Line Numbers Type E (or G) and press the RETURN key to end SOS and save with line numbers. SOS saves your file, prints specifications, and leaves you at TOPS-IO command level. [DSKC:STATS.DAT[27,5107]] or [DSKC:STATS.DAT[27,5107J] (The appropriate TOPS-IO command is executed next.) 9-3 the the file file SOS FILE BACKUP SOS automatically renames the original file to filnam.Qxt and retains the line numbers. In this example, besides the new STATS.DAT, the original STATS.DAT is now called STATS.QAT, thus providing a convenient way to check changes. The .Qxt file also retains its line numbers. You may delete the .Qxt file with the TOPS-IO command DELETE, but you should do so only after you are sure that you have made the proper changes to your file. You may use the /NOBAK option to suppress creating or updating the .Qxt file, for example, to save space. 9.3.2 Ending SOS Without Saving The Line Numbers Give the ES (or GS) command to end SOS, remove the line numbers (unsequence the file), and then save the file. SOS removes the line numbers, prints the file specification, and then leaves you at TOPS-IO command level. Both the ES and GS commands create a backup file with the file extension .Qxt. (The .Qxt backup file retains the line numbers of the original file only if the original file contained the line numbers before the SOS session.) (DSKC:STATS.DAT(27,5107JJ The ES (or GS) command is useful when you are preparing a file will be read by a program that does not recognize line numbers. that If your directory contains many files and you must conserve space, end your SOS sessions with an ES or GS. The savings in disk space can be substantial, as shown in the following example • • SOS COBOL t CBl ~ EDIT: COBOl.CBl *ESGE) (DSKC:COBOl.CBl(27,5107JJ .DIRECT/AllOCGD COBOL aBl 15 (055) 12-JAN-78 DSKC: (27,5107J COBOL CBl 10 (055) 12-JAN-78 TOTAL OF 25 BLOCKS IN 2 FILES ON DSKC: (27,5107J An allocated IS-block COBOL source program is edited by removing the line numbers. with the TOPS-IO command DIRECT (for Directory) and the /ALLOC switch (for allocated length), you can display the two files in the directory. The original COBOL source program file allocated 15 blocks in the directory: the unsequenced COBOL source program file allocated only 10 blocks. You save 5 blocks of storage in your directory. 9-4 SOS FILE BACKUP Other Programs And Line Numbers Some programs may not operate properly if they attempt to read a file that contains line numbers. In such a case, stop the program, run SOS, and use the ES command to save the file without line numbers. 9.3.3 Ending SOS with No Backup File Type EB (or GB) and press RETURN to end SOS, save your edited file, and automatically suppress the creation of any backup files. Even if the SOS option /OLD is in effect, the EB and GB commands prevent creation of the .Zxt file extension as well as the .Qxt file extension. (If the /NOBAK option is set, you do not need to specify the B option when you give the End or Go command, as the /NOBAK option suppresses the creation of any backup files.) In summary, the EB command saves your currently edited file, does not create or update a .Qxt file, and returns you to TOPS-IO command level. The GB command saves your currently edited file; does not create or update a .Qxt file; and executes the last COMPILE, EXECUTE, LOAD, or DEBUG command before returning you to the TOPS-IO command level • •[lIRECT G!D NUM NUM FOR 3 (055) 7-[lEC-77 DSKe: [27,5107J QOR 3 (055) 7-·DEC·-77 TOTAL OF 6 BLOCKS IN 2 FILES ON [lSKC: [27,5107J .S05 fOLD NUM. FOR G!D EDIT: NUM.FOR *STIPE lTYPE r':*,N ~ ~GD [[lSKC:NUM+FOR[27~5107JJ .[1 I REeT NUM G!D FOR 3 (055) 12-JAN-78 DSKC: [27,5107J TOTAL OF 3 BLOCKS IN 1 FILES ON DSKC: [27,5107] In the example above, you edited the file NUM.FOR, specifying the SOS option /OLD for the creation of a .Zxt file extension backup. By typing the EB command, you suppressed the creation of both the .Qxt file extension and the .Zxt file extension. 9-5 SOS FILE BACKUP Depending on the file protection codes of the .Qxt files in your directory path, the EB, GB, or WB commands may also delete those .Qxt files as shown in the above example. The default protection code, <055>, allows you to delete the existing backup file when you give the EB, GB, or WB commands. 9.3.4 Ending SOS without Saving The File To end SOS without saving the changes you made to the (or GQ) and press the RETURN key. file, type EQ The EQ, GQ, or WQ command does not save any changes made to the file since you gave the last SOS command. If you created a file, it is now gone; if you edited a file, the changes are now lost. But if you have given a World command during the SOS session, only the changes made since your last World command are lost. Since SOS does not have to do any work, EQ, GQ, or WQ commands operate very quickly. An EQ, GQ, or WQ command is useful in the following circumstances: 1. When you have used SOS to merely read through a file, there is no reason to resave it because you have not made any changes. 2. After you have given a command or an edit that makes your file useless, you can give the EQ, GQ, or WQ command to cancel that part of the SOS session. 3. If you want to try a particular SOS command, you can start SOS, give a World command, and try the particular command. Then, if the command does not work the desired way, give the EQ, GQ, or WQ command to restore the original file. End, Go, or World commands also have a delete capability. The ED, GO, or WD commands must be used with extreme caution. They delete both your edited file (output from SOS) AND your original file (input to SOS) unless your original file has a protection code greater than or equal to <400>. 9.4 SOS BACKUP FILES Every time you change an existing file and then save it with an End, Go, or World command, SOS creates a backup file. The following examples show, by the creation and editing of a text file in SOS, how the backup files are managed • • SOS TEXT. F 1 L ~ TEXT.FIL INPUT: 00100 002()O *E CED ONE HUNDf<ED GrD $ t GD [[tSKB:TEXT.FILJ 9-6 SOS FILE BACKUP After the creation of the file, there is only one image TEXT.FIL in the directory path: [27,5107] • of the file and your • DIRECT ~ TEXT FIL 1 (055) 3-MAY-78 DSKB: [27,5107] TOTAL OF 1 BLOCKS IN 1 FILES ON DSKB: [27,5107J Now add a line to the file and save the changes • • 80S TEXT.FIl~ EDIT: TEXT.FIL *I200~ 00200 00300 TWO f HUNDF~ED~ ~ *E~ CDSKB:TEXT.FIL[27,5107JJ The original file, TEXT.FIL, has been renamed to current file (with two lines) is TEXT.FIL • TEXT.QIL, • DIF:ECT~ TEXT all 1 (055) 3-MAY-78 DSKS: [27,5107] TEXT FIl 1 (055) 3-MAY-78 TOTAL OF 2 BLOCKS IN 2 FILES ON D8KS: [27,5107J Add a third line to the file and save the changes • •SOS TEXT .FIL ~ EDIT: TEXT.FIL.. *1300 ~ 00300 THREE HUNDRED ~ 00400 f *E~ GD [DSKB:TEXT.FIl[27,5107JJ The original file, TEXT.QIL, consisting of one line of input has been deleted. The current .QIL file contains two lines of input and the TEXT.FIL file contains three lines of input • •DIRECT G8 TEXT all 1 <055> 3-MAY-78 DSKS: [27,5107J TEXT FIl 1 <05S) 3-MAY-78 TOTAL OF 2 BLOCKS IN 2 FILES ON DSKS: [27,5107] If you do not want the .QIL files, you can set the /NOBAK option when you start the SOS session or during it. The /NOBAK option will not allow the current .QIL file to be updated when you save the TEXT.FIL file; it remains unchanged. 9-7 SOS FII.E BACKUP Now set the /NOBAK option when you edit the file. • SOS TEXT .FIL (ill) EDIT: TEXT.FIL */NOBAK~ * 1400 (]!D 00400 00500 FOUR HUNI:IRE:[lG!D t [DSKB:TEXT.FIL[27,5107JJ The current updated file is TEXT.FIL (contains four text lines), and the .QIL file still contains only two lines of text. The TEXT.FIL file that contained the three lines of text was deleted automatically. If you want to continually use this feature, add the /NOBAK option to your SWITCH.INI file. Whenever you run SOS, the /NOBAK option is then automatically given for you. NOTE If you do a lot of creating and editing of small files, backup files may become space- and time-consuming. If so, include the /NOBAK option in your SWITCH.INI file or issue the option when starting an SOS session. If you specify or set the /OLD option either when you originally created the TEXT.FIL file or at any time when you edit this file, a .ZIL file would be created. The .ZIL file would contain the contents of your file as it appeared before any edits took place. 9-8 SOS FILE BACKUP 9.5 -INSUFFICIENT DISK SPACE - WELL?- MESSAGE If you exceed your disk block quota or available memory during an SOS session, SOS is unable to perform the last command given or to write your file to your specified directory path. It prints a message to that effect: WELL'~ and awaits a response. This section describes the possible responses you can employ, but there is no guarantee that they will work at all times: results are unpredictable. This is an unsupported feature of SOS. If the last command given was other than an End, Go, or World command, SOS prints: WELL'~ If the last command was an End, Go, or World command auto-save, SOS print~: or possibly an [INSUFFICIENT DISK SPACE TO DO OUTPUTl nnnn DISK BLOCKS IN YOUR AREA ON dey nnnnn BLOCKS FOR' ALL USERS ON THIS STRUCTURE WELL? Where: nnnn is the number of blocks in your disk area. This is the same response you would have gotten if you had given the =DISK command. dev is the structure to which output is being done. nnnnn is the total number of blocks device structure. When you type an H to the WELL?, SOS will responses that you can give. to all users list the four on that acceptable WELL 1 H YOU MUST TYPE: G - DO THE OUTPUT (NOW AND FOREVER). T - TEST DISK SPACE AND DO OUTPUT IF SPACE AVAILABLE. R - GIVE RESOURCES AND DO OUTPUT IF SPACE AVAILABLE. W - WAIT UNTIL EITHER SPACE APPEARS OR YOU TYPE A DIFFERENT RESPONSE. WELL? Besides these four possible responses, you can press CTRL/C and type any of the five commands to the YES? response to either save your file, if possible, or return to the TOPS-IO monitor. If you use the CTRL/C and return to the TOPS-IO monitor, give the TOPS-IO command DIRECT to check your directory. There may be a nnnSOS.TMP file in your directory that will contain your file and all edits up to the point when you received the WELL? reply. (Refer to Chapter 10, for information on how to use this file.) 9-9 SOS FILE BACKUP It is strongly recommended that you maintain enough free disk blocks in the specified directory so that this message will never appear during an SOS session. Back up your files on tape or another disk, or break up a large file into smaller parts for your SOS session to prevent the directory from becoming congested. 9.5.1 Well? - G Response By typing a G to the WELL? question, you are attempting to force SOS to do the output. In most instances, nothing will happen and SOS will print the informational message: WELL" G 8450 DISK BLOCKS IN YOUR AREA ON DSKC 96800 BLOCKS FOR ALL USERS ON THIS STRUCTURE WELL? At this point you should try one of the other WELL? commands. If the G command works, the Edit mode prompt (*) will reappear or SOS will indicate that your file was backed up and the TOPS-IO prompt (.) will appear. 9.5.2 Well? - T Response By typing a T to the WELL? disk for available space. message DSK OK NOW. question, you are attempting to test your In most instances, SOS will reply with the WELL" T DSf( OK NOW. At this point, you may receive the SOS asterisk prompt indicating that your last SOS command has finished executing. If you receive the TOPS-IO period prompt, your edited file has been saved in the specified directory path. If neither the asterisk or period prompt appear, SOS will reply again with the following message: (INSUFFICIENT DISK SPACE TO DO OUTPUT] 8450 DISK BLOCKS IN YOUR AREA ON DSKC 96800 BLOCKS FOR ALL USERS ON THIS STRUCTURE WELL'? At this time you should try another response to WELL? 9-10 SOS FILE BACKUP 9.5.3 Well? - R Response By typing an R to the WELL? question, you are attempting to print your disk resources, test your disk for available space, and, if possible, make the copy. If the R response works, the SOS asterisk prompt (or TOPS-IO period prompt) will appear on your terminal. Otherwise, the following message will appear: WELL"~ R 8450 DISK BLOCKS IN YOUR AREA ON DSKC 96800 BLOCKS FOR ALL USERS ON THIS STRUCTURE DSK OK NOW. [INSUFFICIENT DISK SPACE TO DO OUTPUT] 8450 DISK BLOCKS IN YOUR AREA ON DSKC 96800 BLOCKS FOR ALL USERS ON THIS STRUCTURE WELL? At this point you should try another response or press CTRL/C and respond to the YES? (Refer to Chapter 2, Section 2.4.2 or Appendix A for the responses to the YES?) 9.5.4 Well? - W Response When you type a W to the WELL? question, SOS will wait until either space becomes available on disk or in memory or until you type a different response to the WELL? message. SOS will wait indefinitely, or until the system crashes, or until you type any other response. If you give another response while SOS is waiting, SOS will respond as if to an R response. A possible solution is to login to the TOPS-IO system from another terminal and backup and/or delete some files to obtain available space. As with all the WELL? responses, this mayor may not work. 9-11 SOS FILE BACKUP 9-12 CHAPTER 10 HOW SOS HANDLES FILES AND BUFFERS This chapter describes in detail the procedures SOS uses to protect your inputs and edits through its use of temporary buffer files and backup files. When you start an SOS session, SOS creates, in the directory path, a temporary buffer file that will be used automatically to create or update your output file when you give an End, Go, or World command. In addition, SOS may create an extra temporary buffer file when the current file exceeds the available memory for the SOS session. The amount of available memory allotted to an SOS session is 1280 words. This amount can be changed within the SOS source code~ the SOS source must then be re-assembled for your installation. 10.1 HOW SOS KEEPS THE CURRENT FILE IN MEMORY SOS uses, in addition to memory, two temporary files (called nnnSOS.TEM and nnnSOS.TMP) to keep track of your current edits. Thus, when you give an End, Go, or World command, SOS must first combine: 1. The edits in memory 2. The nnnSOS.TEM file 3. The nnnSOS.TMP file before it can create the new version of the source file that will contain them. In the event that the system crashes while you are editing, you can obtain a major portion of your edits by properly combining one or more of the files. The next paragraphs contain a description of how SOS creates and these files and how you use them to recover from a system crash. uses Remember that either of the temporary buffer files described in this section occur before 80S creates a new image copy of the source file. Remember also that the source file (or the edits themselves) must exceed the memory words (1280 by default) for SOS to completely fill either or both of the two temporary buffer files. If the file you are editing does not exceed the allotted memory words, your source file and backup file are created as described in Section 10.2. 10-1 BOW SOS HANDLES FILES AND BUFFERS 10.1.1 The Memory Buffer Whenever you edit your file, SOS brings your file into memory. SOS allocates a portion of memory, and, if your file is large, SOS places that part of your file that cannot fit in memory into the temporary buffer file named nnnSOS.TEK. As a result, if you attempt to edit a line that would cause the buffer to overflow, SOS transfers the current buffer file, nnnSOS.TEM, to another buffer file, nnnSOS.TMP. SOS never retrieves lines from the nnnSOS.TMP file; it only transfers lines to it. So, if you want to edit a line that is located before the first line in the current buffer (nnnSOS.TEM), SOS must: 1. write the rest of the source file to the nnnSOS.TEM file 2. rename the nnnSOS.TEM file to be a nnnSOS.TMP file 3. use the nnnSOS.TMP file for input 4. create a new nnnSOS.TEM file The four operations listed above occur automatically; you cannot control them. You can, however, save SOS some trouble by localizing your edits. If you want to know the first line in the buffer, type the =LOCATION option command. (The total number of lines in the buffer at one time during an SOS session varies depending upon the amount of text contents per line.) 10.1.2 The nnnSOS.TEM File The nnnSOS.TEM file is created automatically by SOS in a session containing any edits that SOS cannot fit 1n memory. This is a temporary buffer file residing in your specified directory path during an SOS session. The "nnn" is a three-digit number that consists of your TOPS-lO job number. Thus, the temporary buffer file for job 26 on the TOPS-lO system may appear in the directory after a crash as: .DIRECT ~ 026S0S TEM 360 <055> 20-MAY-78 DSKC: [27,5107] TOTAL OF 360 BLOCKS IN 1 FILES ON DSKC: [27,5107J This is its complete name format. If it is empty, this file will not even appear in the directory because the system will delete it when restarting. The 026 refers to your job number at the time the crash occurred. You should always know your job number because there may be other nnnSOS.TEM files when other users are editing files in the same directory path. When you exit from the SOS session in becomes the new source file. 10-2 the usual manner, this file HOW SOS HANDLES FILES AND BUFFERS 10.1.3 The nnnSOS.TMP File SOS creates an nnnSOS.TMP file as a temporary buffer file in your specified directory path when you re-edit a portion of the file during anyone SOS session. The "nnn" is a three-digit number that consists of your current TOPS-IO job number. When this temporary file is created, it replaces your original input source file in the directory. After a crash, this temporary buffer file for job number 26 will appear in the directory path as: • DIRECT ~ 026S0S TMP 360 (055) 20-MAY-78 DSKC: [27,5107J TOTAL OF 360 BLOCKS IN 1 FILES ON DSKC: [27,5107J This is its complete name format. If'it is empty, this file will not replace your original source file and will not appear in the directory because the system will delete it when restarting. The 026 refers to your job number at the time the crash occurred. You should always know your job number as there may be other nnnSOS.TMP files when other users are editing fil~s in the same directory path. When you exit from the SOS session in the usual manner, this file become the new edited source file, if it is the most complete. 10.1.4 may Using The nnnSOS.TEM And nnnSOS.TMP Files Suppose you want to edit the file TEST.FOR. Give the command: • SOS TEST. FOR ~ EDIT: TEST.FOR * SOS reads the contents of the source fil~ and copies it to memory. SOS allocates a portion of memory in which to perform its functions. (The portion of memory allocated to your SOS session is usually a memory buffer.) When you edit a portion of the file, it must be brought into that memory buffer before you can make any changes. After you make the changes, SOS has five work areas. 1. The current edits (kept in memory) 2. The nnnSOS.TEM buffer file (in the directory) 3. The nnnSOS.TMP buffer file (in the directory) 4. The source file (TEST.FOR in the directory) 5. The backup file (TEST.QOR in the 10-3 ~irectory) HOW SOS HANDLES PILES AND BUPPERS The Symbol => In the diagrams that follow, the symbol indicates SOS's position in the particular buffer or file. => SOURCE FILE . ... 1 ... ... 2 ... ... 3 ... 4 MEMORY BUFFER =>1-_... _ ... ~ ..~. ... The editing functions of inserting, deleting, and changing lines takes place automatically after the memory buffer is full. 10-4 BOW SOS BANDLES~FILES AND BUFFERS The first time you access a part of your file beyond the capacity of the memory buffer, SOS places the contents of the memory buffer in the nnnSOS.TEM file, then refills the memory buffer. SOURCE FILE *** 1 .TEM FILE (026S0S.TEM) MEMORY BUFFER *** :::>1 *** 2 *** ----------------~ *** 2 *** *** 3 *** *** 4 *** => 10-5 :> HOW SOS HANDLES FILES AND BUFFERS In the same manner, if ¥ou access lines past the capacity of the second memory, SOS coples the contents of the second memory buffer to the nnnSOS.TEM file and then refills the memory buffer again • SOURCE FILE MEMORY BUFFER *** 1 *** *** 2 *** *** 3 *** *** 4 *** .TEM FILE (026S0S.TEM) *** 2 10-6 HOW SOS HANDLES FILES AND BUFFERS Now, if you want to edit a line that was located in the buffer, SOS must do four things: 1. first memory Copy the rest of the sourcel file to the nnnSOS.TEM file • SOURCE FILE *** *** 2 =>L__ MEMORY BUFFER ~tVI 2 *** 3 4 .TEM FILE (026S0S.TEM) 3 4 *** ~ ~~----------~ 2. Close the source file (note that the source file has not been altered) • 10-7 HOW SOS HANDLES FILES AND BUFFERS 3. Rename the nnnSOS.TEM file to be a nnnSOS.TMP file, then it (instead of the source file) for input. 4. Create a new nnnSOS.TEM file that is initially empty • .TMP FILE (026505. TMP) *** 1 *** *** 2 *** *** 3 *** *** 4 *** MEMORY BUFFER use .TEM FILE (026505.TEM) (empty) When you exit from an SOS session, the SOS program will look at both the nnnSOS.TMP file and the nnnSOS.TEM file and determine which file is the more complete and up-to-date. If the nnnSOS.TMP file exists but there were no edits to it since its creation, the SOS program will use the nnnSOS.TMP file to create the new source file. If edits have been performed after the creation of the nnnSOS.TMP file, the SOS program creates the new source file using the nnnSOS.TEM file, deleting the nnnSOS.TMP file and saving disk space. 10-8 HOW SOS HANDLES FILES AND BUFFERS 10.2 WHAT HAPPENS TO YOUR FILES AFTER AN E, G, OR WCOMMARD? After an End, Go, or World command is given, SOS retains two copies of your file. They are: 1. the edited copy of the source file 2. the next most recent copy of the file file) (kept as the backup The edited copy of the source file becomes your output file from an SOS session. The file on disk that was the input to the SOS session becomes the backup file. Thus to review the whole process, if you give the command: • SOS NUMBER. TXT ~ EDIT: NUMBER.TXT * SOS makes a copy of this file in memory for the SOS session. When you save this file, SOS automatically renames the file NUMBER.TXT in the specified directory path to become your backup file and the edited NUMBER. TXT file in memory to become your updated file. The backup file has the same file specifications as your source file, but has a Q as the first letter of the file extension. Thus, the backup file associated with NUMBER. TXT is NUMBER.QXT. If the /OLD option is in effect, a backup file with a file extension beginning with the letter Z is created if it does not already exist. At the end of your SOS session, you give the End (or Go) command to save the file and end the SOS session. The same file operations happen, in that SOS renames the old source file to be the backup file, and then stores the current edits or input in a new source file. In actuality, SOS creates a temporary buffer file in the specified directory path, containing your input and edited source file, and then renames this temporary file as your new source file. (Refer to section 10.1 for a complete description of how the temporary buffer file(s) work during an SOS session.) Let's take the case where you are creating the file First, you give the SOS command, and then type a line • • SOS NUMBER.TXT~ INPUT: NUMBER. TXT 00100 00200 ONE GID f * 10-9 NUMBER.TXT. HOW SOS HANDLES FILES AND BUFFERS At this point, your file resides only in memory, not on your default directory path. SOS has created a temporary buffer file in the directory, but it is empty. CURRENT EDITS ONE MEMORY To make a copy of the file in the directory, give the World command. [DSKC:NUMBER.TXTJ * After you give the World command, SOS stores an image copy of the file input from memory into a temporary buffer file (invisible to you), renames this temporary buffer file to NUMBER.TXT, and then prints the name of the source file in the directory path on your terminal. This is the first permanent image of the source file. There is no backup file yet, but there is a duplicate copy of the file in memory and a new temporary buffer file is created for the next End, Go, or World command. CURRENT EDITS NUMBER.TXT ONE ONE MEMORY SOURCE FI LE Now insert a second line and press ESCape. *:2<)() C~ 0020()"~IU GJ~ 00300 $ t * 10-10 HOW SOS HANDLES FILES AND BUFFERS The input in memory contains tw.o lines, but the source contains only one line. CURRENT EDITS file on disk NUMBER.TXT ONE TWO ONE MEMORY SOURCE FILE When you now give the World command, SOS renames the source file on disk to be the backup file NUMBER.QXT, stores an image copy of the memory in the temporary buffer file, renames the temporary buffer file to NUMBER.TXT, and creates a new, empty, temporary buffer file. Last, SOS prints the name of the source file on your terminal. lDSKC:NUMBER.TXT[27,5107JJ * The contents of the files are as follows: CURRENT EDITS NUMBER.TXT ONE TWO ONE TWO SOURCE FILE MEMORY Now insert a third line and press ESCape. *I]()O G!D ()()~·SOo 004()() THF~EE $ G!D t * 10-11 NUMBER.QXT ONE BACKUP FILE HOW 50S HANDLES FILES AND BUFFERS In this stage, the current edits contain three lines, the source contains two lines, and the backup file contains one line. CURRENT EDITS NUMBER.TXT ONE TWO THREE NUMBER.QXT ONE TWO ONE TWO SOURCE FILE MEMORY file BACKUP FILE Now give an End command to save the file and end the SOS session. The End command causes 80S to automatically delete your NUMBER.QXT backup file, rename the input source file (NUMBER.TXT) as the new backup file (NUMBER.QXT), store the input from memory in the temporary buffer file, rename this temporary buffer file as your new source file (NUMBER.TXT) , and print the name of your source file on your terminal. Your backup file now contains two lines of input. Your source file now contains three lines of input. *E~ [DSKC: NUMBEF~. TXT[2"1, 510"1]:1 CURRENT EDITS ONE TWO THREE MEMORY NUMBER.TXT NUMBER.QXT ONE TWO THREE ONE TWO SOURCE FILE Every time you give an End, Go, or happens: BACKUP FILE World command the same process 1. The old backup file is deleted. 2. The input source file becomes the new backup file. 3. The temporary buffer file memory. 4. The temporary buffer file is renamed as the new source file. 5. The source file specification is printed on your terminal. retrieves 10-12 the inputs/edits from HOW SOS HANDLES FILES AND BUFFERS 10.2.1 Turning Off The Backup System - /NOBA! Option If you do not want the backup files, set the /NOBAK option in your SOS command at TOPS-IO command level, at SOS command level, or in your SWITCH.INI file. Then whenever you give an End, Go, or World command, SOS will update only the source file1 it will not create any backup file and if a backup file with a file extension of .Oxt already exists for the file you are editing, this file will be deleted automatically when you save your file if it has a protection code of less than <400>. 10.2.2 Keeping A Permanent Backup File - /OLD Option Each time you give an End, Go, or World command, SOS creates a new backup file with the file extension of .Oxt. You may keep this file as a permanent backup file by setting the /OLD option. Whenever you give an End, Go, or World command, SOS does not create the usual backup file with the .Oxt file extension1 instead it creates a file where the first letter of the extension is a Z. If, however, there is already a file with that file specification, SOS creates the normal .Oxt backup file (if not suppressed) and leaves the .Zxt file unchanged. Once a .Zxt file is created, SOS will not alter it. The only time SOS creates a .Zxt file is when one does not exist and the /OLD option has been set. For example, if you create a file TEST.FOR using the /OLD option, the first time you give an End, Go, or World command, SOS creates the source file TEST. FOR. After you give the second End, Go, or World command and before you create TEST.OOR, SOS checks to see if TEST.ZOR exists. Since it does not, SOS creates a TEST.ZOR file. The next time you issue an End, Go, or World command, SOS again checks to see if a TEST.ZOR file exists. Since this file does now exist, SOS does not create the .ZOR file, .but does create the .OOR file. The /OLD option feature allows you to retain a copy of the file as it exists before a series of SOS sessions. When you are satisfied with the editing jobs~ you can then delete the .Zxt file and let SOS create a new .Zxt file. 10-13 HOW SOS HANDLES PILES AND BUPPERS 10.3 RECOVERING PROM A SYSTEM CRASH Suppose you are creating a new file without having set the /ISAVE or /SAVE options and you have not given a World command since the session began, and the TOPS-IO system crashes. You will have lost all of the input. When the TOPS-IO system restarts, you may have to reenter the entire file again. However, you may find a nnnSOS.TEM or a nnnSOS.TMP file in your specified directory path after the system restarts. (Only rarely will you find both buffer files in your directory at the same time.) with either buffer file, you may be able to reconstruct a recent copy of your file by following the steps outlined below. 1. If neither buffer file exists, you will have to re-edit your source file again. You lost all edits back to the last backup. 2. If the nnnSOS.TEM file survived the crash and it contains edited text of your file, it may be somewhat incomplete. At the TOPS-IO command level, rename this file so that SOS can use the name again as the buffer file when you start the SOS session to ~econstruct your file. Using your original, unedited source file or backup file which was on disk and not lost by the system crash, and using the renamed buffer file, you can copy the missing lines needed to restore your file. 3. If just the nnnSOS.TMP file survived, it is because you have done an internal wrap around of the edited file. This buffer file will be complete, except for any edits done after the internal wrap around occurred. The wrap around in this case occurred when you re-edited a previously edited portion of your file during the same SOS session. At TOPS-IO command level, rename this file so that SOS can create another nnnSOS.TMP file, if necessary, when you start the SOS session to reconstruct your file. To restore the file to the point when the system crashed, you must reenter edits that occurred after the internal wrap around. 4. If the occasion occurs where the nnnSOS.TEM file and the nnnSOS.TMP file both exist in your specified directory path, the nnnSOS.TEM file may be incomplete. Thus, if both buffer files exist, rename each buffer file before starting the SOS session to reconstruct your file. Edit the renamed nnnSOS.TEM file, but this time copy the missing lines from the renamed nnnSOS~TMP file. The example on the next page assumes that you found after the system rE~start just the nnnSOS.TMP file. The example will show a very small amount of text, but, for the purpose of demonstration, it will assume that the file does exceed the allocated memory words for the SOS session. An nnnSOS.TEM file did exist before the system crash, but it was empty. When the system restarted, the nnnSOS.TEM file was deleted. 10-14 HOW SOS HANDLES FILES AND BUFFERS .SOS SAMPLE.TXTc::!!D EDIT: SAMPLE.TXT *P* GB 20000 THIS IS THE LAST LINE OF THE FILE *1. ~ 20100 ONE G£) 20200 TWO c::!!D 20300 THREE~ 20400 FOUR CEO 20500 FIVE G!:!) 20600 SIXGD $ 20700 t GD *Pl0~ NO SUCH LINE(S) *110 c::!!D 00010 THIS IS THE FIRST LINE OF TEXT.~ * The PIO and the 110 commands above have caused the internal wrap around and the creation of the nnnSOS.TMP file. At this point the nnnSOS.TEM file has become empty. In addition, the nnnSOS.TMP file has replaced the original source file SAMPLE.TXT in the specified directory path. The system crashes, and when it is operational again, it prints a message. You log on and request a directory listing. The 026S0S.TMP is the only file that survived the crash. This temporary file replaced your SAMPLE.TXT file. * TTY NOT CONNECTED RK3A4B KL10 SYSt1026 15:17:03 .LOGQ£) JOB 26 RK3A4B KL10 SYStl026 TTY233 t27,5107Q£) PASSWORD: ~ 1306 22-MAY-78 WED .[lIRECT ~ 026808 TMP 418 <055> 22-MAY-78 DSKC: [27,5107J TOTAL OF 418 BLOCKS IN 1 FILES ON DSKe: [27,5107] You now rename the temporary file 026S0S.TMP to be BUFFER.TXT • • RENAME BUFFER.TXT:;:;026S0S.TMF'~ FILES RENAMED: 026S0S.TMF' 10-15 . HOW SOS HANDLES FILES AND BUFFERS Now you start SOS to edit the file BUFFER.TXT and give Print to check what previous edits were lost by the system crash • commands • SOS BUFFER. TXT~ EDIT: BUFFER. TXT *f'20100 GTI) 20100 ONE *P GiD 20100 ONE 20200 TWO 20300 THREE 20400 FOUF~ 20500 FIVE 20600 SIX *f'10@) NO SUCH LINE(S) * You can now reenter line 00010 and end the SOS session file. to save your *I10GTI) 00010 THIS LINE IS F~EPLACE[I BECAUSE OF THE CRASH. G!!) *E~ [DSKC:BUFFER.TXT[27,5107]] At this point, you may continue to edit the BUFFER. TXT file specification or rename it to SAMPLE.TXT • file as this • RENAME SAMPLE. TXT;:::BUFFEF~. TXT~ FILES f~ENAME[I: BUFFER. TXT A few cautions about recovering files: 1. Always check the contents of the nnnSOS.TEM file, the nnnSOS.TMP file, and the source and backup files very carefully before you restore and· rename your edited source file. 2. In the above example, the line numbers happened to be the same. If you have inserted lines or deleted lines, then the line numbers may not match. Be careful to use the correct line numbers. 10-16 APPENDIX A SUMMARY OF SOS COMMANDS Table A-I Symbol Meaning .. First (line or page) . Current (line or page) * Last (line or page) Command: DEL or RUBOUT Function: Deletes one character from the current line being edited. Example: *R500 C§) 00500 THIS IS A SELETE\ETELES\IIELETE EXAMPLE.G!D *F'. C£) 00500 THIS IS A IIELETE EXAMPLE. * Command: CTRL/C Function: Stops SOS. You must type one of the following: to continue automatically to end edit and close file to quit and delete temporary files to return to monitor now R - to reenter at the entry point of your file in SOS and terminate last SOS command H - to get printout of possible responses C E Q M- Example: *CnRL/l) YES? (TYPE H FOR HELP): MG!D A-l SUMMARY 0, SOS COMMANDS Command: CTRL/G Function: Cancels the SOS command before you execute it. Example: *SCOMMAND$INSTRUCTION t ~ t ~(CTRl/(.) * Command: CTRL/R Function: Prints the current line without the line number. Example: *Rl00 GD 00100 THIS IS A CTRL/R EXAMPLE. . t THIS IS A CTRL/R EXAMPLE. t * Command: CTRL/U Function: During Input mode, erases the current line, allowing you to retype its contents. Example: *R100 ~ 00100 THIS IS A CTRL/U EXAMPLE.~U ~ TRlIl) THIS IS THE LINE. G!2) *F'.~ 00100 THIS IS THE LINE. * or Command: LF Function: Prints the next line in the file. Example: (Current position is line 400.) ~ 00500 THIS IS A LINEFEED EXAMPLE FOR APPENDIX A. LINEFEED * Command: ESCape Function: 1. Example: or ALT Prints the previous line in Edit mode. (Current position is line 200.) *GO 00100 THIS IS AN ESCAPE EXAMPLE, PRINTS PREVIOUS LINE. * Function: Example: 2. Ends Input mode •. *1400, 10 ~ 00410 THIS IS AN ESCAPE EXAMPLE~ ENDS INPUT MODE_, GD * A-2 SUMMARY OF SOS COMMANDS Command: .position Function: Moves the pointer to a specified position. Example: • SOS SAMPLE. TXT ~ EDIT: SAMF'LE.TXl (Move) * .*1* G!D *F'. ~ PAGE 10 79000 LAST LINE, LA~l PAGE. * Command: /option:value Function: Sets a specified settable. option takes one . Example: • SOS SAMPLE. TXT ~ EDIT: SAMPLE. TXT */DPY ~ (Set) option and its value if the */LOWER~ *=CASE ~ DISPLAY C64 LOWER * Command: =option Function: Prints the value of a printable option or, when used with the (Move) command, prints the line/page number of the pointer position. Example: • SOS SAMPLE. TXT ~ EDIT: SAMPLE.TXT *==CASE Q!Q (Give) C *::::.~ 00000/:L * Command: @filespec Function: Executes one or more SOS commands that contents of the command file "filespec" . Example: • TYPE 00100 (Indirect) S.CM[t~ STIPE~LTYPE~[ • • SOS SAMPLE. TXT ~ EDll: SAMPLE. TXT *P2020 ~ 02020 TIPE A NUMBER. *@S.CMD @:) 02020 TYPE A NUMBER. r. I ND 1F~ECT EOF * A-3 are the line SUMMARY OF SOS COMMANDS Command: Arange Function: Starts Alter mode, which allows you to edit a line retyping it. The following symbols are used in Alter and examples: mode without instructions Indicates the position of the pointer. Represents an integer omitted, defaults to 1. n number which, if both Indicates that the command forward and backward. may work c Indicates where character. type a chrs Indicates where you may type more character. you may single than one Instruction: nCchrs Function: Change n characters. Example: *F'~ 00100 THIS IA AN ALTER EXAMPLE. *Al00~ 00100 THIS IS AN ALTER EXAMPLE. t W t 2CIS~ * Instruction: -nD Function: Example: DeLete the next/last n characters. *F'100 @) 00100 THIS IS AN ALTER EXAMPLE. *Al00 @) 00100 THIS \\IS AN\\ ALTER EXAMPLE. _.. t t W 5D~ * Instruction: E Function: Finish Alter mode for the current line without printing the rest of the line. A-4 SUMMARY OF SOS COMMANDS Example: *Pl00·<JI6 00100 THIS IS AN ALTER EXAMPLE. *A. G!D 00100 THIS IS - - 2W E t t * Instruction: nIchrs~ Function: Insert characters into the current line. <ESC> ends the insertion; <LF> creates a new line using n as an increment. Example: *Pl00 G!D 00100 THIS ALTER EXAMPLE. *Al00~ 00100 THIS IS AN ALTER EXAMPLE. * Instruction: J Function: Place the rest of the current beginning of the next line. Example: *Pl00:200 G!D 00100 THIS IS AN ALTER EXAMPLE. 00200 *A. G!D 00100 THIS IS AN at the Function: Delete to the nth next/previous occurrence c. of Example: *Pl00 00100 THIS IS AN ALTER EXAMPLE. *A. G!D 0010P \\THIS IS AN \\ALTER EXAMPLE. 00200 t t 3W J line ALTER EXAMPLE. t * ~ Instruction: -nRc - t t 2KA *P. G!D 00100 ALTER EXAMPLE. * A-5 SUMMARY OF SOS COMMANDS Instruction: L Function: Print the rest of the current line and to the beginning of the current line. Example: *Pl00 GIQ 00100 THIS IS AN ALTER EXAMPLE. *A.~ 00100 return THIS IS AN ALTER EXAMPLE. t W t L 00100 t E * Instruction: P Function: Print the rest of the current line and the beginning of the current line to the current position. Example: *Pl00 G.ID 00100 THIS IS AN AL..TEH EXAMPLE. *A. ~ THIS IS AN ALTEF~ EXAMPLE. 00100 t W 00100 t P THIS t E * Instruction: Q Function: Quit Alter mode and restore the original contents. Example: *Pl00 ~ 00100 THIS IS AN ALTER EXAMPLE. *A. ~ 00100 \\THIS\\THE \\IS AN \\ t *P. ~ 00100 XTHE~ t t 2KA Q THIS IS AN ALTER EXAMPLE. * A-6 line SUMMARY OF SOS COMMANDS Instruction: -nRchrs~ Function: Delete the next/last n characters enter characters to the line. Example: and then *Pl00~ 00100 THIS IS AN ALTER EXAMPLE. *A. CE:D 00100 \\THIS IS AN\\THE ALTER EXAMPLE. - - t 10RTHE~ t G!D *P. ~ 00100 THE ALTER EXAMPLE. * Instruction: -nSc Function: Example: Search for the nth next/previous occurrence of character c. *Pl00~ 00100 THIS IC'. AN ALTER EXAMPLE. *A. G!D THIS IS AN ALTER EXAMPLE\.ELPMAXE 00100 _. .) t SA t t ..-2SE S. t E * Instruction: nW Function: Skip forward n words. Example: *Pl00 G£) 00100 THIS IS AN ALTER EXAMPLE. *A.@) 00100 THIS IS AN ALTE~: EXAMPLE. --- t w t t t w w w t t w W~ * Instruction: Xchrs~ Function: Delete the current word characters to the line. Example: *Pl00 G£) 00100 THIS IS AN ALTER EXAMPLE. *A. ~ 00100 THIS IS AN \\ALTER \\SOS EXAMPLE. and t 2SA *P. G£) 00100 THIS IS AN SOS EXAMPLE. * A-7 then enter SUMMARY OF SOS COMMANDS Instruction: -n~ Function: Space (skip) forward n characters. Example: *P100 G!D 00100 THIS IS ~N ALTER EXAMPLE. *A. ~ 00100 THIS IS AN ALTER EXAMPLE. '- t 9GQ t C§) * Instruction: n ~ or n ~UIIOU~ Function: Backspace n characters, but with no deletion. Example: *F'100 G!D 00100 THIS IS AN ALTER EXAMPLE. *A. GIG 00100 nus IS AN ALTER \ F<ETLA\AL TER EXAMPLE. t w .. - t t w w W f .- t 6~ t ~ *F'. ~ 00100 THIS IS AN ALTER EXAMPLE. * Instruction: ~ Function: Example: Print the rest of the line and return command level. to *Pl00~ 00100 , THIS IS AN ALTER EXAMPLE. 00100 THIS IS AN ALTER EXAMPLE. *.A.~ t GQ * Instruction: -~ Function: Skip to the end/start of the current line. Example: *f'100 ~ 00100 THIS IS AN ALTER EXAMPLE. *A. ~ 00100 THIS 18 AN ALTER EXAMPLE. t G£) \.ELPMAXE RETLA NA 81 SIHT\ 00100 .- t E * A-8 - t --G£) SOS SUMMARY or sos COMMANDS Instruction: ~~lI0 Function: Restore the original line and remain at command 1 eve 1 •. ' . Exampl.e: *P100 GiQ 00100 THIS IS AN ALTER EXAMPLE. *A. GD 00100 \\THIS IS AN\\THE t 10RTHE~ 00100 Alter t «TRL/U) THIS IS AN ALTER EXAMPLE. - t @D * Command: Cposi tion,:range, f irst-page-inc, last-page-inc Function: Copies a range of~ine$ so that the first line being copied starts at or immediately after the position specified. first-page-inc,last-page-inc Specify the line-number increment for the page and/or the last page being copied. Example: first • SOS SAMPLE. TXT G!D EDIT: SAMPLE.TXT *F'800 ~ 00800 THIS IS A COPY EXAMPLE. *C200, 800 G!D INC1=00020 * 00220 .- THIS IS A COPY EXAMPLE. * Command: Cposition=fllespec,range Function: Copies the range from the filespec named to position in your file. Example: • TYPE NUMBEF~. TXT G!D 00100 ONE 00200 TWO 00300 THF~EE • SOS SAMPLE + TXT GiQ EVIT: SAMPLE.TXT C1 O()O::::NUMH[r~ + TXT, :I. 00: ~300 GI0 INC1=00()20 *F'1020! 3 G!D 01020 ONE 01040 TWO 01060 THREE * * A-9 the specified SUMMARY OF SOS COMMANDS Command: Cposition=filespec/S Function: Lets you search the fil.espec named, then specify the range to copy to the position in your file. SOS prompts with C*. You give Find and Print commands, then type E to give the range, or EQ to abort. Example: • SOS SAMPLE. TXT ~ EDIT: SAMPLE. TXT * Cl000==NUMBER. TXT/S ~ C*Pl00:300 ~ 00100 ONE 00200 TWO 00:'500 THREE C*E G:Q SOURCE LINES:::: 100: :300 ~ INC 1 ::::00020 * Command: Orange Function: Deletes a range of line(s) • Example: • SOS SAHPLE.TXTCRu~ EDIT: SAMPLE. TXT *D900: 1200 ~ 4 LINES (00900/1:01200) DELETED * Command: Eoption:filespec Function: Ends the SOS session, saves the file, and TOPS-IO command level. returns you to option B D Q S Suppresses the .Qxt and .Zxt file Deletes both the input and output Ends SOS and restore the original Removes the line numbers from the :filespec Output file specification Example: • 50S 5AMPLE. TXT G:Q EDIT: SAMPLE. TXT *ES GID [DSKC:SAMPLE.TXT[27,5107]] A-lO creation. file. file. file. SUMMARY OF SOS COMMANDS Command: Fstring<ESC)range,option,number Function: Prints the first line located in the the string of characters. range that contains Specifies the range of line/page searched by the Find command. numbers range option A N E Enters Alter mode for each line where string is found. Prints only. the line number where string is found. Requires exact match an uppercase/lowercase characters. the the of number Specifies the number of Find command. Example: lines searched by the .80S SAMPLE. TXT 00 E[lIT: SAMPLE. TXT *FTHIS IS °A FIND EXAMPLE."': GIG t 12505 * GD THIS IS A FIND EXAMPLE. * Command: Goption:filespec Function: Saves the file, ends SOS, and either executes the last Compile-class command or executes a program as specified by the /RUN option. option B D Q S Does Does Does Does an an an an EB command ED command EQ command ES command and and and and then then then then :filespec Output file specification Example: .808 SAMPLE.TXT~ EDIT: SAMPLE. TXT *GS: NUMBER. FOR C!!D [[lSKC:NUMBER.FORJ LINK: LOADING CLNKXCT NUMBER EXECUTION] PLEASE TYPE A NUMBER. 100~ YOU TYPED THE NUMBER 100.0000000 TWICE 100.0000000 IS 200.0000000 END OF EXECUTION CPU TIME: 0.14 ELAPSED TIME: 7.00 EXIT A-II a a a a Go. Go. Go. Go. SUMMARY OF SOS COMMANDS Command: B Function: Prints a text file showing options, and hints, with command and option. Example: a summary of SOS commands, one-line descriptions of each • SOS SAMPLE. TXT@) EDIT: SAMPLE.TXT *H Cili) ( SOS ~rints five pa~es of text. ) * Command: Iposition,increment Function: Inserts new lines at the specified position which can be at the beginning or ending of the file, or between existing lines. increment Specifies a line-number increment for insertion of lines following the position being inserted • Example: • SOS SAMPLE. TXT G£) EDIT: SAMPLE.TXT *I100;10 ~ 00110 00120 THIS IS AN INSERT EXAMPLE. ~ $ t G) * Command: Jposition Function: Appends the next line in the file to position, thereby joining the two. Example: ~ SOS SAMPLE. TXT GD EDIT: SAMPLE. TXT *Pl00!2 GD 00100 00200 JOIN THIS LINE. *J100~ *P100 ~ 00100 JOIN THIS LINE. * A-12 the specified line SUMMARY OF SOS COMMANDS Command: Jcrange Function: The Justification command is an optional SOS command and must be assembled for your installation of SOS. It justifies, according to c, all text within the range specified. One of the following must be the value of c when you the J command: Example: issue C Justifies each line in the center the left and right margins. between L Justifies each line to the left margin. R Justifies each line to the right margin. U Justifies and fills each line to span the left margin to the right margin. W Justifies to the left margin and fills with words to the right margin. from f'SOS SAMPLE. TXT GI0 EDIT: SAHPLE.TXT tf' GIQ 00100 00200 00300 LINE ONE. LINE TWO. LINE THREE. *JW 1 O() : 3()O @) *F'lOO GID 00100 LINE ONE. LINE TWO. LINE THREE. * Command: K/page-number Function: Deletes the page mark /page-number • Example: • 80S SAMPLE. TXT GIQ EOIT: SAM.f.'L·E. TXT within *P/l : 12 GIQ PAGE 1 00100 THIS IS PAGE ONE. PAGE 2 00200 THIS IS PAGE TWO. 00100 THIS IS PAGE ONE. TH-lS IS PAGE TWO. *K/2~ *P/:J. @) "O~O.200 '* A-I] the file as specified by SUMMARY OF SOS COMMANDS Command: Lrange,S Function: Lists a specified range of lines on the line printer. If range is not specified, the entire file is printed. The ,5, if used, suppresses the printing of the line numbers and page headings. Example: • SOS SAMPLE. TXT ~ ElIIT: SAMF'LE.TXT *L/1,S Gil) * Command: Mposition Function: Marks the specified position as page • Example: • SOS SAMPl.E. TXT ~ EDIT: SAMPL.E.TXT the beginning of a new *F' @) 00100 00200 THIS IS PAGE ONE. THIS IS PAGE TWO. 00200 THIS IS PAGE TWO. *M200 ~~ *P/2 G8 PAGE 2 * Command: Noption,increment,range,starting-number Function: Renumbers the line numbers in the range by a specified increment. If the increment is not specified, the default is 100. option A P Adds increment to line numbers in range. Preserves line numbers in one sequence the whole file over page marks. increment Any integer from 1 to 99999. range The range of line numbers to be renumbered. start The starting number for the first line • Example: • SOS SAMF'L..E. TX'r Cii2) EDIT: SAMF'L.E.TX"T *F' GO O()100 00200 00:300 LINE ONE. LINE TWO. LINE THf~EE. * l!'j *00015 P"':* ~~ LINE ONE. N1:::j~/l, 00030 00045 ~ LINE TWO. LINE THREE, * A-14 the for SUMMARY OF sgs COMMANDS Command: Prange,S Function: Prints the contents of a specified range. If the range is omitted, the /PLINES option value (default is 16) is used for the number of lines to be printed. The ,S, if used, suppresses the printing of -the line numbers. Example: .SOS SAMPLE. TXT ~ EPIT: SAMPLE. TXT *p,S ~ LINE ONE. LINE TWO. LINE THREE. * Command: Rrange,increment Function: Replaces the number (s) • contents of a specified range of line increment Specifies a line-number increment for insertion of lines following the range being replaced • Example: • SOS SAMPLE.TXTGB EDIT: SAMPLE. TXT *Rl00;10~ 00100 00110 THIS IS A R EXAMF'LE.~ $ t GD 1 LINES (00100/1) DELETED * Command: Sstring<ESC)new-string<ESC)range,option,number Function: Substitutes a new-string of lines. specified string of characters with a characters throughout a specified range of option D N E Lets you decide on each substitution. Suppresses all printing of substitutions. Requires an exact match uppercase/lowercase characters. the of number Specifies the maximum number of lines to the substitutions. Example: .SOS SAMPLE. TXT QIQ EDIT: SAMPLE. TXT *SLINEfTEXTr': * GB GD GD 00100 00200 00300 TEXT ONE. TEXT TWO. TEXT THREE. * A-IS perform SUMMARY or sos COMMANDS Command: Tdestination,source-range,first-page-inc,last-page-inc Function: Transfers the source-range of lines to or after a specified destination and deletes the source-range from the file. first-page-inc,last-page-inc Specify the line-number increment for the page and the last page being transferred • Example: first • SOS SAHPLE. TXT G!!) EDIT: SAMPLE.TXT *P GE) 00100 LINE ONE. 00200 LINE TWO. 00300 LINE THREE. *INC1=00100 T400. 100 0iD *.p .... :* ~ 00200 00300 00400 LINE TWO. LINE THREE. LINE ONE. * Command: Vcrange Function: The Inversion command is an optional SOS command be assembled for your installation of SOS. Inverts, according specified. Example: to c, all text within and must the range One of the following must be the value of c when you a V command: issue L Inverts all lowercase. upperc~s~. characters to u Inverts all uppercase. lowercase characters to V Inverts all uppercase characters to lowercase and all lowercase to uppercase simultaneously • • sos SAHPLE.TXT~ EDI r: SAMPLE. TX·, *f'1200 GIQ 01200 this line is all lowercase. *UU1200 C!i!.) *". Ci!!) THIS LINE IS ALL LOWERCASE. 01200 * A-16 SUMMARY OF SOS COMMANDS Command: Woption:filespec Function: Backs up your file and (Save-the-Wor ld Comma-nd). option B D 0 S : filespec returns to SOS command level Does an EB command without ending SOS. Does an ED command' without ending SOS. Does an EO command without ending SOS. Does an ES command without ending sos. Output file specification Example: SOS SAMPLE.TXTC!!!) EraIT: SAMPLE. TXT *1250 00250 THIS IS A W EXAMF'LE.~ *WG!!) [DSKC:SAMPLE.TXT[27,5107JJ * Command: Xrange,S Function: Allows you to extend a specified range of line(s) by inserting text at the end of each line. ,S Suppresses the printing of the line eontents that will be extended. Example: • SOS SAMPLE. TXT ~ EraIT: SAMPLE. TXT *f'100 G!D 00100 LINE ONE *x., s 0.!D 00100 .- PAGE ONE. ~ *F'. GID 00100 LINE ONE - PAGE ONE. * A-l1 SUMMARY OF SOS COMMANDS A-I8 APPENDIX B SUMMARY OF SOS OPTIONS Table B-1 lists each SOS option and, if appropriate, the command necessary to set the option and print its value. Each name can be abbreviated to the letters that distinguish it from any other option name. For instance, you must use /NODEL to uniquely identify /NODELETE while only /Cl is required for /C128. B-1 SUMMARY OP· SOS OPTIONS Ta.ble 8-1 Summary of SOS Options Name Set • (Period) BAK /BAK BASIC /BASIC BIG Print Function Default -. None Print current in your file. =BAK On Create backup file (Qxt) with End, Go, or World command - reverse with NOBAK. Off Set to edit a program created by BASIC. =BIG None Print largest page number in your file. position C64 /C64 =CASE . On Declare set C128. C128 /C128 =CASE Off Declare 128-character set - reverse with C64. =CASE None Print state of C128, C64, DPY, M33, M37, LOWER, UPPER, SEPARATORS, NONSEPARATORS. CASE 64-character reverse with DECIDE /DECIDE =DECIDE Off Use Decide mode in Substitute commands reverse with NODECIDE. DELETE /DELETE =DELETE Off Delete both input and output files with End, Go, or World command reverse with NODELETE. =DISK None Print quota. =CASE Off Set VT05 terminal characteristics. =ERROR None Print full text of last error message. Off Set the Expert mode reverse with /NOVICE. DISK DPY /DPY ERROR current disk EXPERT /EXPERT INCREMENT /INC:n =INC 100 Set line increment to n. ISAVE /ISAVE:n =ISAVE o Give Auto-Save after inserts. B-2 number n SUMMARY or SOS OPTIONS Table 8-1 (Cont.) Summary of SOS Options Print Name Set LENGTH ILENGTH:n =LENGTH LMAR ILMAR:n LOCATION Default Function 55 Set length of printed page output to n. =LMAR I Set left margin of printed output to n. =LOC None Print location of first line in SOS buffer. LOWER ILOWER =CASE Off Set for lowercase character input reverse with /UPPER. M33 IM33 =CASE On Set characteristics uppercase-only terminals. M37 IM37 =CASE Off Set terminal for both uppercase and lowercase input. MAXLN IMAXLN:n =MAXLN 99999 Set maximum number of lines per page to n. NAME INAME =NAME Input Set name of output file specification. NOBAK INOBAK =BAK Off Do not create backup file on End, Go, or World command - reverse with BAK. NODECIDE /NODEC =DECIDE On Do not use Decide mode in substitute commands - reverse with DECIDE. NODELETE INODELETE =DELETE On Do not delete input/output files reverse with DELETE. On Consider %, &, and. as alphanumerics - reverse with SEPARATORS. NONSEPARATOR /NONSEP =CASE normal for NONUMBER /NONUMBER Off Suppress printing of line numbers - reverse with NUMBER. NOVICE /NOVICE On Set normal operation reverse with EXPERT. NUMBER /NUMBER On Set line numbers to print reverse with NONUMBER. B-3 SUMMARY or sos OPTIONS Table 8-1 (Cont.) Summary of SOS Options Name Set OLD /OLD Off Create .Zxt backup file on End, Go, or World commands. OPTION /OPTION:name None Set the options in your SWITCH.INI file identified by name. PLINES /PLINES:n =PLINES 16 Set n lines to be printed by the Print command. PMAR /PMAR:n 1 Set the first position of the paragraph margin for printed output. RE:ADONLY /READONtY Off Declare file can only be read; no editing can be done. RMAR /RMAR:n 69 Set right margin of printed output to n. RUN /RUN:file =RUN SAVE /SAVE:n -SAVE a Give Auto-Save after SOS edit commands. SEPARATORS /SEP =CASE Off Consider %, &, and. as non-alphanumerics reverse with NONSEPARATORS. SEQUENCE /SEQ =SEQ On Include line numbers in .output file with End, Go, or World command reverse with UNSEQUENCE. START /START:n =START 100 Set starting number to n. STEP /STEP:n =STEP 100 Set start and increment of line numbers to n. =STRING None Print last string used in Find and Substitute commands or in line contents specification. STRING Print =PMAR =RMAR Default SYS:COMPIL 8-4 Function Declare program to be run after a Go command. n line SUMMARY OF SOS OPTIONS Table B-1 (Cont.) Summary of SOS Options Name Set Print Default UNSEQUENCE /UNSEQ =SEQ Off numbers Remove line from output file with End, Go, or World command - reverse with SEQUENCE. UPPER /UPPER =CASE On uppercase Declare input character reverse with LOWER. Function NOTE The LENGTH, LMAR, MAXLN, PMAR, and RMAR options will be effective only when the Justification command has been assembled for your installation of SOS. B-5 SUMMARY or sos OPTIONS 8-6 APPENDIX C SOS CHARACTER TABLE Table C-l describes each character recognized' by SOS. has: 1. An ANSI name 2. An ASCII octal code Each character Some characters also have: 3. A control character representation 4. A C128 representation For example, SOH (Start of Heading) has: 1. An ASCII octal code of 001 2. A control character representation of AA 3. A C128 representation of '! The 64-character set is composed of the characters 040 (space) through 137 (underline); the C128-character set is composed of all the characters in Table C-l. Table C-2 describes the ANSI character names for the the 00 line through the 03 line in Table C-l. C-l (b) lines from SOS CHARACTER TABLE Table C-I SOS Character Set 0 00 01 02 04 2 3 4 5 7 6 - - - - - - - "@ "A SOH "B STX "c ETX "'E ENO "'F ACK "G BEL ' & '\ S1 NUL ,1 '" ,# "D EOT '$ "'K VT "'L FF "M CR "'N SO "s DC3 ,. "T DC4 "u ,.v ,* "w SYN '1 ETB '2 "H BS "I "J ,( HT LF "p "0 DLE '+ DCI , "R DC2 "x 03 I - , '- "z ,% ,) "'0 (a) (b) (c) (a) (b) (c) (a) (b) (c) 'I NAK '0 .. [ "\ .. ] ..... " FS GS '< '> RS '7 US '8 (a) (b) (c) % & , ,, (b) (c) CAN '9 "Y EM '6 SUB '4 ESC Space 1 " # $ '= 05 ( ) * + , - . I (b) 06 0 I 2 3 4 5 6 7 (b) 07 8 9 : ., < = > ? (b) 10 @ A B C D E F G (b) 11 H I J K L M N 0 (b) 12 p 0 R S T U V (b) 13 X Y Z [ \ ] .. W , a b c d e f 9 (b) (c) 14 '@ (b) 15 h i j k I m n 0 (b) 16 P q r s t u v w (b) 17 x y z ,[ I } '] ,3 - DEL { ,: (a) - Control-character representation (b) - ANSI Character name - see Table C-2 (c) - C128 representation C-2 ', (b) (c) SOS CHARACTER TABLE Table C-2 ANSI Character Names ANSI Name Description ---- ------------ ACK BEL BS CAN CR DCI DC2 DC3 DC4 DEL OLE EM ENQ EOT ESC ETB Acknowledge Bell Backspace Cancel Carriage Return Device Control I Device Control 2 Device Control 3 Device Control 4 Delete Data Link Escape End of Medium Enquiry End of Transmission Escape End of Transmission Block C-3 ANSI Name ---- Description ETX FF FS GS HT LF NAK NUL .RS SI SO SOH STX SUB SYN US VT End of Text Formfeed File Separator Group Separator Horizontal Tab Line Feed Negative Acknowledge Null Record Separator Shift In Shift Out Start of Heading Start of Text Substitute Synchronous Idle Unit Separator Vertical Tab ------------ SOS CHARACTBR TABLB C-4 A'PPENDIX 0 TOPS-lO STANDARD FILE EXTENSIONS Table D~l lists the file exte·nsions that have a specific meaning to the TOPS-lO system. When you creat~ a file for use with a particular program, yO.Ui sh·ould assign the correct file extension. If you do, the TOPS-lO sys.ttem·, has more information about the file and can attempt to perform the correct function after you type a minimum set of commands or switches. Normally, no penalty arises from assigning an undefined file extension, but if you assign an incorrect file extension, the TOPS-lO system may incorrectly interpret the file, especially when you use the COMPILE-class commands. Table- D-l Standard File Extensions File Extension Kind of File Meaning AlO ASCII ASCII version of a TOPS-lO program loaded by the PDP-II All ASCII ASCII version of a PDP-II program loaded by the PDP-II ABS Binary· Absolute (nonrelocatable) object program ASCII Source file in AID language ALG: ASCII Source file language ALP ASCII Printer forms alignment ATR Binary Attribute language file AWT,· Binary Data for tester automatic BlO ASCII; Source file in BLISS Bll ASCiI Source file in BLISS-II D-l ALGOL in in SIMULA wire TOPS-IO STANDARD FILE EXTENSIONS Table D-l (Cont.) Standard File Extensions File Extension Kind of File Meaning BAC Binary Output from BASIC compiler BAK ASCII Backup LINED file from BAS ASCII Source file language in BCM ASCII Listing file created FILCOM (binary compare) BCP ASCII Source file in BCPL language BIN Binary Binary file BLB ASCII Blurb file BLI ASCII Source file language BOX ASCII Output of box program picture for use in specifications and manuals BUG Binary Saved error BWR ASCII Beware file listing warnings about a file or program CAL Binary CAL data and program files CBL ASCII Source file language CCL ASCII Alternate convention command file for CCO ASCII Listing of modifications nonresident software to COP ASCII, Binary Spooled punch CEO ASCII Input to COPYEO ATO ASCII OPSER automatic command file CFC ASCII Compressed file compare. Group of .SCM files combined with PIP. CHN Binary CHAIN file 0-2 to show output TECO BASIC by BLISS in a or program in for COBOL card TOPS-IO STANDARD FILE EXTENSIONS Table 0-1 (Cont.) Standard File Extensions File Extension Kind of File Meaning CKP Binary Checkpoint core image file created by COBOL object-time system CMD ASCII Command file CMP ASCII Complaint file by GRIPE COR ASCII Correction file for SOUP CRF ASCII CRF (cross-reference) file CTL ASCII Batch control file DAE Binary DAEMON-taken core dump file DAT ASCII, Binary Data (FORTRAN) file DCT ASCII Dictionary of words DDT ASCII Input file to FILDDT DIR ASCII Directory listing DIRECT command DMP ASCII COBOL compiler dump file DOC ASCII Listing of modifications to the most recent version of the software DRW Binary Drawing system DSE ASCII Directory extension DSF ASCII Directory sorted by filename ERR ASCII Error message file EXE Binary Executable program (created by SAVE or SSAVE command) F4 ASCII Source file in F40 (FORTRAN) language D-3 for input from VBlOC drawing sorted by TOPS-lO STANDARD FILBBXTBNS'I.ORS Table D-l (Cont.) Standard File Extensions File Extension Kind of File Meaning FAI ASCII Source file in FAIL language FCL ASCII Source file language FFS ASCII Fast FORTRAN stream FLO ASCII English-language flowchart FOR ASCII Source f i;le language in FRM ASCII Blank ,form records handwr i tten FTP ASCII FORTRAN test programs FUD ASCII FUDGE2 listing output GND ASCII List of ground pins automatic wirewrap HGH Binary Nonsharable high seqment of a two-segment program (created by OSAVE command) HLP ASCII Help files containing switch explanations and so forth IDA Binary COBOL ISAM data file lOX Binary Index file of a file INI ASCII, Binary Initialization file LAP ASCII Output from compiler LIB ASCII COBOL source library LOG ASCII Batch, OPSER, file LOW Binary Low segment of a two-segment program (created by OSAVE or OSSAVE command) LPT ASCII Spooled printer output for line LSD ASCII Listing program output from DUMP 0-4 FOCAL in for FORTRAN COBOL the or LINK for ISAM LISP log TOPS-IO STANDARD FILE EXTENSIONS Table D-l (Cont.) Standard File Extensions File Extension Kind of File Meaning LSP ASCII Source file in some LISPs LST ASCII Listing data created assemblers and compilers MAC ASCII Source file language MAN ASCII Manual (documentation) file MAP ASCII LINK map file MEM ASCII Memorandum file MIC ASCII MIC control file MID ASCII Source file in MIDAS Assembler) language MIM Binary Snapshot of MIMIC simulator MSB Binary Music compiler binary output MUS ASCII Music compiler input N ASCII Source file language NEW All New version of a program file OBJ Binary PDP-II file OLD ALL Old version of a program file aPR ASCII Installation instructions OVR Binary COBOL overlay file OVL Binary LINK overlay file PII ASCII Source program language PAK ASCII Files compressed by PACK.TEC to save disk space PAL ASCII Source file in PALlO assembler) D-5 MACRO in in relocatable and by (MIT NELIAC or binary or assembly in MACYII (PDP-8 TOPS-IO STANDARD FILE EXTENSIONS Table D-l (Cont.) Standard File Extensions File Extension Kind of File Meaning PCO ASCII Program change order PLI ASCII Source file in PL/l language PLM ASCII Program Binary output PLT ASCII Spooled output for plotter PPL ASCII Source file in PPL language PTP ASCII, Binary Spooled output paper-tape punch Qxt ASCII SOS backup file QUD ASCII, Binary Queued data file QUE Binary Queue request file QUF Binary Master file RAM ASCII TOPS-IO microcode REL Binary Relocatable binary file RIM Binary RIM loader file RMT Binary Read-in mode file (PIP) RNB ASCII RUNOFF input for producing a .BLB file RNC ASCII RUNOFF input for producing a .CCO file RND ASCII RUNOFF input for producing a .DOC file RNE ASCII RUNOFF input for producing an .ERR error-message text file RNH ASCII RUNOFF input for producing a .HLP file RNL ASCII RUNOFF input for producing a .PLM file RNM ASCII RUNOFF input for producing a .MAN file D-6 logic manual Compressed queue and (RIM) PLO plot for request format TOPS-10 STANDARD FILE EXTENSIONS Table D-1 (Cont.) Standard File &xtensions File Extension Kind of File Meaning RNO ASCII RUNOFF input for producing a .MEM file RNP ASCII RUNOFF input an .OPR file RNS ASCII RUNOFF input for producing a .STD file RSP ASCII SCRIPT file RSX All Files for RSX-II RTB Binary Read-in mode (RIMIOB) file (PIP) SAl ASCII Source file in SAIL language SAY Binary Low segment from a one-segment program (created by OSAVE command) SCD ASCII Differences in directory SCM ASCII Listing file created FILCOM (source compare) SCP ASCII SCRIPT control file SEQ ASCII, SIXBIT Sequential COBOL data input to ISAM program SFD Binary Subfile directory usage) SHR Binary Sharable high-segment file of a two-segment program (created by OSSAVE command) 81M ASCII Source file language in SIMULA 8MP ASCII Source file language in SIMPLE SNO ASCII Source file language in SNOBOL SNP ASCII Snapshot of disk by DSKLST for response producing log time format by file, (reserved ~"-.----------------------------------------------------------------------~ D-7 TOPS-IO STANDARD FILE EXTENSIONS Table D-l (Cont.) Standard File Extensions File Extension Kind of File Meaning SPC ASCII Functional or design specification document SPD ASCII Dictionary for SPELL program SPM ASCII File of misspelled words for SPELL program SPT ASCII SPRINT-created files SPU ASCII File of uppercase words SPELL program SPX ASCII File of exception (error) lines for SPELL program SRC ASCII Source files STD ASCII Standards SVE Binary .SAVed file from user monitor SYM Binary LINK symbol file SYS Binary Special system files TEC ASCII TECO macro TEM ASCII, Binary Temporary files TMP ASCII, Binary Temporary files TPB ASCII Typeset input for a .BLB file producing TPC ASCII Typeset input for a .ceo file producing TPD ASCII Typeset input for a .DOC file producing TPE ASCII Typeset input for producing error message text TPH ASCII Typeset input for a .HLP file D-8 a for single producing TOPS-lO STANDARD FILE EXTENSIONS Table D-l (Cont.) Standard File Extensions File Extension Kind of File Meaning TPL ASCII Typeset input for a logic manual producing TPM ASCII Typeset input for a .MAN file producing TPO ASCII Typeset input for producing a programming specification TPP ASCII Typeset input for an .OPR file TST All Test data TXT ASCII Text file UFO Binary User file (reserved usage) directory UPO ASCII Updates flagged (FILCOM) in VMX Binary Expanded save file starting at a location greater than zero and used as a special support program for virtual memory WCH ASCII SCRIPT monitor (WATCH) WRL ASCII Wirelist XOR Binary Module data for XOR tester XPN Binary Expanded save and LINK-IO) Zxt ASCII SOS original file 0-9 producing file margin file (FILEX TOPS-lO STANDARD FILE EXTENSION D-IO APPENDIX E SOS ERROR MESSAGES In the course of using SOS, you will probably encounter some error messages. An error message preceded by a question mark (1) indicates a fatal error. The fatal error may stop SOS without saving your file or it may continue with the SOS program using other options or commands then the one that caused the error. If you lose your file or edits because of a fatal error, you may recover using your most recent backup version of your file. An error message preceded by a percent sign (%) indicates a warning or information message. with the warning message, you may take the recommended corrective action and then reissue the command, or you may bypass the message as information given due to an edit to your file. E-l SOS ERROR MESSAGES Novice: ?BAD ·BASIC· FILE FORMAT Expe ,r t : ?BBF Explanation: When you attempted to edit a BASIC program file, SOS found no BASIC line numbers in the input file or double sets of line numbers. The SOS program terminates immediately. solution: Start SOS, but do not specify the BASIC option. Edit the BASIC file to fix the format or rec~eate the BASIC program file. Novice: ?DEVICE INPUT ERROR Expert: ?DIE Explanation: This message may be due to a hardware error or malfunction, or possibly a monitor error. The SOS program terminates immediately. Solution: Contact the operator to try to solve the problem if this message recurs. You may have to restore your file(s) from a recent backup. Novice: ?DEVICE NOT AVAILABLE Expert: ?DNA Explanation: You have issued a List command from SOS, but there is no line printer available. With this message you may get a Continued by Operator message, because the List command attempts to print on any available printer. Solution: If there is no line printer available, issue the TOPS-lO command ASSIGN DSK LPT or SET SPOOL LPT before you start the SOS session. with the ASSIGN DSK LPT command, the List command will create a .LPT file in your directory to be printed later. With the SET SPOOL LPT command, the List command will spool your output and print it when a line printer becomes available. Novice: ?DEVICE OUTPUT ERROR Expert: ?DDE Explanation: This error may be a hardware error or malfunction, or possibly a monitor error. The SOS program terminates immediately. Solution: Contact the operator to try to solve the problem if this message recurs. You may have to restore your file(s) from a recent backup. E-2 SOS ERROR MESSAGES Novice: ?FILE WRITE PROTECTED, TRY ANOTHER NAME Expert: ?FILE WRITE PROTECTED, TRY ANOTHER NAME Explanation: This error occurs when you attempt to save your file with a new file specification which already exists and is write-protected. SOS will prompt you with the word FILE:. solution: Specify a new filename and file extension that does not exist, or issue the TOPS-lO command RENAME to reset the protection code to less than 400. Novice: ?ILLEGAL UUO Expert: ?ILUUO Explanation: This is an internal SOS error. Your edits will be lost on this fatal error and the SOS program will terminate immediately. Solution: Contact the operator to try to restore your file or use the backup file with the .Qxt or .Zxt file extension to restore your file. Novice: ?INDIRECT READ ERROR Expert: ?CMERR Explanation: When you gave an indirect command (@), there was a read error on the device on which the indirect command file resides. SOS stops taking commands from the file. Solution: Contact the operator to try to restore your indirect command file or use the backup file with the file extension .Qxt or .Zxt, or recreate the indirect file. Novice: ?INTERNAL CONFUSION Expert: ?ICN Explanation: There is an internal problem with SOS will be lost. solution: Contact the operator to try to restore your file or use the backup file with the file extension of .Qxt or .Zxt. Novice: ? OPTION NOT FOUND Expert: ? OPTION NOT FOUND and your edits Explanation: When you gave the /OPTION:name command, you specified a pointer name that does not exist in your SWITCH. IN! option file as having a list of options associated with it. Solution: Check your SWITCH.INI file to make sure that such a name to specify a list of options. E-3 you have SOS ERROR MESSAGES Novice: ? SYNTAX ERROR IN DEFAULT OPTIONS Expert: ? SYNTAX ERROR IN DEFAULT OPTIONS Explanation: When you started an SOS session, your SWITCH.INI option file specified one or more options that are misspelled or contain incorrect punctuation. SOS ignores the options set in your SWITCH.INI file and prompts you with the word FILE: to respecify the file specification and options you want. Solution: Start SOS to edit your SWITCH.INI option file to correct the spelling or punction errors. You will have to rename the SWITCH.INI file before editing it as the same error would otherwise occur when you start SOS. Novice: ? SYNTAX ERROR IN OPTION FILE Expert: ? SYNTAX ERROR IN OPTION FILE Explanation: When you started an SOS session or set a series of options with the /OPTION:name command, SOS encountered a spelling or punctuation error in one or more options in your SWITCH.INI option file. Solution: Start SOS to edit your SWITCH.INI option file to correct the spelling or punctuation errors. You will have to rename the SWITCH.INI file before editing it as the same error would otherwise occur when you start SOS. Novice: %BACKUP FILE PROTECTED - IGNORED Expert: %BACKUP FILE PROTECTED - IGNORED Explanation: The backup file (.Qxt) was protected from being updated, but SOS ignored this protection and created a new backup file. Solution: To correct this error, change the protection number of the file with the TOPS-lO command RENAME, so that the protection number will be less than 400. Novice: %FILE NOT FOUND Expert: %FNF Explanation: When you gave a Copy command to copy text from another file, you specified a filename and/or file extension that did not exist. Solution: Examine the directory that contains the file you are trying to copy from to obtain the correct filename and file extension, and then reissue the Copy command. E-4 SOS ERROR MESSAGES Novice: 'ILLEGAL COMMAND Expert: 'ILC Explanation: This message indicates that you typed an incorrect syntax to an SOS command. Most likely the punctuation or spelling of the SOS command is incorrect. solution: Examine the command and reissue it. Novice: 'ILLEGAL LINE FORMAT Expert: 'ILFMT Explanation: SOS found a line with a nonstandard internal format. Most likely this file is not meant for editing with SOS. solution: Give an EQ command to return to the TOPS-IO command level. If you must edit this file, contact the operator or system manager and describe your problem. Novice: 'ILLEGAL REPLACEMENT ON INSERT Expert: 'ILR Explanation: You have tried to insert a line that already exists in the file and SOS cannot fit a line between the indicated line and the next line. Solution: To insert that line, give the Number command to renumber your file, find your place again, and then reissue the Insert command. Novice: %ILLEGAL REPLACEMENT STRING Expert: 'IRS Explanation: A Substitute command has been given specifying a replacement-string with illegal characters or an illegal format. Solution: Reissue the Substitute replacement-string. Novice: %ILLEGAL SEARCH STRING Expert: %ISS command with the proper Explanation: A Find or Substitute command has been given specifying a search-string with illegal characters or an illegal format. Solution: Reissue the Find or Substitute command with the search-string. E-S proper SOS ERROR MESSAGES Novice: 'ILLEGAL TRANSFER DESTINATION Expert: 'lTD Explanation: In giving the Transfer command, you have indicated a destination line that either does not exist or that is in the source range. Solution: Examine the Transfe~ command or your file and the the Transfer command again with destination. Novice: 'INDIRECT EOr Expert: 'CMEND reissue correct Explanation: This is an information message that appears on your terminal when an' indirect command file has completed execution. Solution: Not applicable. Novice: 'INSUFFICIENT CORE AVAILABLE Expert: 'NEC Explanation: A Copy or Transfer command has been given to copy or transfer a source-range of lines that exceeds the memory alloted to the SOS session. Solution: Reissue the Copy or Transfer command with a smaller source-range: repeat the command until the original source-range is completely copied or transferred. Novice: 'LINE TOO LONG Expert: 'LTL Explanation: SOS permits lines up to 497 characters in length, but you have exceeded this length. The SOS command that caused this error 'is canceled and the input from the SOS command is not done. Solution: Try inputting, inserting, or joining more than one line. E-6 the contents on SOS ERROR MESSAGES Novice: 'MARGIN ERROR Expert: 'MAR explanation: This error will occur only when the Justification command has been assembled for your installation of SOS. The RMAR option value has been set to a value that is less than the LMAR option. solution: Reset the RMAR option to be greater than the option, so that justification can take place. Novice: 'NO NEXT LINE Expert: 'NNN LMAR Explanation: You have attempted to print on your terminal the next line in the file, but you are positioned at the end of the file. Solution: Move the pointer so that you are not at the end of your file, or press ESCape to print the previous line. Novice: %NO STRING GIVEN Expert: %NSG Explanation: A Find or Substitute command has been given without specifying the string of characters to be found; the command has been canceled. Solution: Reissue the Find or search-string. Novice: iNO SUCH LINE(S) Expert: %NLN Substitute command a command do Explanation: The line(s) you indicated in the last not exist in your file. Solution: Reissue the SOS. command with the proper line number(s). Novice: iNO SUCH PAGE Expert: %NSP SOS specifying Explanation: The page you indicated in the last SOS command does not exist in your file. Solution: Reissue the SOS command with the proper page number. E-7 SOS ERROR MESS~GES Novice: tOUT OF ORDER Expert: %ORDER Explanation: This message will appear (1) during a Copy, Number, or Transfer command if SOS had to insert Line number(s) which were not in numerical order1 (2) when you kill page marks or delete page contents and the line numbers are not in numerical order after the Kill or Delete command has executed. solution: To maintain the integrity of your file, IMMEDIATELY give a Number command to put the lines in numerical order. If you receive this message again, issue the Number command again with a smaller increment. Novice: %SEARCH FAILS Expert: %SRF Explanation: In a Find or Substitute command, the search-string has not been found and your place in the file has not been changed. solution: Examine the Find or Substitute command and reissue with a proper search-string that can be found. Novice: %SEARCH STRING TOO COMPLEX Expert: %STC it Explanation: A Find or Substitute command with the /C128 option set has been given with too many special characters so that the search-string becomes too complex. Solution: Examine the Find or Substitute command and reissue it with the proper special characters in the search-string. Novice: %STRING TOO LONG Expert: %STL Explanation: The string of characters in a Find or Substitute command is longer than the maximum allowed by the SOS program. The maximum allowed is 200 characters for each Find or Substitute command. Solution: Reissue the Find command with less than the 200 maximum characters allowed in the search-string(s). Reissue the Substitute command with less than the 200 maximum characters allowed in the search-string(s) and replacement-string(s) • E-8 SOS ERROR MESSAGES Novice: %TEXT INSERTED AT END OF FILE Expert: 'TEXT INSERTED AT END OF FILE Explanation: This error message appears after you issued a Transfer command where the transferred range of line/page numbers have been placed at the end of your file. Solution: When examining your file, you may find an additional page mark in your file that you may wish to delete (Kill command). Novice: %TOO MANY STRINGS Expert: %TMS Substitute command in their have specified more than six Explanation: In giving a Find or extended formats, you separate strings. Solution: The maximum allowed by the SOS program is six separate search-strings (Find and Substitute commands) and six separate replacement-strings (Substitute command) . Reissue the Find or Substitute command with six or less separate strings. Novice: % WARNING - COPY ASSUMED Expert: % WARNING - COpy ASSUMED Explanation: You have issued a Transfer command in the same format as a Copy command to transfer lines from another file. However, SOS does not transfer lines from another file. Thus, SOS assumes that you have decided to change the Transfer command to a Copy command so it copied the specified range of line/page numbers. Solution: Since SOS command, the range you have line/page Novice: %WRAP AROUND Expert: %WAR performs the Transfer command as a Copy you may issuE an EQ to the C* prompt, delete of lines that were copied, or keep the change made. The Transfer command cannot delete numbers from another file. Explanation: In renumbering the file, SOS reached its maximum line number of 99999 (or 99900 by default). The contents of the lines are in their proper order, but the line numbers are not in an ascending sequence. Solution: Give the Number command with increment the line numbers. E-9 a smaller number to INDEX character, 3-3, 3-4 % error messages, E-1 * character, 3-3 + character, 3-4 - character, 3-4 • character, 3-2 ... character, 3-3 • (Move) command, 5-7, 5-8, A-3 • (Period) option, 4-48, B-2 / (Set) command, 1-4, 4-6, 5-9, 5-10, A-3 100, renumbering using other than, 3-16 = (Give) command, 4-7, 5-11, A-3 ? error messages, E-1 @ (Indirect) command, 2-8, 5-13, 5-14, A-3 A, DECIDE response, 4-15 A command, 5-17 A option F command, 5-43 A option N command, 5-75 A response of D option, 5-86 A1ter-A command, 5-17, A-4 Alter mode, 1-8, A-4 <DEL) instruction, 5-20, A-8 <RET) instruction, 5-19, A-8 <SP) instruction, 5-19, A-8 <TAB) instruction, 5-20, A-8 <CTRL/U) instruction, 5-21, A-9 C instruction, 5-21, A-4 D instruction, 5-22, A-4 E instruction, 5-22, A-4 I instruction, 5-23, A-5 instructions, 5-17, 5-18 J instruction, 5-24, A-5 K instruction, 5-24, A-5 Alter mode, (Cont.) L instruction, 5-25, A-6 P instruction, 5-25, A-6 Q instruction, 5-25, A-6 R instruction, 5-26, A-7 S instruction, 5-27, A-7 V instruction, 5-28 W instruction, 5-28, A-7 X instruction, 5-29, A-7 of X command, 5-106 ANSI character names, C-3 ANSI name descriptions, C-3 ANSI names, 6-8 Argument • (Move) command, 5-7 / (Set) command, 5-9 (Give) command, 5-11 @ (Indirect) command, 5-13 A command, 5-17 C command, 5-31 D command, 5-37 F command, 5-43 I command, 5-57 J command, 5-61 JC,JL,JR,JU,JW command, 5-63 K command, 5-69 L command, 5-71 M command, 5-73 R command, 5-81 S command, 5-85 T command, 5-93 VL,VU,VV command, 5-99 X command, 5-105 Arguments, content specification, 8-1 line contents, 8-1 recalling, 1-11 SOS command, 5-2 SOS command recalling, 1-11 Arithmetic expressions, 3-4 Asterisk character, 3-3 Auto-save, 4-25, 4-26, 4-55, 9-2 Index-l INDEX (CONT.) B option E command, 5-39 B option G command, 5-47 B option W command, 5-101 Backup, SOS file, 9-1 %BACKUP FILE PROTECTED, 5-40, 5-48, 5-102, E-4 Backup files, 10-9 SOS, 9-6, 9-7, 9-8 ?BAD "BASIC" FILE FORMAT, 4-10, E-2 BAK option, 4-8, B-2 BASIC option, 4-9, B-2 ?BBF, E-2 BIG option, 4-11, B-2 <BS), 2-5 Buffers, SOS files and, 10-1 C argument JC command, 5-63 C command, 5-31, 5-32, 5-33, 5-34 C command file specifications, 5-32, 5-33 C instruction, Alter mode, 5-21, A-4 C128, special mode, 7-2 C128 character representation, 6-8 C128 mnemonics, 7-3, 7-4, 7-5, 7-6 C128 option, 4-13, 4-30, 4-62, 5-88, 6-4, 6-5, 6-7, 7-1, B-2 C64 option, 4-12, 6-4, 6-5, B-2 Carriage return, 3-1 CASE option, 4-14, B-2 Character, 1, 3-3, 3-4 *, 3-3 +, 3-4 3-4 :'" 3-2 , 3-3 asterisk, 3-3 exclamation, 3-3, 3-4 minus, 3-4 period, 3-2 plus, 3-4 up-arrow, 3-3 Character match, 7-3, 7-4 Character names, ANSI, C-3 Character representation, C128, 6-8 Character table, SOS, C-l, C-2 Characteristics, SOS command, 5-2 terminal, 2-1 Characters, illegal, 1-2 lowercase, 6-1 special, 6-1 special line number, 3-2 special matching, 5-88, 7-2 special replacement, 5-88, 7-6 uppercase, 6-1 %CMEND-, 2-9, E-6 ?CMERR, E-3 ?CMLNPC NO PREVIOUS COMMAND, 5-48 Code, protection, 2-2 Command, 2-4 • (Move), 5-7, A-3 / (Set), 1-4, 4-6, 5-9, A-3 (Give), 5-11, A-3 @ (Indirect), 2-8, 5-13, A-3 <CTRL/C), A-I <CTRL/G), A-2 <CTRL/R), A-2 <CTRL/U), A-2 <DEL) DELETE, A-I <ESC) ESCAPE, 5-5, A-2 <LF) LINEFEED, 5-3, A-2 ALTER-A, 5-17, A-4 COPY-C, 5-31, A-9, A-lO DELETE-D, 5-37, A-lO END-E, 5-39, A-lO ES, 4-61 FIND-F, 4-60, 5-43, 7-1, A-II GO-G, 4-54, 5-47, A-II GS, 4-61 HELP-H, 5-51, A-12 INSERT-I, 5-57, A-12 JC, 5-63, A-13 JL, 5-63, A-13 JOIN-J, 5-61, A-12 JR, 5-63, A-13 JU, 5-63, A-13 JUSTIFICATION, 5-63, A-13 JW, 5-63, A-13 Index-2 INDEX ( CONT . ) Command, (Con t. ) KILL-K, 5-69, A-13 LIST-L, 5-71, A-14 MARK-M, 5-73, A-14 NA, 5-76 NP, 5-77 NUMBER-N, 5-75, A-14 PRINT-P, 5-79, A-15 R 50S, 1-13 REPLACE-R, 5-81, A-15 SUBSTITUTE-S, 4-60, 5-85, 7-1, A-IS TRANSFER-T, 5-93, A-16 INVERT-V, 5-99, A-16 VL, A-16 VU, A-16 VV, A-16 WORLD-W, 4-55, 4-61, 5-101, A-17 WS, 4-61 EXTEND-X, 5-105, A-17 Command file, indirect, 2-7 Command format, 50S, 1-4 Command format definition, 7-1 Command formats, 2-1 Command level, 50S, 2-2 Command level format, 50S, 2-4 Commands, giving, 2-1 stopping, 2-5 Commands in indirect file, giving, 2-7 Content specification arguments, 8-1 line, 8-1 Contents, line, 2-3 Control characters, 6-8 Control modes, 50S, 1-6 COPY-C command, 5-31, A-9, A-IO Correcting typing errors, 2-5 Creating a file, 1-1 Creating indirect file, 2-7 Creating mUltipage files, 3-5 (CTRL/C), 1-2, 2-5, 2-6, 9-11, A-I (CTRL/G), 2-5, A-2 (CTRL/R), 2-5, A-2 (CTRL/U), 2-5, A-2 (CTRL/U) instruction, Alter mode, 5-21, A-9 Current file in memory, 10-1 D command, 5-37, 5-38 D instruction, Alter mode, 5-22, A-4 D option E command, 5-39 D option G command, 5-47 D option 5 command, 5-86 D option W command, 5-101 ?DDE, E-2 DECIDE option, 4-15, 4-16, B-2 DECIDE responses, 4-15 Default line number, 50S, 4-59 Defaults, 50S, 6-1 Definition, command format, 7-1 (DEL), 2-5 DECIDE response, 4-15 (DEL) command, A-I (DEL) instruction, Alter mode, 5-20, A-8 (DEL) response of D option, 5-86 DELETE option, 4~17, B-2 DELETE-D command, 5-37, A-IO Deleting lines in multipage files, 3-10 Deletion, page mark, 5-37 DESCRIPTIONS, 50S COMMAND, 5-1 Descriptions of options, 4-7 Dev:, 2-2 ?DEVICE INPUT ERROR, E-2 ?DEVICE NOT AVAILABLE, E-2 ?DEVICE OUTPUT ERROR, E-2 Diagram, special character, 7-8, 7-9, 7-10 ?DIE, E-2 Directory path, 2-2 DISK option, 4-18, B-2 Disk quota, 9-9 Disk space, insufficient, 9-9 ?DNA, E-2 DPY option, 4-19, 4-20, B-2 Index-3 INDEX (CONT • ) E, DECIDE response, 4-15 E command, 5-39, 5-40, 5-41 your files after, 10-9 E instruction, Alter mode, 5-22, A-4 E option F command, 5-44 E option S command, 5-8~ E response of D option, 5-86 EB command, 1-4, 9-5 ED command, 1-4, 5-39, 9-6 Edit mode, 1-9 setting options, 4-6 Editing, file backup while, 9-2 Editing a file, 1-9 Editing file in another directory, 1-11 Editing mu1tipage files, 3-7 END-E command, 5-39, A-10 Ending SOS, 1-4, 9-3, 9-4, 9-5, 9-6 EOF, %INDIRECT, 2-9 EQ command, 1-4, 5-39, 9-6 Error messages, %, E-1 1, E-l SOS, E-1 ERROR option, 4-21, B-2 Errors, correcting typing, 2-5 ES command, 1-4, 4-61, 5-39, 9-4 <ESC) command, 5-5, 5-6, 5-79, 5-106, A-2 Example, option • (Period) option, 4-48 BAK option, 4-8 BASIC option, 4-9 BIG option, 4-11 C128 option, 4-13 C64 option, 4-12 CASE option, 4-14 DECIDE option, 4-15 DELETE option, 4-17 DISK option, 4-18 DPY option, 4-19 ERROR option, 4-21 EXPERT option, 4-22 INCREMENT option, 4-23 ISAVE option, 4-25 LENGTH option, 4-27 LMAR option, 4-28 LOCATION option, 4-29 LOWER option, 4-30 Example, option (Cont.) M33 option, 4-33 M37 option, 4-34 MAXLN option, 4-36 NAME option, 4-37 'NOBAK option, 4-38 NODECIDE option, 4-39 NODELETE option, 4-40 NONSEPARATORS option, 4-41 NONUMBER option, 4-42 NOVICE option, 4-44 NUMBER option, 4-45 OLD option, 4-46 OPTION option, 4-47 PLINES option, 4-49 PMAR option, 4-50 READONLY option, 4-51 RMAR option, 4-53 RUN option, 4-54 SAVE option, 4-55 SEPARATORS option, 4-56 SEQUENCE option, 4-57 START option, 4-58 STEP option, 4-59 STRING option, 4-60 UNSEQUENCE option, 4-61 UPPER option, 4-62, 4-63 Examples, line contents specification, 8-2, 8-3, 8-4 SOS command, 5-2 Examples, command • (Move) command, 5-8 / (Set) command, 5-10 = (Give) command, 5-11 @ (Indirect) command, 5-14 <LF) command, 5-3 <ESC) command, 5-6 C command, 5-35 C128 mnemonics, 7-3 7-4, 7-5 D command, 5-38 E command, 5-41 F command, 5-46 G command, 5-49 H command, 5-51 I command, 5-59 J command, 5-61 JC command, 5-63, 5-65 JL command, 5-65 JR command, 5-66 JO command, 5-66 JW command, 5-67 K command, 5-69, 5-70 L command, 5-72 M command, 5-74 N command, 5-78 Index-4 INDEX Examples, command (Cont.) P command, 5-80 R command, 5-82, 5-83 S command, 5-89, 5-90, 5-91, 7-5, 7-7 S command line contents, 8-5, 8-6, 8-7, 8-8 T command, 5-95, 5-96, 5-97 V command, 5-100 W command, 5-103, 5-104 X command, 5-107 Exclamation character, 3-3, 3-4 EXPERT option, 4-22, 5-37, B-2 Expressions, ar i thmetic, 3-4 .ext, 2-2 Extended characteristics, C command, 5-32, 5-33 F command, 5-45 N command, 5-76 S command, 5-87 Extension, .Qxt file, 4-38, 9-3 .Zxt file, 4-46, 10-13 Extensions, standard file, Appendix D F command, 5-43, 5-44, 5-45 File, creating a, 1-1 creating indirect, 2-7 editing a, 1-9 indirect command, 2-7 nnnSOS.TEM, 10-2 nnnSOS.TMP, 10-3 renumbering your, 3-15 saving with no backup, 9-5 saving your, 9-3 SWITCH.INI option, 1-12, 4-47 .TEM, 10-1, 10-2, 10-14 .TMP, 10-1, 10-3, 10-14 using indirect, 2-8 File backup, SOS, 9-1 File backup while editing, 9-2 File backup while inputting, 9-2 File extension, .Qxt, 4-38, 9-3 .Zxt, 4-46, 10-13 (CaNT.) File extension specification, 1-2 File extensions, standard, Appendix D File in another directory, editing, 1-11 %FILE NOT FOUND, 5-34, E-4 File protection code, 9-6 File specifications, 1-2, 4-37, 4-54 C command, 5-32, 5-33 E command, 5-39 G command, 5-47 input, 2-1 output, 2-1 W command, 5-101 ?FILE WRITE PROTECTED, 5-40, 5-48, 5-103, E-3 FILE:, 1-1 Filename specification, 1-2 Files, backup, 10-9 creating multipage, 3-5 deleting lines in multipage, 3-10 editing multipage, 3-7 multipage, 3-13, 3-14 SOS backup, 9-6, 9-7, 9-8 temporary, 10--1 using multipage, 3-1 Files after E command, 10-9 Files after G command, 10-9 Files after W command, 10-9 Files and buffers, SOS, 10-1 Files with line numbers, saving, 9-3 Files without line numbers, saving, 9-4 Filnam, 2-2 FIND-F command, 4-60, 5-43, 7-1, A-II Finding status of options, 4-7 Finish-here string, 8-2 %FNF, E-4 Form feed, 3-1 Formats, • (Move) command, 5-7 / (Set) command, 5-9 = (Give) command, 5-11 @ (Indirect) command, 5-13 <LF> command, 5-3 <ESC> command, 5-5 A command, 5-17 C command, 5-31 command, 2-1 D command, 5-37 E command, 5-39 Index-5 INDEX (CONT • ) Formats, (Cant.) F command, 5-43 G command, 5-47 H command, 5-51 J command, 5-61 JC,JL,JR,JU,JW command, 5-63 K command, 5-69 L command, 5-71 line contents command, 8-1, 8-2 M command, 5-73 N command, 5-75 option, 4-1 P command, 5-79 R command, 5-81 S command, 5-85 SOS command, 5-2 SOS command level, 2-4 SOS input line, 2-3 SOS page mark, 3-1 SWITCH.INI file, line, 4-2 T command, 5-93 V command, 5-99 W command, 5-101 X command, 5-105 Full file specifications, 2-1 Function, • (Move) command, 5-7 • (Period) option, 4-48 / (Set) command, 5-9 = (Give) command, 5-11 @ (Indirect) command, 5-13 <LF) command, 5-3 <ESC) command, 5-5 A command, 5-17 BAK option, 4-8 BASIC option, 4-9 BIG option, 4-11 C command, 5-31 C128 option, 4-13 C64 option, 4-12 CASE option, 4-14 D command, 5-37 DECIDE option, 4-15 DELETE option, 4-17 DISK option, 4-18 DPY option, 4-19 E command, 5-39 ERROR option, 4-21 EXPERT option, 4-22 F command, 5-43 G command, 5-47 H command, 5-51 I command, 5-57 INCREMENT option, 4-23 ISAVE option, 4-25 Function, (Cant.) J command, 5-61 JC,JL,JR,JU,JW command, 5-63 K command, 5-69 L command, 5-71 LENGTH option, 4-27 LMAR option, 4-28 LOCATION option, 4-29 LOWER option, 4-30 M command, 5-73 M33 option, 4-33 M37 option, 4-34 MAXLN option, 4-36 N command, 5-75 NAME option, 4-37 NOBAK option, 4-38 NODECIDE option, 4-39 NODELETE option, 4-40 NONSEPARATORS option, 4-41 NONUMBER option, 4-42 NOVICE option, 4-44 NUMBER option, 4-45 OLD option, 4-46 OPTION option, 4-47 P command, 5-79 PLINES option, 4-49 PMAR option, 4-50 R command, 5-81 READONLY option, 4-51 RMAR option, 4-53 RUN option, 4-54 S command, 5-85 SAVE option, 4-55 SEPARATORS option, 4-56 SEQUENCE option, 4-57 SOS command, 5-2 START option, 4-58 STEP option, 4-59 STRING option, 4-60 T command, 5-93 UNSEQUENCE option, 4-61 UPPER option, 4-62 V command, 5-99 W command, 5-101 X command, 5-105 G, DECIDE response, 4-15 G command, 5-47, 5-48, 5-49 your files after, 10-9 G command file specifications, 5-47 G response, WELL?, 9-10 G response of D option, 5-86 Index-6 INDEX (CONT • ) GB command, 5-47, 9-5 GO command, 5-47, 9-6 Giving commands, 2-1 Giving commands in indirect file, 2-7 Giving options, 4-5 GO-G command, 4-54, 5-47, A-II GQ command, 5-47, 9-6 GS command, 4-61, 5-47, 9-4 H command, 5-51, 5-52, 5-53, 5-54, 5-55 HELP-H command, 5-51, A-12 Hints, . (Move) command, 5-7 / (Set) command, 5-9 @ (Indirect) command, 5-13 A command, 5-17 o command, 5-38 E command, 5-39 F command, 5-45 G command, 5-47 I command, 5-58 K command, 5-69 L command, 5-71 M command, 5-73 N command, 5-75 P command, 5-79 R command, 5-82 SOS command, 5-2 T command, 5-94 W command, 5-101 I command, 5-57, 5-58, 5-59 I instruction, Alter mode, 5-23, A-5 ?ICN, E-3 %ILC, E-5 %ILFMT, E-5 ?ILLEGAL CHAR IN CMD, 1-2 Illegal characters, 1-2 %ILLEGAL COMMAND, 4-7, 4-51, 5-41, 5-48, 5-99, 5-103, E-5 %ILLEGAL LINE FORMAT, E-5 %ILLEGAL REPLACEMENT ON INSERT, 5-58, E-5 %ILLEGAL REPLACEMENT STRING, E-5 %ILLEGAL SEARCH STRING, 5-89, E-5 %ILLEGAL TRANSFER DESTINATION, 5-95, E-6 ?ILLEGAL UUO, E-3 %ILR, E-5 ?ILUUO, E-3 Including options in SWITCH.INI, 4-2 INCREMENT option, 4-23, 4-24, B-2 Indirect command file, 2-7 %INDIRECT EOF, 2-9, E-6 Indirect file, 2-7, 2-8 options in, 4-6 ?INDIRECT READ ERROR, E-3 Input file specification, 2-1 Input level, SOS, 2-2 Input line format, SOS, 2-3 Input mode, 1-6, 1-7 INPUT:, 1-1 Inputting, file backup while, 9-2 INSERT-I command, 5-57, A-12 Insertion, page mark, 5-73 Instructions, Alter mode, 5-17, 5-18 Alter mode <CTRL/U>, 5-21, A-9 Alter mode <DEL>, 5-20, A-8 Alter mode <RET>, 5-19, A-8 Alter mode <SP>, 5-19, A-8 Alter mode <TAB>, 5-20, A-8 Alter mode C, 5-21, A-4 Alter mode 0, 5-22, A-4 Alter mode E, 5-22, A-4 Alter mode I , 5··· 2 3, A-5 Alter mode J, 5-24, A-5 Alter mode K, 5-24, A-5 Alter mode L, 5-25, A-6 Alter mode P, 5-25, A-6 Alter mode Q, 5-25, A-6 Alter mode R, 5-26, A-7 Alter mode S, 5-27, A-7 Alter mode V, 5-28 Alter mode W, 5-28, A-7 Alter mode X, 5-29, A-7 SOS command, 5-2 %INSUFFICIENT CORE, 5-34 %INSUFFICIENT CORE AVAILABLE, 5-94, E-6 Insufficient disk space, 9-9 Index-7 INDEX (CONT.) ?INTERNAL CONFUSION, 4-10, E-3 Introduction to the SOS program, 1-1 %IRS, E-5 ISAVE option, 4-25, 4-26, 9-2, B-2 %ISS, E-5 !~ ITO, E-6 ,J command, 5-61 ,J instruction, Alter mode, 5-24, A-5 JC command, 5-63, 5-65 A-13 JC,JL,JR,JU,JW command, 5-63 JC,JR,JL,JU,JW command, restrictions, 5-63 JL command, 5-63, 5-65, A-13 JOIN-J command, 5-61, A-12 JR command, 5-63, 5-66, A-13 JU command, 5-63, 5-66, A-13 JUSTIFICATION command, 5-63, 5-64, 5-65, 5-66, 5-67, A-13 JW command, 5-63, 5-67, A-13 K command, 5-69, 5-70 K instruction, Alter mode, 5-24, A-5 KILL-K command, 5-69, A-13 Killing page marks, 3-13 L argument JL command, 5-63 L argument V command, 5-99 L command, 5-71, 5-72 L instruction, Alter mode, 5-25, A-6 LA36 terminal, 6-1, 6-6 LENGTH option, 4-27, 5-63, B-3 Levels, command, 2-2 <LF) (Linefeed) command, 5-3, 5-79, 5-106, A-2 Line, 2-4 Line contents, 2-3 examples S command, 8-5, 8-6, 8-7, 8-8 Line contents arguments, 8-1 Line contents command formats, 8-1, 8-2 Line contents specification examples, 8-2, 8-3, 8-4 Line contents specifications, 4-42, 4-60, 8-1 Line contents SUBSTITUTE command, 8-5 Line format, SOS input, 2-3 Line format SWITCH.INI file, 4-2 Line number, 2-3 SOS default, 4-58, 4-59 special characters, 3-2 Line numbers, 3-1 renumbering, 3-14 saving files with, 9-3 saving files without, 9-4 %LINE TOO LONG, 5-61, 5-63, E-6 Line/page number symbols, A-I LINEFEED command, <LF), 5-3 LIST-L command, 5-71, A-14 LMAR option, 4-28, 5-63, B-3 LOCATION option, 4-29, B-3, 10-2 LOWER option, 4-30, 4-31, 4-32, 6-4, 6-5, B-3 Lowercase, typing, 6-3, 6-7 Lowercase characters, 6-1 %LTL, E-6 M command, 5-73, 5-74 M33 option, 4-33, 6-1, B-3 M37 option, 4-34, 4-35, 6-1, B-3 %MAR, E-7 %MARGIN ERROR, 5-63, E-7 Mark page, 3-1 MARK-M command, 5-73, A-14 Marks, killing page, 3-13 MASSIVE DELETE OK?, 3-11, 4-44, 5-37, 5-82 Index-8 INDEX (CONT.) Matching characters, 7-1, 7-2, 7-3 specification, 7-4 Match-string, 7-1 MAXLN option, 4-36, 5-63, 8-1, B-3 Memory, 10-1 current file in, 10-1 Memory buffer, 10-2 Mnemonics, C128, 7-3, 7-4, 7-6 examples C128, 7-5 Mode, Alter, 1-8, A-4 Edit, 1-9 Input, 1-6 Mode instructions, Alter, 5-17, 5-18 Modes, SOS control, 1-6 Mu1tipage files, 3-13, 3-14 Multipage files, creating, 3-5 deleting lines in, 3-10 editing, 3-7 using, 3-1 Multiple format in SWITCH.INI, 4-3 Multiple line in SWITCH.INI, 4-3 N command, 5-75, 5-76, 5-77, 5-78 N option F command, 5-43 N option S command, 5-86 NA command, 5-76 NAME option, 4-37, B-3 Names, ANSI, 6-8 %NEC, E-6 %NLN, E-7 %NNN, E-7 No backup file, saving with, 9-5 %NO NEXT LINE, 5-61, E-7 %NO STRING GIVEN, 5-45, 5-87, 5-89, E-7 %NO SUCH LINE(S), 5-38, 5-79, 5-82, 5-99, 8-1, E-7 %NO SUCH PAGE, 5-58, 5-69, 5-73, E-7 NOBAK option, 4-38, 4-46, 9-3, 9-8, 10-13, B-3 NODECIDE option, 4-39, B-3 NODELETE option, 4-40, B-3 NONSEPARATORS option, 4-41, B-3 NONUMBER option, 4-42, 4-43, B-3 NOVICE option, 4-44, B-3 NP command, 5-77 %NSG, E-7 %NSP, E-7 Null, 3-1 Number, 2-4 NUMBER option, 4-45, B-3 Number option F command, 5-44 Number option S command, 5-86 NUMBER-N command, 5-75, A-14 Numbers, line, 3-1 page, 3-1 OLD option, 4-38, 4-46, 9-8, 10-13, B-4 Operation, SOS command, 5-2 Operation C command, 5-32, 5-33 Operation X command, 5-105, 5-106 Option, 2-4 • (Period), 4-48, B-2 BAK, 4-8, B-2 BASIC, 4-9, B-2 BIG, 4-11, B-2 C128, 4-13, B-2 C64, 4-12, B-2 CASE, 4-14, B-2 DECIDE, 4-15, 4-16, B-2 DELETE, 4-17, B-2 DISK, 4-18, B-2 DPY, 4-19, 4-20, B-2 ERROR, 4-21, B-2 EXPERT, 4-22, B-2 INCREMENT, 4-23, 4-24, B-2 ISAVE, 4-25, 4-26, 9-2, B-2 LENGTH, 4-27, B-3 LMAR, 4-28, B-3 LOCATION, 4-29, B-3 LOWER, 4-30, 4-31, B-3 M33, 4-33, B-3 M37, 4-34, 4-35, B-3 MAXLN, 4-36, B-3 NAME, 4-37, B-3 NOBAK, 4-38, B-3, 10-13 NODECIDE, 4-39, B-3 Index-9 INDEX (CONT.) Option, (Cont.) NODELETE, 4-40, B-3 NONSEPARATORS, 4-41, B-3 NONUMBER, 4-42, 4-43, B-3 NOVICE, 4-44, B-3 NUMBER, 4-45, B-3 OLD, 4-46, B-4, 10-13 OPTION, 4-47, B-4 PLINES, 4-49, B-4 PMAR, 4-50, B-4 READONLY, 4-51, 4-52, B-4 RMAR, 4-53, B-4 RUN, 4-54, B-4 SAVE, 4-55, 9-2, B-4 SEPARATORS, 4-56, B-4 SEQUENCE, 4-57, B-4 START, 4-58, B-4 STEP, 4-59, B-4 STRING, 4-60, B-4 UNSEQUENCE, 4-61, B-5 UPPER, 4-62, B-5 Option file, SWITCH.INI, 1-12, 4-1, 4-47 Option format, 4-1 ?OPTION NOT FOUND, 4-47, E-3 Options, / (Set) command, 5-9 C command, 5-31 D command, 5-37 descriptions of, 4-7 E command, 5-39 Edit mode, setting, 4-6 F command, 5-43 finding status of, 4-7 G command, 5-47 giving, 4-5 I command, 5-57, 5-58 in indirect file, 4-6 L command, 5-71 M command, 5-73 N command, 5-75 P command, 5-79 R command, 5-81 S command, 5-86 setting, 4-4, 4-5 setting SOS, 1-4 SOS command, 5-2 T command, 5-93 W command, 5-101 with R SOS, 1-13 X command, 5-105 %ORDER, E-8 %OUT OF ORDER, 5-34, 5-38, 5-69, 5-76, 5-95, E-8 OUTPUT FILE EXISTS, 5-40, 5-48, 5-102 Output file specification, 2-1 P command, 5-79, 5-aO P instruction, Alter mode, 5-25, A-6 P option N command, 5-75 Page, 2-4 Page mark deletion, 5-37 Page mark format, 3-1 Page mark insertion, 5-73 Page marks, killing, 3-13 Page numbers, 3-1 Paragraphs, 5-67 Path, directory, 2-2 Period character, 3-2 PLINES option, 4-49, B-4 PMAR option, 4-50, 5-63, B-4 "pointer-name", 4-47 position, 2-4 PPN, 1-12 PRINT-P command, 5-79, A-15 Printable option, • (Period), 4-48 BAK, 4-8 BIG, 4-11 C128, 4-13 C64, 4-12 CASE, 4-14 DECIDE, 4-15 DELETE, 4-17 DISK, 4-18 DPY, 4-19 ERROR, 4-21 INCREMENT, 4-23 ISAVE, 4-25 LENGTH, 4-27 LMAR, 4-28 LOCATION, 4-29 LOWER, 4-30 M33, 4-33 M37, 4-34 MAXLN, 4-36 NAME, 4-37 NOBAK, 4-38 NODECIDE, 4-39 NODELETE, 4-40 NONSEPARATORS, 4-41 PLINES, 4-49 PMAR, 4-50 RMAR, 4-53 RUN, 4-54 Index-lO INDEX (CONT . ) Printable option, (Cont.) SAVE, .4-55 SEPARATORS, 4-56 SEQUENCE, 4-57 START, 4-58 STEP, 4-59 STRING, 4-60 UNSEQUENCE, 4-61 UPPER, 4-62 Privileges, read/write, 1-3 Protection code, 2-2 file, 9-6 Q, DECIDE response, 4-15 Q instruction, Alter mode, 5-25, A-6 Q option E command, 5-39 Q option G command, 5-47 Q option W command, 5-101 Q response of D option, 5-86 Quota, disk, 9-9 .Qxt file extension, 4-38, 9-3 R argument JR command, 5-63 R command, 5-81, 5-82, 5-83 R instruction, Alter mode, 5-26, A-7 R response, WELL?, 9-11 R SOS command, 1-13 Range, 2-4 Read/write privileges, 1-3 READONLY option, 4-51, 4-52, B-4 Recalling arguments, 1-11 SOS command, 1-11 Recovering from system crash, 10-14 Renumbering lines, 3-14 Renumbering using other than 100, 3-16 Renumbering your file, 3-15 REPLACE-R command, 5-81, A-15 Replacement characters, 7-1 special, 7-6 Replacement-string, 7-1, 7-6 Responses, (CTRL/C>, 2-6 WELL?, 9-9 Restrictions of, (Move) command, 5-7 / (Set) command, 5-9 = (Give) command, 5-11 @ (Indirect) command, 5-14 (LF> command, 5-3 (ESC> command, 5-5 A command, 5-17 BASIC option, 4-10 C command, 5-34 C128 option, 4-13 D command, 5-38 DECIDE option, 4-16 DELETE option, 4-17 DPY option, 4-20 E command, 5-40 ERROR option, 4-21 F command, 5-45 G command, 5-48 H command, 5-51 I command, 5-58 INCREMENT option, 4-24 ISAVE option, 4-26 J command, 5-61 JC,JL,JR,JU,JW command, 5-63 K command, 5-69 L command, 5-71 LENGTH option, 4-27 LMAR option, 4-28 LOWER option, 4-32 M command, 5-73 M33 option, 4-33 M37 option, 4-35 MAXLN option, 4-36 N command, 5-76 NAME option, 4-37 NOBAK option, 4-38 NONUMBER option, 4-43 NUMBER option, 4-45 OLD option, 4-46 OPTION option, 4-47 P command, 5-79 PMAR option, 4-50 READONLY option, 4-52 RMAR option, 4-53 S command, 5-89 SAVE option, 4-55 SOS command, 5-2 START option, 4-58 STEP option, 4-59 T command, 5-94 UNSEQUENCE option, 4-61 VL,VU,VV command, 5-99 W command, 5-102 Index-ll INDEX (CONT • ) <RET) instruction, Alter mode, 5-19, A-8 RMAR option, 4-53, 5-63, B-4 RUN option, 4-54, 5-47, 5-48, B-4 S command, 5-85, 5-86, 5-87, 5-88, 5-89, 5-90, 5-91, 7-5, 7-7 S command line contents, examples, 8-5, 8-6, 8-7, 8-8 S instruction, Alter mode, 5-27, A-7 S option E command, 5-39 S option G command, 5-47 S option W command, 5-101 SAVE option, 4-55, 9-2, B-4 Save-the-World command, 5-101, 9-1 Saving files with line numbers, 9-3 Saving files without line numbers, 9-4 Saving with no backup file, 9-5 Saving your file, 9-3 %SEARCH FAILS, 5-45, 5-89, E-8 %SEARCH STRING COMPLEX, 5-89, E-8 %SEARCH STRING TOO COMPLEX, 5-46 SEPARATORS option, 4-56, B-4 SEQUENCE option, 4-57, B-4 SE~ttable option, BAK, 4-8 BASIC, 4-9 C128, 4-13 C64, 4-12 DECIDE, 4-15 DELETE, 4-17 DPY, 4-19 EXPERT, 4-22 INCREMENT, 4-23 ISAVE, 4-25 LENGTH, 4-27 LMAR, 4-28 LOWER, 4-30 M33, 4-33 M37, 4-34 MAXLN, 4-36 Settable option, (Cont.) NAME, 4-37 NOBAK, 4-38 NODECIDE, 4-39 NODELETE, 4-40 NONSEPARATORS, 4-41 NONUMBER, 4-42 NOVICE, 4-44 NUMBER, 4-45 OLD, 4-46 OPTION, 4-47 PLINES, 4-49 PMAR, 4-50 READONLY, 4-51 RMAR, 4-53 RUN, 4-54 SAVE, 4-55 SEPARATORS, 4-56 SEQUENCE, 4-57 START, 4-58 STEP, 4-59 UNSEQUENCE, 4-61 UPPER, 4-62 Setting options, 1-4, 4-4, 4-5 Setting options, Edit mode, 4-6 SOS, and terminal setting, 6-1 backup files, 9-6, 9-7, 9-8 character table, C-l, C-2 command arguments, 5-2 command characteristics, 5-2 COMMAND DESCRIPTIONS, 5-1 command examples, 5-2 command format, 1-4, 5-2 command function, 5-2 command hints, 5-2 command instructions, 5-2 command level, 2-2 command level format, 2-4 command operation, 5-2 command options, 5-2 command recalling arguments, 1-11 command restrictions, 5-2 command special cases, 5-2 control modes, 1-6 Index-12 INDEX (CONT • ) SOS, (Cont.) default line number, 4-58, 4-59 defaults, 6-1 error messages, E-l file backup, 9-1 files and buffers, 10-1 input level, 2-2 input line format, 2-3 page mark format, 3-1 program, setting options, 1-4 .TEM file, 10-2 .TMP file, 10-3 using options, 4-1 <SP>, DECIDE response, 4-15 <SP> instruction, Alter mode, 5-19, A-8 <SP> response of D option, 5-86 Special cases, SOS command, 5-2 C command, 5-31 D command, 5-37 F command, 5-44 M command, 5-73 N command, 5-75 R command, 5-82 S command, 5-87 T command, 5-93 X command, 5-106 Special character diagram, 7-8, 7-9, 7-10 Special character meaning, 6-8 Special characters, 6-1, 7-1 Special characters, typing, 6-7 Special matching characters, 5-88, 7-2 Special mode C128, 7-2 Special replacement characters, 5-88, 7-6 Specification, character match, 7-3 file, 1-2 match character, 7-4 Specification examples, line contents, 8-2, 8-3, 8-4 Specifications, file, 4-37, 4-54 full file, 2-1 line contents, 4-42, 4-60, 8-1 %SRF, E-8 Standard file extensions, Appendix D START option, 4-58, B-4 Start-here string, 8-2 Starting input mode, 1-6, 1-7 Status of options, finding, 4-7 %STC, E-8 STEP option, 4-59, B-4 %STL, E-8 Stopping a command, 2-5 String, finish-here, 8-2 start-here, 8-2 STRING option, 4-60, B-4 %STRING TOO LONG, 5-45, 5-87, 5-89, E-8 SUBSTITUTE-S command, 4-60, 5-85, 7-1, 8-5, A-15 SWITCH.INI, 4-2, 4-3 SWITCH.INI file, 4-52 line format, 4-2 SWITCH.INI option file, 1-12, 4-1, 4-47 /switches, 2-1 Symbols, line/page number, A-I ?SYNTAX ERROR DEFAULT OPTIONS, E-4 ?SYNTAX ERROR OPTION FILE, 4-47, E-4 System crash, recovering from, 10-14 T command, 5-93, 5-94, 5-95, 5-96, 5-97 T response, WELL?, 9-10 <TAB>, 2-3 <TAB> instruction, Alter mode, 5-20, A-8 .TEM file, 10-1, 10-2, 10-14 Temporary files, 10-1, 10-3, 10-14 Terminal, LA36, 6-1, 6-6 upper/lowercase, 6-6 uppercase-only, 6-2 VT05, 6-1, 6-2, 6-3 VT06, 6-1 VT50, 6-1, 6-2, 6-4 VT52, 6-1, 6-6 Terminal characteristics, 2-1 Index-l3 INDEX (CaNT.) Terminal setting in SOS, 6-1 %TEXT INSERTED END OF FILE, 5-94, E-9 .TMP file, 10-1, 10-3, 10-14 %TMS, E-9 %TOO MANY STRINGS, 5-45, 5-87, E-9 TRANSFER-T command, 5-93, A-16 Typing errors, correcting, 2-5 Typing lowercase, 6-3, 6-7 Typing special characters, 6-7 Typing uppercase, 6-2, 6-6 U argument JU command, 5-63 U argument V command, 5-99 UNSEQUENCE option, 4-61, 5-40, 5-48, B-5 Up-arrow character, 3-3 UPPER option, 4-62, 6-4, B-5 Upper/lowercase terminal, 6-6 Uppercase, typing, 6-2, 6-6 Uppercase characters, 6-1 Uppercase-only terminal, 6-2 Using <CTRL/C), 2-6 Using <CTRL/G), 2-5 using indirect file, 2-8 Using mu1tipage files, 3-1 using options with 50S, 1-4 using 50S options, 4-1 using temporary files, 10-3 V argument V command, 5-99 V command, 5-99, 5-100 V instruction, Alter mode, 5-28 INVERT-V command, 5-99, A-16 VL command, A-16 VT05 terminal, 6-1, 6-2, 6-3 VT06 terminal, 6-1 VT50 terminal, 6-1, 6-2, 6-4 VT52 terminal, 6-1, 6-6 VU command, A-16 VV command, A-16 W argument JW command, 5-63 W command, 5-101, 5-102, 5-103, 5-104 your files after, 10-9 W instruction, Alter mode, 5-28, A-7 W response, WELL?, 9-11 %WAR, E-9 %WARNING COpy ASSUMED, 5-94, E-9 WB command, 5-101, 9-5 WD command, 5-101, 9-6 WELL?, 9-9 WELL? G response, 9-10 WELL? R response, 9-11 WELL? T response, 9-10 WELL? W response, 9-11 WORLD-W command, 4-55, 4-61, 5-101, 9-1, A-17 WQ command, 5-101, 9-6 Wrap around, 3-16 %WRAP AROUND, 5-34, 5-76, E-9 WS command, 4-61, 5-101, 9-4 X command, 5-105, 5-106, 5-107 X instruction, Alter mode, 5-29, A-7 EXTEND-X command, 5-105, A-17 YES?, 2-6, 9-11, A-I .Zxt file extension, 4-46, 10-13 Index-14 TOPS-lO SOS Reference Manual AA-D598A-TB READER'S COMMENTS NOTE: This form is for document comments only. DIGITAL will use comments submitted on this form at the company's discretion. If you require a written reply and are eligible to receive one under Software Performance Report (SPR) service, submit your comments on an SPR form. Did you find this manual understandable, usable, and well-organized? Please make suggestions for improvement. · (l) c .~ ..s::: ..... 0) c o o ...... Did you find errors in this manual? page number . If so, specify the error and the :> o (l) III o(l) c: Please indicate the type of reader that you most nearly represent. [] Assembly language programmer [] Higher-level language programmer [] Occasional programmer (experienced) [] User with little programming experience [] Student programmer [] Other (please specify) _______________________________________ Name Date _________________________ Organization ________________________________________________________________ Street _______________________________________________________________________ Ci ty__________________________ S ta te __________ Zip Code ___________ or Country -------------------------------------------------------------Fold lIere------------------------------------------------------------ .---------------------------------------------.. - Do Not Tear - Fold lIere and Staple ---------------------.. --..---------------------- FIRST CLASS PERMIT NO. 152 MARLBOROUGH, MA 01752 BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES Postage will be paid by: mamaoma Software Documentation 200 Forest Street MRl-2/E37 Marlborough, Massachusetts 01752
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies