XEDIT - EXTENDED INTERACTIVE TEXT EDITOR. D. W. MEARS. 72/10/31. W. C. WELLS. 76/02/25. REVISED - 77/07/07. XEDIT IS DESIGNED TO BE "SIMPLE TO LEARN AND EASY TO USE". BEING "EASY TO USE" REQUIRES THAT WHENEVER POSSIBLE, COMMAND OPTIONS SHOULD DEFAULT TO THE ONE MOST USED. THIS DEFAULTING ALSO HOLDS FOR THE XEDIT CONTROL CARD WHICH IS DESCRIBED BELOW. IT SHOULD BE NOTED THAT TO EDIT A PRIMARY FILE, ALL ONE NEEDS TO TYPE IS... "XEDIT". UNFORTUNATELY, WHILE ALL THE XEDIT COMMANDS ARE SIMILAR IN MANY ASPECTS, IT HAS BEEN FOUND THAT THE QUANTITY OF COMMANDS TENDS TO OVERWHELM THE BEGINNING USER. IT IS THEREFORE RECOMMENDED THAT THE BEGINNING USERS BECOME FAMILIAR WITH THE FOLLOWING COMMANDS AND MASTER THE OTHERS AT A LATER DATE. THE COMMANDS ARE- "HELP", "EXPLAIN", "PRINT", "$", "LOCATE" (ONLY THE FIRST FORM), "NEXT", "TOP", "INSERT", "DELETE", "CHANGE" (ONLY THE FIRST FORM), "END", AND "STOP". THE XEDIT COMMAND ITSELF HAS THE FOLLOWING FORMAT- XEDIT,EDITFIL,OPTIONS. EDITFIL (THE FIRST PARAMETER) IS THE NAME OF THE FILE TO BE EDITED. EDITFIL DEFAULTS TO THE PRIMARY FILE IF ONE EXISTS, OR TO TAPE1 IF THERE IS NO PRIMARY FILE. THE OPTIONS ARE ORDER-INDEPENDENT AND MUST NOT BE THE FIRST PARAMETER (I.E. IF ONE WISHES TO DEFAULT EDITFIL AND STILL USE PARAMETERS, HE MUST TYPE - "XEDIT,,OPTIONS.") PARAMETER DESCRIPTION/ACTION ========= ================== AS TURNS ON ASCII PROCESSING OF TEXT. THIS OPTION IS DEFAULT IF ONE IS IN THE 63 CHARACTER SET OR IN THE 64/ASCII CHARACTER SET. THIS OPTION IS NOT DEFAULT FOR BATCH USERS. B DENOTES BATCH PROCESSING. WHILE UNDER BATCH PROCESSING, XEDIT SHIFTS ALL ERROR MESSAGES AND WILL IMMEDIATELY ABORT IF AN ERROR IS ENCOUNTERED. THIS OPTION IS DEFAULT FOR BATCH ORIGIN. C PUTS THE EDITOR INTO CREATE MODE. THIS MODE ALLOWS ONE TO CREATE A NEW FILE WITHOUT PREVIOUSLY DEFINING THE FILE. NOTE- THE INITIAL LINE(S) OF INPUT MUST BE ADDED BY USING EITHER INPUT MODE OR THE INSERT COMMAND. IN ADDITION, XEDIT WILL DISABLE VARIOUS COMMANDS UNTIL ONE LINE OF TEXT HAS BEEN ENTERED. THE C OPTION DISABLES THE FR OPTION. FR INSTRUCTS XEDIT TO OBTAIN THE INITIAL COMMAND FROM THE FIRST LINE OF THE EDITFIL, THUS ALLOWING FREQUENTLY USED "INITIALIZATION" COMMANDS TO BE ENTERED ONCE. TO ACCOMPLISH THIS AND YET MAINTAIN COMPATIBILITY WITH THE VARIOUS COMPILERS, XEDIT ASSUMES THAT THE INITIAL COMMAND BEGINS WITH THE FIRST NON-BLANK CHARACTER WHICH OCCURS AFTER TWO CONSECUTIVE BLANKS, AND THAT THE COMMAND CONTINUES UNTIL THE END OF THE FIRST LINE. (MULTIPLE COMMANDS CAN BE ENTERED VIA THE Y OR Z COMMANDS). NH SUPPRESSES THE ISSUING OF THE XEDIT HEADER. P CAUSES THE EDITFIL TO BE OBTAINED FROM THE PERMANENT FILE AREA. INTERNALLY, THIS OPTION CAUSES XEDIT TO ATTEMPT TO GET THE FILE, AND THEN ATTEMPT TO ATTACH THE FILE IN WRITE MODE IF THE GET FAILED. THE FILES ARE OBTAINED FROM THE EXISTING PACK. I=LFN CAUSES XEDIT TO READ INPUT DIRECTIVES FROM FILE LFN. L=LFN CAUSES NORMAL XEDIT OUTPUT TO BE PLACED ON FILE LFN INSTEAD OF THE FILE *OUTPUT*. IN ADDITION TO THE "FR" PARAMETER DESCRIBED ABOVE, XEDIT ALSO ALLOWS ONE TO SPECIFY ADDITIONAL COMMANDS ON THE CONTROL CARD ITSELF. TO DO THIS, FOLLOW THE TERMINATOR (THE ")" OR ".") WITH A DELIMITER CHARACTER (SEE DELIMIT COMMAND) AND THE DESIRED LINES OF INPUT SEPARATED BY THE SAME DELIMITER CHARACTER. FOR EXAMPLE, THE FOLLOWING 3 SYSTEM COMMANDS WILL RESULT IN THE PRINTING OF THE LAST 5 LINES OF A DAYFILE. BATCH /DAYFILE,TAPE1. /XEDIT,TAPE1.;XB;XN -6;P5;XQ THE EXPRESSION FOLLOWING THE "." SHOWS EXAMPLES OF THE XEDIT "BOTTOM", "NEXT", "PRINT", AND "QUIT" COMMANDS. AFTER THE XEDIT COMMAND IS ACCEPTED, XEDIT RESPONDS BY TYPING THE HEADER, AT THIS POINT, XEDIT WILL EITHER INDICATE A PROBLEM WITH THE SPECIFIED EDITFIL AND REQUEST THE NAME OF ANOTHER FILE -OR- WILL BEGIN EXECUTION OF THE FR AND CONTROL CARD COMMANDS. EVENTUALLY, XEDIT WILL ENTER COMMAND MODE WHICH IS SIGNALED BY A DOUBLE QUESTION MARK ("?? "). FROM THIS POINT ON, XEDIT WILL REQUEST COMMANDS BY USING THE "?? " PROMPT, AND DATA BY USING THE SINGLE QUESTION MARK PROMPT ("? "). INITIALLY XEDIT IS IN "VERIFY" MODE. IN THIS MODE, ALL LINES OPERATED UPON ARE TYPED OUT AFTER THE OPERATION IS PERFORMED FOR VERIFICATION. THE ALTERNATIVE MODE IS "BRIEF" MODE. THIS MODE SUPPRESSES THE VERIFICATION. ADDITIONALLY, XEDIT ALLOWS ONE TO TOGGLE VERIFICATION FOR A SINGLE COMMAND BY PREFIXING THAT COMMAND WITH AN "X". THAT IS, IF XEDIT IS IN BRIEF MODE, PREFIXING A COMMAND WITH AN "X" WILL CAUSE THE COMMAND TO BE PROCESSED IN VERIFY MODE AND VICE VERSA. IT IS STRONGLY RECOMMENDED THAT VERIFY MODE BE USED IF ONE IS UNCERTAIN OF WHAT THE EDITOR IS DOING OR OF WHAT IS ON THE EDITED FILE. DURING TEXT EDITING, XEDIT KEEPS A POINTER TO THE LINE OF THE FILE CURRENTLY BEING PROCESSED. INITIALLY THIS POINTER IS POSITIONED AT THE FIRST LINE OF THE FILE. IF A COMMAND CAUSES THE EDITOR TO ADVANCE THE POINTER IN ORDER TO COMPLETE PROCESSING OF THE COMMAND, THE NEXT COMMAND WILL BEGIN PROCESSING THE FILE AT THE NEW POSITION. THAT IS, EACH COMMAND WILL NOT AUTOMATICALLY BEGIN PROCESSING THE FILE FROM THE FIRST LINE. IF THE EXECUTION OF A COMMAND CAUSES THE EDITOR TO REACH THE END OF INFORMATION, THE MESSAGE "END OF FILE" IS ISSUED. FURTHER PROCESSING OF THE COMMAND IS HALTED, AND THE POINTER IS POSITIONED AT THE TOP OF THE FILE. THE GENERAL COMMAND STRUCTURE CONTAINS FIVE FIELDS, NAMELY- PREFIX LINE COMMAND POSTFIX PARAMETER(S) OF THE FIVE FIELDS, ONLY THE COMMAND FIELD (AND SOMETIMES THE PARAMETER(S) FIELD) IS REQUIRED. THE REMAINING FIELDS ARE USED TO EITHER MOVE THE POINTER BEFORE THE COMMAND IS EXECUTED OR TO MODIFY THE EXECUTION OF THE COMMAND. IN ALL CASES, EACH COMMAND SEQUENCE MUST BEGIN IN COLUMN ONE AND MAY NOT CONTAIN ANY IMBEDDED BLANKS. THE PARAMETER(S) FIELD, HOWEVER, MUST BE SEPARATED FROM THE COMMAND OR POSTFIX FIELD BY EITHER A BLANK OR A COMMA IF THE FIRST CHARACTER OF THE FIRST ARGUMENT IS ALPHABETIC. EXTRA SPACES AROUND ARGUMENTS ARE PERMITTED. OF THE THREE REMAINING FIELDS, THE PREFIX AND POSTFIX FIELDS WILL BE DISCUSSED LATER. THE LINE FIELD IS USED TO POSITION THE EDITOR TO A DESIRED LINE NUMBER BEFORE EXECUTING THE COMMAND. THAT IS, IF ONE SPECIFIES A NUMBER BEFORE THE COMMAND, XEDIT WILL MOVE THE POINTER TO THE LINE IN THE FILE WHICH BEGINS WITH THAT LINE NUMBER EVEN IF THE LINE IS BEFORE THE CURRENT POINTER POSITION. IF THE DESIRED LINE CANNOT BE FOUND, XEDIT TERMINATES THE COMMAND AND ISSUES AN INFORMATIVE MESSAGE. ALSO, IF THE EDITOR IS IN "VERIFY" MODE, THE LINE WHERE THE SEARCH STOPPED IS ALSO PRINTED (THE FINAL POINTER POSITION). IF A TERMINAL INTERRUPT IS ENTERED WHILE XEDIT IS PRINTING OUT, XEDIT WILL STOP PROCESSING THE COMMAND IT IS ON AND REQUEST A NEW COMMAND (I.E. XEDIT WILL DISCARD ANY REMAINING COMMANDS LEFT IN EITHER THE Y/Z AND/OR DELIMITED COMMAND SEQUENCE). THE POINTER WILL BE POSITIONED AT, OR ONE LINE AFTER, THE LAST LINE PROCESSED. NOTE- IF USING THE INPUT MODE ESCAPE FEATURE (SEE THE "INPUT" COMMAND), XEDIT WILL RETURN TO INPUT MODE. THE FOLLOWING CONVENTIONS ARE OBSERVED IN THE XEDIT COMMAND DESCRIPTIONS. THE CHARACTER "/" DENOTES ANY CHARACTER (WITH THE EXCEPTION OF A NUMBER, COMMA, SPACE, OR ASTERISK) NOT FOUND IN THE STRING DELIMITED. FOR EXAMPLE- /DELIMITED STRING/ COULD BE WRITTEN AS- ZDELIMITED STRINGZ OR 'DELIMITED STRING' THE CHARACTERS $ AND $$ STAND FOR ANY POSITIVE INTEGER UNDER 100000. THEIR DEFAULT VALUES ARE 1 UNLESS OTHERWISE SPECIFIED. IN XEDIT COMMAND PROCESSING, THE CHARACTER * IN THE NUMERIC FIELD IN ANY COMMAND HAS THE NUMERIC VALUE 99999. THE ABBREVIATION (IF THERE IS ONE) FOR EACH COMMAND BELOW IS ENCLOSED IN BRACKETS NEXT TO THE COMMAND. - ====================================================================== INFORMATION COMMANDS. ====================================================================== - HELP,CMD [H] ======== ACTION- PRINTS HELP INFORMATION FOR THE SPECIFIC CMD. CMD MAY BE ANY XEDIT COMMAND OR COMMAND ABBREVIATION. IF CMD IS NOT SPECIFIED, AN EXPLANATION OF THE HELP COMMAND AND A LIST OF ALL XEDIT COMMANDS AND THEIR ABBREVIATIONS IS GIVEN. - EXPLAIN ======= ACTION- GIVES A MORE DETAILED EXPLANATION OF THE LAST XEDIT MESSAGE. THIS COMMAND MUST BE USED IMMEDIATELY FOLLOWING THE COMMAND WHICH ISSUED THE MESSAGE(S). SUBSEQUENT EXPLAIN COMMANDS WILL EXPLAIN PREVIOUS MESSAGES UNTIL THE MESSAGES ASSOCIATED WITH THE LAST NON-EXPLAIN COMMAND ARE EXHAUSTED. - PRINT $ [P] ======= ACTION- PRINTS $ LINES STARTING AT THE CURRENT POINTER POSITION. THE POINTER IS LEFT POSITIONED AT THE LAST LINE PRINTED. - ====================================================================== COMMANDS FOR REPOSITIONING THE POINTER. ====================================================================== THE FOLLOWING COMMANDS CAN BE USED TO QUICKLY ADVANCE TO ANOTHER LINE. ALL COMMANDS IN THIS SECTION LEAVE THE POINTER AT THE LAST LINE PRINTED (ASSUMING THAT "VERIFY" MODE IS IN EFFECT). - BOTTOM [B] ====== ACTION- MOVES THE POINTER TO THE LAST LINE IN THE CURRENT RECORD. - $ = ACTION- A NUMBER BY ITSELF CAUSES XEDIT TO SEARCH FOR A LINE WITH A LINE NUMBER EQUAL TO $. TO ACCOMPLISH THIS SEARCH, XEDIT INITIALLY LOOKS AT THE CURRENT POSITION TO DETERMINE IF THE POINTER HAS ALREADY MOVED PAST THE DESIRED LINE. IF THIS IS THE CASE, XEDIT WILL AUTOMATICALLY RETURN TO THE TOP OF THE FILE BEFORE BEGINNING THE SEARCH. ONCE THE SEARCH IS INITIATED, XEDIT CONTINUES TO SCAN UNTIL EITHER THE DESIRED LINE OR A LINE WHOSE LINE NUMBER IS GREATER THAT $ IS FOUND. THE POINTER IS LEFT AT THAT LINE. - LOCATE /STRING/ $ [L] ================= ACTION- STARTING AT THE CURRENT LINE, PERFORM A STRING SEARCH FOR THE $TH LINE CONTAINING THE STRING SPECIFIED. IN VERIFY MODE, EACH LINE CONTAINING THE DELIMITED STRING IS PRINTED. IF NO TERMINATING DELIMITER IS FOUND, A DELIMITER IS ASSUMED AFTER THE LAST NONBLANK CHARACTER OF THE COMMAND LINE AND AN INFORMATIVE MESSAGE IS PROVIDED. OTHER FORMS OF THE LOCATE COMMAND ARE- LOCATE /STRING1...STRING2/ $ [L] ============================ ACTION- LOCATES THE $TH LINE CONTAINING STRING1 WHICH IS FOLLOWED BY STRING2 SEPARATED BY ANY NUMBER OF INTERMEDIATE CHARACTERS. IN ALL OTHER WAYS THIS COMMAND IS THE SAME AS REGULAR LOCATE. LOCATE /STRING1---STRING2/ $ [L] ============================ ACTION- LOCATES THE $TH LINE CONTAINING STRING1 WHICH IS NOT FOLLOWED BY STRING2. IN ALL OTHER RESPECTS, THIS COMMAND IS IDENTICAL TO THE REGULAR LOCATE. LOCATE /---STRING2/ $ [L] ===================== ACTION- LOCATES THE $TH LINE WHICH DOES NOT CONTAIN STRING2. OTHERWISE, THIS FORM IS IDENTICAL TO THE REGULAR LOCATE. IF THE $ FIELD IS 0 (WHICH IS DIFFERENT THAT BLANK), THEN XEDIT WILL NOT ADVANCE THE POINTER IN ORDER TO LOCATE THE STRING(S). ADDITIONALLY (IF THE STRING IS NOT FOUND), XEDIT WILL IGNORE ANY REMAINING COMMANDS ON THAT PARTICULAR COMMAND LINE (E.G. A Y/Z COMMAND OR DELIMITED COMMAND SEQUENCE). THIS FEATURE APPLIES TO ALL COMMANDS INVOLVING STRING SEARCHES. FURTHERMORE, THE SCOPE OF ALL STRING SEARCHES CAN BE LIMITED BY THE USE OF THE "A" AND "W" POSTFIX CHARACTERS. IF ANY STRING SEARCH COMMAND IS SO MODIFIED, XEDIT WILL LIMIT THE COLUMNS IT SEARCHES ACCORDING TO THE POSTFIX (SEE THE WMARGIN COMMAND FOR INFORMATION ON SETTING THE WINDOWS). THE POSTFIX CHARACTERS PERFORM AS FOLLOWS- THE "A" POSTFIX CAUSES XEDIT TO REQUIRE THAT THE FIRST CHARACTER OF STRING1 RESIDE WITHIN THE WINDOW. THUS, THE FOLLOWING COMMANDS WILL CAUSE XEDIT TO LOCATE A LINE WHICH BEGINS WITH THE STRING "DOCUMENT". ?? WM,1,1 ?? LA/DOCUMENT/ THE "W" POSTFIX CAUSES XEDIT TO REQUIRE THAT ALL CHARACTERS OF BOTH STRINGS (WHERE THERE ARE TWO) TO RESIDE WITHIN THE WINDOW. CAUTION- SPECIFYING A STRING WHICH HAS MORE CHARACTERS THAN THE WINDOW WILL NEVER LOCATE THE DESIRED STRING. - NEXT $ [N] ====== ACTION- ADVANCES THE POINTER $ LINES FROM THE PRESENT POSITION. NEXT -$ [N] ======= ACTION- MOVES THE POINTER BACK $ LINES OR TO THE TOP OF THE FILE (WHICHEVER IS CLOSER). IF $ IS OMITTED OR EQUAL TO ZERO, NO MOVE IS PERFORMED. NOTE- THIS COMMAND IS CONSIDERABLY SLOWER THAT THE NORMAL NEXT. - TOP [T] === ACTION- MOVES THE POINTER TO THE TOP OF THE FILE. - ====================================================================== TAB CONTROL COMMANDS. ====================================================================== THE FOLLOWING COMMANDS ALL RELATE TO THE VARIOUS TAB STOPS. THE TAB STOPS ARE USED TO TABULATE WHENEVER THE TAB CHARACTER IS ENCOUNTERED IN THE DATA LINES REQUESTED BY THE "INSERT", "INSERTB", "REPLACE" COMMANDS OR WHEN THE USER IS IN "INPUT" MODE. - DEFTAB / [DT] ======== ACTION- DEFINES / AS A TAB CHARACTER. WHENEVER A / IS ENCOUNTERED IN A "REPLACE", "INSERT", "INSERTB" DATA LINE OR WHILE IN "INPUT" MODE, TABBING WILL OCCUR. THE AMOUNT OF TABBING IS CONTROLLED BY TAB STOPS (SEE "TAB" COMMAND). - TABS $ $ $ $ $ $ $ $ [TAB] ==================== ACTION - DEFINES THE VALUES GIVEN AS TAB STOPS. THE TAB VALUES MUST BE IN INCREASING VALUE, AND MUST BE BETWEEN 1 AND 160. THIS COMMAND WITHOUT ANY PARAMETERS CLEARS ALL TAB STOPS. ANY TAB STOP NOT DEFINED HAS NO EFFECT OF THE TABBING, AND ANY TAB CHARACTER GIVEN IN THE INPUT LINE WHICH OCCURS PAST THE LAST TAB STOP WILL BE RETAINED WITHIN THE LINE. THE DEFAULT TAB STOPS ARE 11, 18, AND 30 (COMPASS). SEE THE "DEFTAB" COMMAND FOR INSTRUCTIONS ON SETTING THE TAB CHARACTER. - LISTAB [LT] ====== ACTION- LISTS THE CURRENT TAB CHARACTER AND TAB STOPS. - ====================================================================== INSERTING AND REPLACING ENTIRE LINES. ====================================================================== THE COMMANDS DESCRIBED BELOW ARE USED TO INSERT SMALL QUANTITIES OF TEXT. TABBING IS AVAILABLE, AND THE LINE COUNT PARAMETER CAN BE OVERRIDDEN BY ENTERING A NULL CARRIAGE RETURN IN RESPONSE TO THE DATA PROMPT. - INSERT $ [I] ======== ACTION- INSERTS THE NEXT $ LINES OF INPUT AFTER THE CURRENT LINE. THE POINTER IS POSITIONED AT THE LAST LINE INSERTED. THE $ FIELD CAN BE OVERRIDDEN BY ENTERING A NULL LINE (I.E. A CARRIAGE RETURN BY ITSELF). - INSERTB $ [IB] ========= ACTION- INSERTS $ LINES OF INPUT BEFORE THE CURRENT POINTER POSITION. THIS COMMAND DOES NOT ALTER THE POINTER POSITION. ALSO, THE $ FIELD CAN BE OVERRIDDEN BY ENTERING A NULL CARRIAGE RETURN. - REPLACE $ [R] ========= ACTION- STARTING AT THE CURRENT POINTER POSITION, REPLACES $ LINES OF THE EDITED FILE WITH THE NEXT $ LINES OF INPUT. THE $ FIELD CAN BE OVERRIDDEN BY ENTERING A NULL CARRIAGE RETURN. THE POINTER IS LEFT POSITIONED AT THE LAST LINE REPLACED. - TOPNULL ======= ACTION- SAME AS THE TOP COMMAND EXCEPT THAT A BLANK LINE IS INSERTED AS THE FIRST LINE OF THE FILE. IF THE EDIT FILE HAS LEADING RECORD MARKS BEFORE THE FIRST TEXT LINE, THIS COMMAND CAN BE USED TO POSITION THE POINTER BEFORE THOSE MARKS. - ====================================================================== BULK INSERTION OF TEXT. ====================================================================== THE FOLLOWING COMMANDS ARE DESIGNED TO ALLOW ONE TO EASILY INSERT AN UNKNOWN QUANTITY OF TEXT INTO THE EDITED FILE. - INPUT / [A NULL LINE. I.E. A CARRIAGE RETURN] ======= ACTION- TYPES OUT "INPUT" AND TAKES ALL THE LINES OF INPUT UP TO THE NEXT NULL LINE AND INSERTS THEM INTO THE FILE AFTER THE PRESENT POINTER POSITION. AFTER A NULL LINE IS TYPED, THE EDITOR RESPONDS BY TYPING OUT "EDIT", POSITIONING THE POINTER AT THE LAST LINE INPUT. AT THIS TIME, THE USER HAS RETURNED TO COMMAND MODE. IN ADDITION, IF THE "INPUT /" FORM OF THE COMMAND IS USED, THEN XEDIT USES THE "/" AS THE "INPUT MODE ESCAPE CHARACTER". THAT IS, IF THIS CHARACTER IS USED AS THE FIRST CHARACTER OF AN INPUT LINE, XEDIT PASSES THE REMAINING CHARACTERS TO THE COMMAND PROCESSOR FOR EXECUTION. THE ESCAPE CHARACTER IS CLEARED ONLY UPON USAGE OF ANOTHER "INPUT" COMMAND WHICH DOES NOT HAVE THE "/". SPECIFICALLY, THE ESCAPE CHARACTER REMAINS IF FORCE IF ONE SUBSEQUENTLY ENTERS AND/OR EXITS "INPUT" MODE VIA THE "NULL LINE" METHOD. HOWEVER, XEDIT RESTRICTS THE USER TO ONLY THOSE COMMANDS WHICH DO NOT MOVE THE POINTER (WHILE THE USER IS "ESCAPED" FROM INPUT MODE). THIS MEANS THAT THE USER SHOULD USE THE "REPLACE" COMMAND RATHER THAN THE "DELETE" COMMAND IF HE WISHES TO VOID THE LAST ENTERED LINE. IF THE USER DOES WISH TO USE ONE OF THE RESTRICTED COMMANDS, XEDIT DOES ALLOW THE USER TO ENTER A MULTIPLE COMMAND STRING (SEE Y, Z AND/OR DELIMIT COMMAND) WHICH EXITS "INPUT" MODE (VIA THE "EDIT" COMMAND), EXECUTES THE DESIRED COMMAND, AND RE-ENTER "INPUT" MODE (VIA THE "INPUT /" COMMAND). BECAUSE OF THIS RESTRICTION, XEDIT DOES NOT ALLOW THE USE OF THE $ PARAMETER ON ANY COMMAND INVOLVING A STRING SEARCH. ADDITIONALLY, XEDIT WILL PERFORM THE STRING SEARCH AS IF A 0 (ZERO) WAS SPECIFIED. NOTE- THE USER WILL ALWAYS RETURN TO INPUT MODE. THUS, IF THE COMMAND ABORTS, OR UPON SUCCESSFUL COMPLETION OF THE COMMAND, THE USER WILL RETURN TO INPUT MODE. (BATCH USERS - SEE THE "EDIT" COMMAND.) - EDIT ==== ACTION- THIS COMMAND IS THE COMPLEMENT TO THE "INPUT" COMMAND. WHEN USED WITH THE "INPUT MODE ESCAPE CHARACTER", THE COMMAND GIVES THE USER AN ALTERNATIVE METHOD OF EXITING INPUT MODE. THE COMMAND TYPES OUT "EDIT", AND EXITS INPUT MODE. IF THE USER IS NOT IN INPUT MODE, THIS COMMAND IS IGNORED. WARNING FOR BATCH USERS. THE "INPUT" AND "EDIT" COMMANDS ARE THE ONLY WAY THAT INPUT MODE CAN BE USED. XEDIT WILL ABORT THE BATCH USER IF HE DOES NOT SPECIFY AN ESCAPE CHARACTER, OR FORGETS TO EXIT FROM INPUT MODE. - READ FNAME1 FNAME2 FNAME3 ========================= ACTION- READS THE LOCAL FILES FNAME1 FNAME2 ETC. INTO THE EDITED FILE AFTER THE CURRENT POINTER POSITION. THE FILES ARE READ STARTING WITH THE FIRST RECORD, CONTINUING UNTIL EITHER AN EMPTY RECORD OR AN END OF FILE (OR INFORMATION) IS SENSED. ANY RECORD MARKS EMBEDDED WITH THE "READ" OPERATION ARE COPIED TO THE WORKING FILE. AFTER EACH READ, THE POINTER IS POSITIONED AT THE LAST LINE READ. EACH FILE IS REWOUND BEFORE AND AFTER THE READ OPERATION. IF, FOR SOME REASON, THE FILE CANNOT BE READ (E.G. IT DOES NOT EXIST OR HAS AN ILLEGAL FILE NAME) PROCESSING OF THE COMMAND HALTS AT THAT POINT, NO MORE FILES ARE READ, AND AN INFORMATIVE MESSAGE IS ISSUED. - READP FNAME1 FNAME2 FNAME3 ... FNAMEN ===================================== ACTION- SAME AS THE "READ" COMMAND EXCEPT THAT THE FILES ARE ACCESSED FROM THE PERMANENT FILE AREA. THE FILES CAN BE EITHER INDIRECT OR DIRECT ACCESS FILES AND ARE RETURNED AFTER THE READ OPERATION. NOTE- XEDIT OBTAINS THE FILES UNDER A SCRATCH NAME, THIS MEANS THAT DIRECT ACCESS FILES MAY OCCASIONALLY NOT BE ACCESSABLE IF ALREADY ATTACHED. - ====================================================================== COMMANDS THAT COPY TEXT. ====================================================================== THE COMMANDS IN THIS SECTION ARE USED TO COPY PORTIONS (OR ALL) OF THE EDITED FILE TO EITHER LOCAL FILES OR TO DIRECT ACCESS FILES CURRENTLY ATTACHED IN WRITE MODE. - COPY FNAME $ ============ ACTION- COPIES $ LINES FROM THE EDITED FILE TO FILE "FNAME". THE POINTER IS POSITIONED AT THE LAST LINE COPIED. IN VERIFY MODE, EACH LINE COPIED IS PRINTED. THE FIRST COPY ONTO A FILE CAUSES IT TO BE REWOUND BEFORE COPYING BEGINS. CONSECUTIVE COPIES ONTO THE SAME FILE ADD INFORMATION TO THAT FILE. NOTE, XEDIT MUST BE ABLE TO WRITE ON FILE "FNAME". SPECIFICALLY, THIS MEANS THAT DIRECT ACCESS FILES MUST BE IN WRITE MODE AND THAT INDIRECT ACCESS FILES MUST NOT BE EXECUTE ONLY OR LOCKED. THERE ARE TWO SPECIAL FILE NAMES WHICH ARE ALLOWED BY XEDIT. THE FIRST IS "OUTPUT". THIS NAME CAUSES XEDIT TO PRINT THE CONTENTS OF ALL THE LINES BETWEEN THE CURRENT POINTER POSITION AND THE FINAL LINE OF THE COPY. THIS OPTION IS ESPECIALLY DESIGNED TO BE USED WITH THE STRING SEARCH OPTIONS DESCRIBED LATER. THE OTHER RESERVED NAME IS "NULL". THIS NAME CAUSES XEDIT TO EFFECTIVELY COPY THE LINES TO A NULL FILE (I.E. TO THROW THE LINES AWAY). THIS FEATURE IS EXPRESSLY DESIGNED TO BE USED WITH THE "COPYD" COMMAND. AS MENTIONED EARLIER, THIS COMMAND ALSO ALLOWS STRING SEARCHES TO BE INCLUDED IN THE TERMINATION REQUIREMENT. IF A STRING FIELD IS USED, XEDIT WILL COPY ALL THE LINES FROM THE CURRENT POINTER POSITION TO THE $TH OCCURANCE OF THE STRING MATCH OR TO THE "END OF FILE", WHICHEVER OCCURS FIRST. (FOR INFORMATION REGARDING THE STRING SEARCHES, SEE THE "LOCATE" COMMAND.) THE ALTERNATE FORMS ARE- COPY FNAME /STRING/ $ COPY FNAME /STRING1...STRING2/ $ COPY FNAME /STRING1---STRING2/ $ COPY FNAME /---STRING2/ $ - FILE FNAME MODE [F] =============== ACTION- PLACES A COPY OF THE EDITED FILE ON EITHER A LOCAL FILE AND/OR A PERMANENT FILE AND CONTINUES EDITING. THE POINTER IS POSITIONED AT THE TOP OF THE FILE UPON COMPLETION OF THIS COMMAND. IN ALL OTHER RESPECTS, THIS COMMAND FUNCTIONS IDENTICALLY TO THE "END" COMMAND - THUS, SEE THE "END" COMMAND FOR A DETAILED EXPLANATION OF THE PARAMETERS. - ====================================================================== COMMANDS THAT DELETE ENTIRE LINES. ====================================================================== - DELETE $ [D] ======== ACTION- DELETES $ LINES STARTING WITH THE CURRENT LINE. THE POINTER IS POSITIONED AFTER THE LAST LINE DELETED. IF THE USER IS IN VERIFY MODE, THE DELETED LINES ARE PRINTED. ADDITIONALLY, ONE CAN SPECIFY VARIOUS STRING OPTIONS. IF A STRING IS SPECIFIED, XEDIT WILL DELETE $ LINES WHICH MATCH THE STRING SPECIFICATIONS. INFORMATION REGARDING STRING SEARCHES IS DETAILED UNDER THE "LOCATE" COMMAND. THE ADDITIONAL FORMS ARE- DELETE /STRING/ $ [D] DELETE /STRING1...STRING2/ $ [D] DELETE /STRING1---STRING2/ $ [D] DELETE /---STRING2/ $ [D] - COPYD FNAME $ ============= ACTION- COPIES $ LINES TO FILE "FNAME" WHILE DELETING THE COPIED LINES. THE POINTER IS POSITIONED AFTER THE LAST LINE DELETED. FOR MORE INFORMATION REGARDING THIS COMMAND, SEE THE "COPY" COMMAND. - ====================================================================== COMMANDS THAT CHANGE INDIVIDUAL LINES. ====================================================================== - ADD $ [A] ===== ACTION- TAKES THE NEXT LINE OF INPUT AND APPENDS IT TO $ LINES STARTING AT THE CURRENT POINTER POSITION. IF THE LENGTH OF THE NEW LINES EXCEED 160 CHARACTERS, AN INFORMATIVE MESSAGE IS ISSUED AND THE LINE IS TRUNCATED TO THAT LENGTH. - CHANGE /STRING1/STRING3/ $ [C] ========================== ACTION- CHANGES ALL OCCURANCES OF STRING1 TO STRING3 IN THE FIRST $ LINES (STARTING AT THE POINTER) WHERE STRING1 OCCURS. STRING1 AND STRING3 ARE ARBITRARY STRINGS OF CHARACTERS AND MAY BE OF DIFFERENT LENGTH. IF THE LAST DELIMITER OF THE CHANGE COMMAND IS OMITTED, A DELIMITER IS ASSUMED AFTER THE LAST NON-BLANK CHARACTER OF THE COMMAND LINE AND A WARNING MESSAGE IS ISSUED. IF THE CHANGED LINE BECOMES LONGER THAN 160 CHARACTERS, IT IS TRUNCATED AND AN INFORMATIVE MESSAGE IS ISSUED. OTHER FORMS OF THE CHANGE COMMAND ARE- CHANGE /STRING1//$ [C] ========================== ACTION- IDENTICAL TO THE REGULAR CHANGE, EXCEPT THAT STRING1 IS REMOVED COMPLETELY. CHANGE //STRING3/ $ [C] =================== ACTION- CHANGES THE NULL STRING TO STRING3. BY DEFINITION, XEDIT ASSUMES THE PRESENCE OF A NULL STRING IMMEDIATELY BEFORE THE FIRST CHARACTER WHICH IS AVAILABLE FOR SEARCHING. NORMALLY THIS CHARACTER IS THE FIRST CHARACTER OF THE LINE BUT CAN BE CHANGED VIA THE "WMARGIN" AND THE USE OF EITHER THE "A" OR "W" POSTFIX CHARACTERS. FOR EXAMPLE- ?? WMARGIN 10,10 ?? PRINT THIS IS AN EXAMPLE. ?? C//NOTE- / NOTE- THIS IS AN EXAMPLE. ?? CW//(INSERT)/ NOTE- THI(INSERT)S IS AN EXAMPLE. CHANGE /STRING1...STRING2/STRING3/ $ ==================================== ACTION- SIMILAR TO THE REGULAR CHANGE COMMAND EXCEPT THAT ALL CHARACTERS BETWEEN (AND INCLUDING) STRING1 AND STRING2 ARE CHANGED TO STRING3. - CHANGES /STRING1/STRING3/ $ [CS] =========================== ACTION- PERFORMS MUCH LIKE THE REGULAR CHANGE COMMAND EXCEPT THAT THE $ FIELD TAKES ON A DIFFERENT MEANING. IN THE REGULAR CHANGE COMMAND, ALL OCCURANCES OF STRING1 WHICH OCCUR IN $ LINES ARE CHANGED; IN THE CHANGES COMMAND, THE FIRST $ OCCURANCES OF STRING1 ARE CHANGE. ALL FORMS AVAILABLE UNDER THE REGULAR CHANGE COMMAND ARE AVAILABLE UNDER THE CHANGES COMMAND. - DLBLANKS $ [DLB] ========== ACTION- DELETES ANY LEADING BLANKS FROM THE NEXT $ LINES INCLUDING THE CURRENT POINTER POSITION. BLANK LINES ARE DELETED ENTIRELY. - MODIFY [M] ====== ACTION- MODIFIES THE LINE CURRENTLY POINTED AT. THE MODIFY DIRECTIVES ARE AS FOLLOWS- DIRECTIVE EXPLANATION --------- ------------ ^STRING# CAUSES THE STRING OF CHARACTERS BETWEEN THE ^ AND THE NEXT # TO BE INSERTED BEFORE THE CHARACTERS POINTED TO BY THE ^. AN ^ OR & WITHIN THE STRING IS TREATED AS A REGULAR CHARACTER. IF THE CLOSING # IS NOT SPECIFIED, XEDIT INSERTS THE REMAINDER OF THE LINE AS IF A # WAS SPECIFIED AFTER THE LAST NONBLANK CHARACTER. THERE ARE TWO EXCEPTIONS. THE COMBINATION ^# CAUSES A # TO BE INSERTED BEFORE THE CHARACTER POINTED TO BY THE ^, AND AN ^ AS THE LAST CHARACTER OF THE DIRECTIVES CAUSES A BLANK TO BE INSERTED. # (WHEN NOT THE FIRST # AFTER AN ^) CAUSES THE CHARACTER ABOVE IT TO BE DELETED. & REPLACES THE CHARACTER ABOVE IT WITH A SPACE. (SPACE) A SPACE BELOW A CHARACTER LEAVES IT UNCHANGED. ANY OTHER CHARACTER REPLACES THE CHARACTER ABOVE IT. THE CHARACTER # CORRESPONDS TO A SHARP (UPPER CASE 3) ON A TTY AND CDC 713 TERMINALS. THE CHARACTER ^ CORRESPONDS TO AN UP ARROW (UPPER CASE N) ON TTY TERMINALS OR A CARAT ON CDC 713 TERMINALS. THE CHARACTER & CORRESPONDS TO AN AMPERSAND (UPPER CASE 6) ON TTY AND CDC 713 TERMINALS. EXAMPLE- PRINT ORIGINAL LINE ?? PRINT 10 THIS STRING TO BE MORTIFD ISSUE MODIFY COMMAND ?? MODIFY XEDIT PRINTS THE LINE 10 THIS STRING TO BE MORTIFD THE DIRECTIVES LINE- ? ^ IS THE# D# ^IE VERIFICATION 10 THIS IS THE STRING TO BE MODIFIED - OCTCHANGE OCT1 OCT2 $ [OC] ===================== ACTION- CONVERTS OCT1 AND OCT2 FROM OCTAL INTO DISPLAY CODE STRING, THEN EXECUTES THE NORMAL CHANGE COMMAND. EACH DISPLAY CODE CHARACTER MUST BE REPRESENTED BY AN EVEN NUMBER OF OCTAL DIGITS. AN ODD NUMBER OF DIGITS OR A NON-OCTAL CHARACTER WITHIN AN OCTAL PARAMETER IS ILLEGAL. CHANGING CHARACTERS TO 00 CODES MAY PRODUCE UNPREDICTABLE (OR UNDESIRABLE) RESULTS. THE OCT2 FIELD MAY BE NULL CAUSING THE OCCURANCES OF OCT1 TO BE DELETED. TO ENTER A NULL FIELD, ENTER "OCTCHANGE OCT1,,$". - QMOD $ [QM] ====== ACTION- PRINTS OUT COLUMN NUMBERS, TAKES MODIFY DIRECTIVES FROM THE NEXT LINE OF INPUT, AND USES THEM TO MODIFY $ LINES STARTING AT THE POINTER POSITION. THE POINTER IS NOT MOVED IF THE DIRECTIVES LINE IS BLANK. - YQMOD $ [YQM] ======= ACTION- SAME AS QMOD EXCEPT THAT THE COLUMN NUMBERS ARE NOT PRINTED. - ====================================================================== LINE NUMBER COMMANDS. ====================================================================== THE FOLLOWING ASSUMPTIONS APPLY TO THE "ADDLN", "ADDLNS", "DELETELN", AND "REPLACELN" COMMANDS. 1.) THE MESSAGE "END OF FILE" IS ISSUED AFTER THE EDITOR SUCCESSFULLY COMPLETES PROCESSING OF THE COMMAND. 2.) THE POINTER IS POSITIONED AT THE TOP OF THE FILE BOTH BEFORE AND AFTER THE LINE NUMBERS ARE PROCESSED. 3.) IF THE LINE NUMBERS GET TOO LARGE (GREATER THAN 99999), THE FILE IS RESTORED TO THE STATE IT WAS IN BEFORE THE COMMAND WAS ISSUED. AN INFORMATIVE MESSAGE IS ISSUED, AND THE POINTER IS POSITIONED AT THE TOP OF THE FILE. 4.) THESE COMMANDS SHOULD NOT BE USED WHEN EDITING PROGRAMS WRITTEN IN BASIC. 5. DEFAULT VALUES ARE- $=1 $$=1. - ADDLN $ $$ [ALN] ========== ACTION- ADDS LINE NUMBERS TO THE ENTIRE FILE. THE FIRST LINE NUMBER WILL BE $ AND THE INCREMENT WILL BE $$. - ADDLNS $ $$ [ALNS] =========== ACTION- ADDS LINE NUMBERS FOLLOWED BY ONE SPACE TO THE ENTIRE FILE. THE FIRST LINE NUMBER WILL BE $ AND THE INCREMENT WILL BE $$. - DBADL $ [DBL] ======= ACTION- STARTING AT THE CURRENT POINTER POSITION, SEARCHES FOR AND DELETES $ BAD LINES. A BAD LINE IS ONE WHICH DOES NOT BEGIN WITH A LINE NUMBER. IN VERIFY MODE, ALL DELETED LINES ARE PRINTED. - DELETELN [DLN] ======== ACTION- DELETES LINE NUMBERS FROM THE ENTIRE FILE. THIS COMMAND FOLLOWED BY THE "DLBLANKS" COMMAND CAN BE USED TO REMOVE LINE NUMBERS AND THE FOLLOWING BLANKS. CAUTION- IF THIS SEQUENCE IS USED, LINES CONTAINING ONLY LINE NUMBERS WILL BE DELETED ENTIRELY. - FBADL $ [FBL] ======= ACTION- STARTING AT THE CURRENT POINTER POSITION, SEARCHES FOR $ BAD LINES. A BAD LINE IS ONE WHICH DOES NOT BEGIN WITH A LINE NUMBER. IN VERIFY MODE, EACH BAD LINE FOUND IS PRINTED. - REPLACELN $ $$ [RLN] ============== ACTION- REPLACES LINE NUMBERS ON THE ENTIRE FILE. THE FIRST LINE NUMBER WILL BE $ AND THE INCREMENT WILL BE $$. - $ = ACTION- SEARCHES THE EDITED FILE FOR A LINE WHICH BEGINS WITH THE LINE NUMBER $. IF THE LINE NUMBER OF THE CURRENT POINTER POSITION IS GREATER THAN $, THE FILE WILL BE REWOUND AND THE SEARCH BEGUN FROM THE TOP. THE SEARCH STOPS ON EITHER THE DESIRED LINE, OR THE LINE AFTER THE POSITION WHERE THE DESIRED LINE NUMBER SHOULD BE LOCATED. IN VERIFY MODE, THE FINAL POSITION IS PRINTED. - ====================================================================== COMMANDS THAT PROCESS RECORD/FILE MARKS. ====================================================================== WITH THE EXCEPTION OF THE "DEOF" AND "DEOR" COMMANDS, XEDIT COMMANDS MAINTAIN ALL RECORD AND FILE MARKS WHICH APPEAR ON THE EDITED FILE. THE FOLLOW COMMANDS ALLOW ONE TO ADD, REMOVE OR TO CHANGE THE AUTOMATIC VERIFICATION OF THESE MARKS. - DEOF $ [DF] ====== ACTION- DELETES THE NEXT $ END-OF-FILE (EOF) MARKS FROM THE EDITED FILE. - DEOR $ [DR] ====== ACTION- DELETES THE NEXT $ END-OF-RECORD (EOR) MARKS FROM THE EDITED FILE. - TEOF / ====== ACTION- TOGGLES THE PRINTING OF THE MESSAGE --EOF--. ALTERNATE FORMS OF THIS COMMAND ARE- TEOF + ENABLES PRINTING. TEOF - DISABLES PRINTING. - TEOR / ====== ACTION- TOGGLES THE PRINTING OF THE MESSAGE --EOR--. ALTERNATIVE FORMS OF THIS COMMAND ARE- TEOR + ENABLES PRINTING. TEOR - DISABLES PRINTING. - WEOF [WF] ==== ACTION- WRITES AN END-OF-FILE MARK ON THE EDITED FILE BEFORE THE LINE AT THE CURRENT POINTER POSITION. NOTE- DUE TO THE DESIGN OF THE OPERATING SYSTEM, THE SYSTEM WILL OFTEN FORCE AN END-OF-RECORD MARK TO APPEAR BEFORE THE FILE MARK. - WEOR [WR] ==== ACTION- WRITES AN END-O-RECORD MARK ON THE EDITED FILE BEFORE THE LINE AT THE CURRENT POINTER POSITION. - ====================================================================== MARGIN CONTROL COMMANDS. ====================================================================== THE FOLLOWING COMMANDS RELATE TO THE VARIOUS MARGINS. WITH THE EXCEPTION OF THE "WMARGIN" COMMAND, THESE COMMANDS HAVE NO EFFECT ON ANY NON-MARGIN COMMAND. SPECIFICALLY, SETTING THE "RMARGIN" WILL NOT AUTOMATICALLY TRUNCATE THE EDITED FILE. - WMARGIN $ $$ [WM] ============ ACTION- SETS THE LEFT AND RIGHT WINDOW MARGINS FOR USE BY THE "A" AND "W" POSTFIX CHARACTERS. THE MARGINS MUST BE ARRANGE SUCH THAT 1 <= LEFT MARGIN <= RIGHT MARGIN <= 160 FOR THE USE OF THE "A" AND "W" POSTFIX CHARACTERS, SEE THE "LOCATE" COMMAND. - RMARGIN $ [RM] ========= ACTION- SETS THE RIGHT MARGIN SETTING FOR USE BY THE "FINDLL" AND "TRUNCATE" COMMANDS. THE RIGHT MARGIN MUST BE BETWEEN 10 AND 160 CHARACTERS, AND INITIALLY IS 160. - FINDLL $ [FLL] ======== ACTION- FINDS $ LONG LINES STARTING AT THE CURRENT POINTER POSITION. A LONG LINE IS DEFINED AS A LINE WHICH CONTAINS MORE CHARACTERS THAN THE CURRENT "RMARGIN" SETTING. THIS COMMAND DOES NOT MODIFY ANY LINES. - TRUNCATE $ [TRUNC] ========== ACTION- TRUNCATES THE NEXT $ LINES TO "RMARGIN" NUMBER OF CHARACTERS STARTING WITH THE CURRENT LINE. - ====================================================================== GETTING OUT OF XEDIT. ====================================================================== - END FNAME MODE [E] ============== ACTION- ENDS THE EDITING AND PLACES THE EDITED FILE WITH ALL THE CORRECTIONS ON FILE FNAME AND STORES THE FILE ACCORDING TO THE MODE SPECIFIED. THE VARIOUS MODES ARE- SAVE OR S - EDITED FILE WILL BE A NEW PERMANENT FILE REPLACE OR R - EDITED FILE WILL REPLACE AN EXISTING FILE LOCAL OR L - EDITED FILE WILL BE BECOME A LOCAL FILE COPY OR C - EDITED FILE WILL BE COPIED ONTO FILE FNAME ANY COMBINATION OF THE MODES CAN BE SPECIFIED PROVIDING THAT THE SHORT FORMS ARE USED. FOR EXAMPLE, SOME OF THE LEGAL COMBINATIONS ARE- RL - A COMBINATION OF THE REPLACE AND LOCAL MODES CS - A COMBINATION OF THE COPY AND SAVE MODES NOTE- IF THE C AND L MODES ARE SPECIFIED TOGETHER, XEDIT WILL AUTOMATICALLY CANCEL THE L MODE. IF THE MODE IS NOT RECOGNIZED OR OMITTED, XEDIT DETERMINES THE DEFAULT FROM THE TYPE OF FILE INVOLVED. IF THE FILE IS A DIRECT ACCESS FILE, THE COPY MODE IS ASSUMED; IF THE FILE IS INDIRECT OR LOCAL, THE LOCAL MODE IS ASSUMED. NOTE- WHILE BOTH THE COPY AND LOCAL MODES END IN THE SAME RESULT IF THE FILE IS INDIRECT, THE COPY MODE TAKES CONSIDERABLY MORE TIME. IF THE FILE NAME IS OMITTED, "EDITFIL" FROM THE XEDIT COMMAND IS ASSUMED. CAUTION - IF FNAME IS LOCKED, EXECUTE-ONLY, OR IN SOME OTHER WAY HAS WRITE PERMISSION REMOVED, THEN XEDIT VOIDS THE USE OF THE LOCAL AND COPY MODES. ALSO, XEDIT VOIDS THE LOCAL MODE IF THE FILE IS A DIRECT ACCESS FILE. THIS MEANS THAT THE BASIC END COMMAND (I.E. "END" WITH NO PARAMETERS) WILL NOT WORK IF THE INCOMING FILE HAS BEEN LOCKED. IN THIS CASE, XEDIT WILL ISSUE AN INFORMATIVE MESSAGE; IT IS STRONGLY RECOMMENDED THAT THE USER IMMEDIATELY USE THE "EXPLAIN" COMMAND FOR A DETAILED EXPLANATION. - QUIT FNAME MODE [Q] =============== ACTION- SAME AS THE END COMMAND. - STOP ==== ACTION- ABORTS THE EDITOR WITHOUT WRITING CORRECTIONS ANYWHERE. THIS METHOD OF EXITING IS CONSIDERABLY FASTER THAN THE END AND QUIT COMMANDS. NOTE- IF XEDIT IS CALLED FROM WITHIN A JOB CARD STREAM OR PROCEDURE FILE, USING THIS COMMAND WILL CAUSE THE SYSTEM TO ABORT XEDIT, THUS CAUSING NORMAL EXIT CARD PROCESSING TO TAKE EFFECT. - ====================================================================== ENTERING MULTIPLE COMMANDS/DATA ON A LINE. ====================================================================== THE FOLLOWING COMMANDS AND FORMS EACH ALLOW THE USER TO SPECIFY COMMANDS AND/OR DATA ON ONE LINE. WHILE THIS DOES NOT SAVE IT THE CPU TIME REQUIRED TO PROCESS THE COMMANDS, THIS DOES OFTEN SIGNIFICANTLY SAVE IN REAL TIME. IN ALL CASES, THE FOLLOWING ACTIONS OCCUR- 1. IF THE + PREFIX CHARACTER IS SPECIFIED ON A COMMAND, XEDIT ASSUMES TH THE TEXT REQUIRED TO FINISH THE COMMAND FOLLOWS THE COMMAND AS THE NEXT DELIMITED ITEM IN THE LIST. THE ONLY EXCEPTION TO THE RULE IS THE INPUT COMMAND WHICH ALWAYS OBTAINS ITS TEXT FROM THE PRIMARY INPUT SOURCE. 2. IF XEDIT ENCOUNTERS ANY COMMAND ERROR (OTHER THAT A MISSING DELIMITER ON A STRING FIELD), XEDIT WILL ABORT ALL REMAINING COMMANDS AN RETURN TO THE PRIMARY INPUT SOURCE FOR THE NEXT COMMAND. NOTE- IF THE USER IS IN INPUT MODE, AND HAS BEEN USING THE ESCAPE FEATURE TO ENTER COMMANDS, XEDIT WILL RETURN TO INPUT MODE AND WILL EXPECT THE NEXT INPUT TEXT LINE. 3. IF THE 0 OPTION IS USED ON A STRING SEARCH, AND THE STRING IS NOT FOUND, XEDIT WILL IGNORE ONLY THE REMAINING COMMANDS ON THAT PHYSICAL INPUT LINE. (NOTE- THE Y/Z COMMAND PARAMETER IS CONSIDERED ONE PHYSICAL INPUT LINE). I.E. IF THE FOLLOWING SEQUENCE IS USED- ?? DEL; ?? PRINT;WHERE;Y$TOP$LOCATE/ZZZ/0$END;STOP THEN XEDIT WILL EITHER END OR ABORT DEPENDING ON THE PRESENCE OF THE STRING "ZZZ" IN THE FIRST LINE OF THE FILE BEING EDITED. - DELIMIT / [DEL] ========= ACTION- SETS THE CHARACTER / AS THE DELIMITER TO BE USED TO SEPARATE LINES OF INPUT. / MAY BE ANY CHARACTER EXCEPT SPACE, COMMA, OR ALPHABETICS. IF NO ARGUMENT IS SPECIFIED, THE DELIMITER CHARACTER IS CLEARED. FOR EXAMPLE- ?? DEL ; (DEFINE ; AS THE DELIMITER CHARACTER) (INSERT THE NEXT 7 INPUT LINES) ?? +A;J(10);+I3;LINE1;LINE2;LINE3;XQ IF THE DELIMIT COMMAND IS USED FROM WITHIN A "Y" OR "Z" COMMAND, THE EFFECT OF THE DELIMIT COMMAND IS SUPPRESSED UNTIL THE Y OR Z COMMAND SEQUENCE IS EXITED. IN OTHER WORDS, THE INITIAL DELIMITER ON THE Y/Z COMMAND REMAINS IN FORCE THROUGHOUT THE EXECUTION OF THE Y/Z COMMAND SEQUENCE. THE DELIMITER CHARACTER MAY ALSO BE SET VIA THE XEDIT CONTROL CARD (SEE THE BEGINNING OF THIS WRITEUP). - Y /COMMAND1/COMMAND2/ ... /COMMANDN =================================== ACTION- TAKES THE SPECIFIED LIST OF COMMANDS AND/OR DATA AND ENTERS IT INTO THE Y/Z COMMAND BUFFER AND THEN EXECUTES THAT BUFFER. THE NORMAL RULES REGARDING COMMAND ENTRY APPLY TO THE COMMANDS CONTAINED IN THE Y/Z LIST AND IF ANY COMMAND VIOLATES THE RULES, OR IS UNRECOGNIZED, THE REMAINING COMMANDS ARE IGNORED AND XEDIT RETURNS TO THE MAIN INPUT FILE FOR THE NEXT COMMAND. SPECIFICALLY, THIS ALLOWS COMMANDS AND DATA TO BE INTERMIXED WITHIN THE Y LIST AND ALLOWS ALL FEATURES AVAILABLE VIA THE DELIMIT COMMAND TO APPLY TO THE Y COMMAND LIST. - Z /COMMAND1/COMMAND2/ ... /COMMANDN =================================== ACTION- SAME AS THE "Y" COMMAND EXCEPT THAT THE COMMANDS ARE LISTED BEFORE BEING PROCESSED. HOWEVER, DATA ENTERED VIA THE "Z" COMMAND LIST ARE NOT LISTED. - ====================================================================== MISCELLANEOUS COMMANDS. ====================================================================== - BRIEF [B] ===== ACTION- PUTS THE EDITOR INTO BRIEF MODE. IN BRIEF MODE, AUTOMATIC VERIFICATION OF COMMANDS IS SUPPRESSED. OTHER FORMS OF THIS COMMAND ARE- BRIEF+ TURNS ON BRIEF MODE (SAME AS BRIEF) BRIEF- TURNS OFF BRIEF MODE (SAME AS VERIFY) - NOBELLS ======= ACTION- REMOVES THE BELLS FROM THE XEDIT ERROR MESSAGES. THIS COMMAND HAS NO EFFECT IF THE BELLS HAVE ALREADY BEEN REMOVED VIA EITHER THE NOBELLS COMMAND OR BY BEING IN BATCH MODE. THERE IS NO REVERSE OF THIS OPERATION. - RESTORE [REST] ======= ACTION- REMOVES ALL MODIFICATIONS MADE TO THE FILE SINCE THE POINTER WAS LAST AT THE TOP OF THE FILE. THE POINTER IS MOVED TO THE TOP OF THE FILE FOR THE FOLLOWING REASONS- 1. THE TOP OR TOPNULL COMMAND IS ENCOUNTERED. 2. THE ^ (UP ARROW) PREFIX CHARACTER IS ENCOUNTERED. 3. A NEXT- COMMAND IS ENCOUNTERED. 4. OR A LINE NUMBER SEARCH REQUIRING REVERSE MOTION IS ENCOUNTERED. - TRIM ==== ACTION- TOGGLES THE "TRIM" FLAG. IF THE TRIM FLAG IS SET, THE XEDIT WILL IGNORE ALL TRAILING SPACES WHEN DOING ANY STRING SEARCH (E.G. THE "LOCATE" OR "CHANGE" COMMANDS). BY DEFAULT, THIS FLAG IS NOT SET. OTHER FORMS OF THIS COMMAND ARE- TRIM+ SETS THE TRIM FLAG REGARDLESS OF ITS PREVIOUS STATE. TRIM- CLEARS THE FLAG REGARDLESS OF ITS PREVIOUS STATE. - VERIFY [V] ====== ACTION- PUTS THE EDITOR INTO "VERIFY" MODE. IN VERIFY MODE ALL LINES OPERATED UPON WILL BE TYPED OUT. ALSO, WHEN AN EOR (WHICH IS NOT THE LAST EOR ON THE EDITED FILE) IS ENCOUNTERED, THE MESSAGE "--EOR--" IS OUTPUT. (THIS IS ALSO TRUE FOR END-OF-FILE MARKS). THE EDITOR IS INITIALLY IN VERIFY MODE. OTHER FORMS OF THIS COMMAND ARE- VERIFY+ SETS THE VERIFY FLAG (SAME AS VERIFY) VERIFY- CLEARS THE VERIFY FLAG (SAME AS BRIEF) - WHERE [W] ===== ACTION- PRINTS THE CURRENT LINE COUNT, I.E. THE NUMBER OF THE LINE (FROM THE FIRST LINE OF THE FILE) THE POINTER IS POINTING TO. - . $ === ACTION- ADVANCES THE POINTER $ LINES AND EXECUTES THE LAST COMMAND AGAIN. IF THE $ IS NULL, 1 IS ASSUMED; IF 0, THEN NO ADVANCE WILL TAKE PLACE. - - $ === ACTION- ADVANCES THE POINTER $ LINES AND EXECUTES THE LIST OF COMMANDS CONTAINED IN THE Y/Z COMMAND BUFFER (SEE THE Y OR Z COMMANDS). IF THE $ IS NULL, 1 IS ASSUMED; IF 0, THEN NO ADVANCE WILL TAKE PLACE BEFORE EXECUTING THE BUFFER. - ====================================================================== PREFIX CHARACTERS. ====================================================================== THE FOLLOWING PREFIXES (THE FIRST FIELD IN THE XEDIT COMMAND SYNTAX) ARE OPTIONAL ON ANY COMMAND. THEY MAY APPEAR IN ANY ORDER AND ARE EXECUTED IMMEDIATELY. IF A PREFIX CHARACTER IS DUPLICATED, XEDIT WILL PERFORM THE OPERATION DESCRIBED THAT MANY TIMES. - X***** ====== ACTION- CHANGES THE VERIFICATION STATUS OF THE COMMAND ***** FROM THE STATUS SET BY THE BRIEF OR VERIFY COMMANDS. - +***** ====== ACTION- CAUSES THE TEXT REQUIRED BY COMMAND ***** TO BE OBTAINED FROM THE NEXT FIELD IN EITHER A DELIMITED OR Y/Z COMMAND SEQUENCE RATHER THAN THE PRIMARY INPUT SOURCE. - /***** ====== ACTION- ADVANCE THE POINTER 1 LINE BEFORE PROCESSING COMMAND *****. - ^***** ====== ACTION- MOVE THE POINTER TO THE TOP OF THE FILE BEFORE PROCESSING THE COMMAND *****. - ====================================================================== POSTFIX CHARACTERS. ====================================================================== - *****W ====== ACTION- SETS THE WINDOW OPTION FOR ANY COMMAND INVOLVING A STRING SEARCH. WHEN THE WINDOW OPTION IS SELECTED, XEDIT REQUIRES THAT ALL CHARACTERS IN THE STRING SEARCH RESIDE WITHIN THE WINDOW MARGINS (SEE THE WMARGIN COMMAND). ADDITIONALLY, THIS OPTION IMPLIES THE SELECTION OF THE TRIM OPTION (SEE THE TRIM COMMAND). WARNING- UNEXPECTED RESULTS MAY OCCUR IF THIS OPTION IS USED WITH THE "OCTCHANGE" COMMAND. - *****A ====== ACTION- SETS THE ANCHOR OPTION FOR COMMAND ***** (ONLY HAS EFFECT IF COMMAND ***** INVOLVES A STRING SEARCH). WHEN THE ANCHOR OPTION IS SELECTED, XEDIT REQUIRES THAT THE FIRST CHARACTER OF THE PATTERN STRING RESIDE WITHIN THE WINDOW (SEE THE WMARGIN COMMAND). WARNING- UNEXPECTED RESULTS MAY OCCUR IF THIS OPTION IS USED WITH THE "OCTCHANGE" COMMAND. - ====================================================================== MESSAGES FROM XEDIT. ====================================================================== IN THE FOLLOWING LIST OF MESSAGES, ANYTHING ENCLOSED IN BRACKETS IS A DESCRIPTION OF WHAT APPEARS THERE DURING EXECUTION. ALSO, THIS LIST IS ONLY ACCURATE WITH THOSE MESSAGES WITH XEDIT PRODUCES. VARIOUS SYSTEM MESSAGES HAVE BEEN CONTAINED IN THIS LIST (AND ARE SO NOTED). WHERE THESE OCCUR, A PROBABLE CAUSE HAS BEEN SUGGESTED ALTHOUGH THEY MAY OCCUR FOR OTHER REASONS. MESSAGE EXPLANATION ------- ------------ ABORTED XEDIT HAS ABORTED (IN RESPONSE TO THE "STOP" COMMAND). ARGUMENT ERROR ISSUED FOR A VARIETY OF REASONS, INCLUDING- 1. IN A COMMAND INVOLVING A STRING SEARCH. IF A STRING FIELD IS REQUIRED AND IT IS MISSING. NOTE THAT THE FORMS "/.../" AND "/---/" DO NOT CONSTITUTE LEGAL STRING FIELDS. 2. IN A COMMAND INVOLVING A STRING CHANGE. IF THE SECOND STRING FIELD IS REQUIRED AND IT IS MISSING. 3. IF ENTERING COMMANDS VIA THE INPUT MODE ESCAPE CHARACTER (SEE THE INPUT COMMAND) AND A PARAMETER OTHER THAN 0 IS USED ON ANY COMMAND WHICH MIGHT POSSIBLY MOVE THE POINTER. SOME OF THE AFFECTED COMMANDS ARE- "CHANGE", "LOCATE", AND "REPLACE". 4. RELATED TO POINT 3. THIS RESTRICTION ALSO APPLIES TO ANY PREFIX CHARACTER WHICH MOVES THE POINTER, AND TO THE LINE NUMBER FIELD OF THE COMMANDS. 5. IF THE ARGUMENTS ON A COMMAND ARE ILLEGAL OR MISSING. 6. IN OCTCHANGE, IF THE SPECIFIED OCTAL NUMBER(S) DO NOT CONTAIN OCTAL OR AN EVEN NUMBER OF DIGITS. BAD TEXT LINE ENCOUNTERED ISSUED WHEN XEDIT DETECTS THAT THE LAST WORD BEFORE A FILE MARK (EOR/EOF/EOI) DOES NOT CONTAIN A PROPER LINE TERMINATOR. THIS WILL USUALLY OCCUR FOR THE FOLLOWING REASONS. 1. THE FILE YOU ARE TRYING TO EDIT IS A BINARY OR OTHER NON-TEXT TYPE FILE. 2. THE FILE BEING EDITED HAS BEEN CREATED BY USING THE TELEX "TEXT" COMMAND; AND, UPON LEAVING TEXT MODE, THE FILE HAS NOT BEEN PACKED. THIS ERROR CAUSES AN IMMEDIATE ABORT OF XEDIT, ALL FILES ARE RESTORED. THIS CONDITION CAN BE REMEDIED BY EITHER USING THE PACK COMMAND, OR BY USING THE COPYCF COMMAND (WHERE APPROPRIATE). BAD FILE NAME ISSUE IF THE SPECIFIED FILE NAME CONTAINS BAD CHARACTERS OR IS OVER 7 CHARACTERS -OR- THE FILE NAME IS MISSING -OR- THE FILE NAME IS RESERVED BY XEDIT. BATCH ABORT - COMMAND ERROR. A SYNTAX ERROR (EXCLUDING THE DELIMITER ERROR) WAS ENCOUNTERED WHILE XEDIT IS OPERATING UNDER BATCH MODE. XEDIT ABORTS RATHER THAN CONTINUING TO EXECUTE, POSSIBLY RUINING THE FILE. BATCH ABORT - RETRY COUNT EXCEEDED. WHILE OPERATING UNDER BATCH MODE, XEDIT ALLOWS ONLY ONE RETRY WHEN TRYING TO OBTAIN THE NAME OF THE EDIT FILE. I.E., THIS MESSAGE WILL BE ISSUED IN PLACE OF THE SECOND OCCURANCE OF THE MESSAGE "NAME EDIT FILE". ADDITIONALLY, XEDIT WILL ABORT. BATCH MODE ABORT. END OF RECORD ENCOUNTERED. WHILE OPERATION IN BATCH MODE - AN EOR, EOF OR EOI WAS ENCOUNTERED ON THE PRIMARY INPUT FILE. CANNOT EDIT EXECUTE ONLY FILES. THE SPECIFIED EDIT FILE IS EXECUTE ONLY. XEDIT WILL QUERY THE USER FOR THE NAME OF ANOTHER FILE. COMMAND NOT VALID ISSUES IN INPUT MODE IF THE DESIRED COMMAND WILL ALWAYS MOVE THE POINTER (E.G. "DELETE", "END", ETC.). ISSUED IN CREATION MODE IF THE DESIRED COMMAND ASSUMES THE PRESENCE OF A TEXT LINE. CREATION MODE IS AUTOMATICALLY EXITED ONCE THE INITIAL LINE OF TEXT HAS BEEN INSERTED INTO THE FILE. COMMAND STACKING ERROR AN ATTEMPT WAS MADE TO RECURSIVELY CALL AN INPUT MEDIUM. THIS ERROR NORMALLY OCCURS WHEN ONE TRIES TO EXECUTE THE Y/Z COMMAND BUFFER FROM WITHIN THE Y/Z COMMAND SEQUENCE (SEE THE Y/Z COMMANDS FOR RULES REGULATING THIS) -OR- BY TRYING TO USE THE INPUT MODE ESCAPE CHARACTER AFTER STACKING INPUT COMMANDS. DELIMITER THE CLOSING DELIMITER IN A DELIMITED STRING FIELD IS MISSING. THIS MESSAGE IS SHOULD BE CONSIDERED AS A CAUTION. EDIT INPUT MODE HAS BEEN EXITED. THIS MESSAGE IS ALSO ISSUED ANYTIME THE EDIT COMMAND IS USED, REGARDLESS OF WHETHER THE USER IS IN INPUT MODE. EMPTY OR FILE NOT FOUND THE SPECIFIED EDIT FILE IS NOT LOCAL TO THE USER, ELSE THE FILE IS NULL. --EOR-- AN END-OF-RECORD MARK HAS BEEN READ FROM THE EDIT FILE, AND, UNLESS A "DEOR" COMMAND IS BEING PROCESSED, IT HAS BEEN RETAINED. --EOF-- AN END-OF-FILE MARK HAS BEEN READ FROM THE EDIT FILE, AND, UNLESS A "DEOF" COMMAND IS BEING PROCESSED, IT HAS BEEN RETAINED. END OF FILE THE END-OF-INFORMATION HAS BEEN ENCOUNTERED ON THE EDIT FILE. PROCESSING OF THE LAST COMMAND CEASES, AND THE POINTER IS MOVED TO THE TOP OF THE FILE. ERROR IN XEDIT ARGUMENTS SELF-EXPLANATORY. FILE FUNCTION ILLEGAL THE SPECIFIED OPTION ON AN "END", "FILE", OR "QUIT" COMMANDS IS NOT LEGAL FOR THE FILE SPECIFIED. THIS INCLUDES- 1. USING THE "L" OPTION WITH A DIRECT ACCESS FILE. 2. USING THE "C" OPTION WHEN THE SPECIFIED FILE CANNOT BE WRITTEN ON. [FILE] IS A LOCAL FILE THE EDITED FILE WAS WRITTEN ONTO THE LOCAL FILE [FILE]. FILE NAME CONFLICT THE SAME FILE NAME(S) HAVE BEEN USED MORE THAN ONCE ON THE XEDIT CONTROL CARD. FILE NOT XEDITABLE THE SPECIFIED EDIT FILE DOES NOT CONTAIN A LEGAL LINE, BUT IS NOT EMPTY. ONE INSTANCE OF THIS WOULD BE A FILE CONTAINING MORE THAN ONE END-OF-RECORD (EOR) MARK, BUT WITH NO DATA CONTAINED WITHIN THE RECORDS. [FILE] REPLACED THE EDITED FILE WAS WRITTEN TO THE PERMANENT FILE AREA REPLACING AN EXISTING INDIRECT ACCESS FILE. [FILE] REWRITTEN [FILE] WAS REWOUND AND THE EDITED FILE WAS WRITTEN ONTO IT. IF [FILE] IS A DIRECT ACCESS FILE, THIS HAS UPDATED THE PERMANENT COPY OF THE FILE. IF [FILE] IS AN INDIRECT ACCESS FILE, ONLY THE LOCAL COPY OF THE FILE HAS BEEN UPDATED. [FILE] SAVED THE EDITED FILE WAS WRITTEN TO THE PERMANENT FILE AREA AS AN INDIRECT ACCESS FILE. [FILE] TOO LONG (SYSTEM MESSAGE) XEDIT ATTEMPTED TO SAVE OR REPLACE A FILE THAT WAS LONGER THAN THE MAXIMUM INDIRECT ACCESS FILE SIZE ALLOWED. ILLEGAL DELIMITER CHARACTER THE DELIMITER SPECIFIED VIA THE XEDIT CONTROL CARD (THE CHARACTER IMMEDIATELY FOLLOWING THE "." OR ")") IS AN ILLEGAL DELIMITER CHARACTER. ILLEGAL PARAMETER 1. AN ATTEMPT WAS MADE TO DEFINE AN ALPHABETIC COMMAND DELIMITER. 2. THE COMMAND HAS DATA AFTER THE LAST PARAMETER. 3. AN ATTEMPT WAS MADE TO SET THE VALUE OF RMARGIN TO LESS THAT 10 OR GREATER THAT 160. 4. THE SPECIFIED TAB STOPS ARE NOT IN INCREASING ORDER AND/OR ARE NOT BETWEEN 1 AND 160. INPUT XEDIT HAS ENTERED INPUT MODE. LINE NUMBER NOT FOUND, COMMAND NOT EXECUTED THE SPECIFIED LINE NUMBER PREFIX SPECIFIED A LINE NUMBER WHICH IS NOT IN THE FILE. LINE NUMBER TOO LARGE THE NEW LINE NUMBER IN THE "ADDLN", "ADDLNS", OR "REPLACELN" COMMANDS HAS EXCEEDED 99999. LOCAL FILE ERROR THE ATTEMPT TO MAKE THE SPECIFIED FILE LOCAL HAS FAILED. THIS ERROR SHOULD NEVER OCCUR - IF IT DOES, PLEASE NOTIFY A CONSULTANT. NAME EDIT FILE THE SPECIFIED EDIT FILE IS NOT AVAILABLE FOR EDITING. THUS, XEDIT IS ASKING FOR THE NAME OF ANOTHER NAME TO EDIT. NOTE- THE MESSAGE ISSUED IMMEDIATELY BEFORE THIS IS REASON WHY THE SPECIFIED FILE IS NOT AVAILABLE. NO SUCH COMMAND THE COMMAND IS ILLEGAL OF AN IMPROPER SEPARATOR WAS USED AFTER THE COMMAND. STRING NOT FOUND THE SPECIFIED STRING COULD NOT BE LOCATED ON THE CURRENT LINE AND THE 0 OPTION WAS USED (SEE THE "LOCATE" COMMAND). XEDIT 3.1.00 THIS IS THE XEDIT VERSION NUMBER. IT IS ISSUED IMMEDIATELY AFTER THE XEDIT CONTROL CARD IS HONORED AND MAY BE CANCELLED BY THE USE OF THE *NH* PARAMETER ON THE CONTROL CARD. THE FIRST NUMBER INDICATES THE NUMBER OF TIMES XEDIT HAS UNDERGONE MAJOR REVISION. THE SECOND NUMBER IS THE NUMBER OF TIMES EXTERNAL MODIFICATIONS HAVE BEEN MADE (SINCE THE LAST MAJOR REVISION), AND THE THIRD NUMBER IS THE NUMBER OF INTERNAL MODIFICATIONS SINCE THE LAST EXTERNAL MODIFICATION. THUS, THIS DOCUMENTATION IS ACCURATE UNTIL VERSION 3.1.X. YOU DELETED THE ENTIRE FILE XEDIT CANNOT FIND A LINE AT WHICH TO POSITION THE POINTER. THE ORIGINAL EDIT FILE REMAINS UNCHANGED AND THE EDITOR STOPS. ====================================================================== ADVANCED THOUGHTS AND TOPICS. (NOT FOR BEGINNERS). ====================================================================== FROM VARIOUS FEEDBACK AND QUESTIONS RECEIVED FROM VARIOUS USERS, IT HAS BEEN REALIZED THAT A SHORT SECTION ON HINTS WOULD BE WELCOMED. THIS SECTION CONTAINS COMBINATIONS OF COMMANDS WHICH ALLOW XEDIT TO PERFORM OPERATIONS NOT EASILY SEEN FROM THE INDIVIDUAL COMMANDS. ADDITIONALLY, THIS SECTION CONTAINS VARIOUS HINTS ON DECREASING THE CPU TIME REQUIRED BY XEDIT AND MISCELLANEOUS NOTES WHICH MAY BE OF INTEREST TO THE ADVANCED USER. MAKING BETTER USE OF THE CPU. 1. PERHAPS THE EASIEST WAY TO SAVE CPU COSTS IS TO MAKE ALL CHANGES TO THE FILE PROGRESSIVELY. THAT IS, AVOID ALL USAGE OF THE "NEXT-" COMMAND WHEN AT ALL POSSIBLE. IT IS ALMOST AS EFFICIENT TO MAKE TWO PASSES THROUGH A FILE AS IT IS TO USE THE "NEXT-" COMMAND. 2. ESPECIALLY IF EDITING LARGE FILES, CONSIDERABLE SAVINGS CAN BE HAD IN BACKING UP IN THE FILE IF ONE USES THE "WHERE" COMMAND (TO DETERMINE THE PRESENT LOCATION) AND THEN USES THE "TOP" AND "NEXT $" COMMANDS TO TRAVEL TO THE DESIRED LINE (THE $ IS THE LINE NUMBER DESIRED -1) RATHER THAN THE EASIER (IN SOME CIRCUMSTANCES) SEQUENCE OF "TOP" AND "LOCATE/STRING/". (STRING SEARCHES ARE AROUND 5 TIMES SLOWER THAN THE "NEXT" COMMAND). EDITING ON AN UNSTABLE SYSTEM OR HOW TO RECOVER MODIFICATIONS IF TERMINATED. TO DO THIS SIMPLY REQUIRES SOME KNOWLEDGE OF HOW XEDIT WORKS. BASICALLY, XEDIT TAKES YOUR FILE AND TRANSFERS THE INFORMATION (ALONG WITH ANY MODIFICATIONS) TO ONE OF TWO SCRATCH FILES. AFTER THE INITIAL PASS, XEDIT THEN TRANSFERS THE INFORMATION BETWEEN THE TWO SCRATCH FILES. WHEN XEDIT ENDS, THE SCRATCH FILES ARE EITHER RENAMED OR THE INFORMATION IS COPIED TO THE DESIRED FILE. THUS, TO RE-ENTER XEDIT IF XEDIT TERMINATES DUE TO A SYSTEM ABORT, TRACK LIMIT OR OTHER UNEXPECTED ERROR, TAKE A LOOK AT THE SCRATCH FILES "SCRA" AND "SCRB". NORMALLY (ASSUMING THAT YOU ARE ADDING MORE TEXT THAT REMOVING) THE MOST UP-TO-DATE COPY OF THE FILE IS USUALLY THE LONGER FILE. NOTE- NOT ALL YOUR CHANGES WILL BE ON THIS FILE (IT WILL BEHAVE AS IF A RESTORE COMMAND HAD BEEN ISSUED) AND IT WILL HAVE TO BE RENAMED BEFORE RE-ENTERING XEDIT. IF EDITING ON A HIGHLY UNSTABLE SYSTEM, ONE CAN ASSURE THAT HE WILL HAVE THE FILES "SCRA" AND "SCRB" IF HE DEFINES, AND ATTACHES, THEM PRIOR TO EACH XEDIT RUN.) QUICK CREATION OF A TEXT FILE. WITH THE ADDITION OF THE INPUT AND EDIT COMMANDS, ALONG WITH THE INPUT MODE ESCAPE CHARACTER, ONE CAN EASILY CREATE HIS INITIAL FILE USING THE NORMAL TEXT MODE. THE FIRST FEW LINES ON THIS FILE SHOULD CONTAIN XEDIT DIRECTIVES INITIALIZING THE TAB CHARACTER AND ETC. THEN THE COMMAND INPUT (WITH THE ESCAPE) IS INPUTTED AND THE DESIRED TEXT IS ENTERED. FOLLOWING THIS IS THE EDIT COMMAND FOLLOWED BY THE END COMMAND. AFTER PACKING THE FILE, THE XEDIT COMMAND IS USED ALONG WITH THE PROPER OPTIONS. AN EXAMPLE OF THIS FOLLOWS. /NEW,FILE /TEXT ENTER TEXT MODE. DT% TABS 7 INPUT- %PROGRAM ZZZ (INPUT,OUTPUT) 10%I = 0 ... REMAINDER OF TEXT ... %END -EDIT END (BREAK/INTERRUPT) EXIT TEXT MODE. /PACK PACK COMPLETE. /XEDIT,C,C,I=FILE. XEDIT 3.1.0 INPUT EDIT C IS A LOCAL FILE / COPYING, MOVING AND DITTOING TEXT. WHILE XEDIT DOES NOT HAVE ONE COMMAND WHICH WILL AUTOMATICALLY MOVE TEXT, IT DOES HAVE TWO VERY USEFUL PRIMATIVES WHICH ALLOW TEXT MOVEMENT TO BE DONE WITHOUT TOO MUCH BOTHER. THE COMMANDS ARE "COPY"/"COPYD" AND "READ". BY THE USE OF THESE TWO COMMANDS, ONE CAN, WITHOUT TOO MUCH BOTHER, COPY A PORTION OF TEXT TO A SCRATCH FILE AND READ IT IN ELSEWHERE. ADDITIONALLY, ONE CAN PROCEED TO RE-READ IT IN AGAIN, THUS PERFORMING A DITTO FUNCTION. THE "COPYD" COMMAND ALLOWS THE TEXT TO BE REMOVED FROM THE EDIT FILE FOR INSERTION LATER. REPEATING SEQUENCES OF COMMANDS. OFTEN IT IS DESIRED TO HAVE A SEQUENCE OF COMMANDS REPEAT OVER AN ENTIRE FILE. BY USING THE Y OR Z COMMANDS, ONE CAN SAVE THE RE-TYPING OF ALL THE COMMANDS, BUT MUST STILL REPEATEDLY ENTER THE "-" COMMAND. BY MAKING USE OF THE 0 OPTION ON STRING SEARCHES (SEE THE LOCATE COMMAND), ONE CAN (CAREFULLY) CONSTRUCT HIS OWN COMMAND SEQUENCES. REMEMBERING THAT THE 0 OPTION CAUSES XEDIT TO IGNORE THE REMAINING COMMANDS ON A LINE IF THE DESIRED STRING IS NOT ON THE CURRENT LINE, ONE CAN CONSTRUCT COMPLEX LOOPS WITHIN A Y OR Z COMMAND. THE SUCCESS OF THESE LOOPS REQUIRES CAREFUL THOUGHT AND THE TERMINATION TEST MUST BE THOUGHT OUT CAREFULLY. IMPROPERLY CODING A LOOP CAN CAUSE XEDIT TO EFFECTIVELY HANG UNTIL TIME LIMIT. THE EXAMPLE SHOWN ASSUMES THAT THE STRING "ABCD" IS NOT CONTAINED IN THE FIRST LINE OF THE FILE. REPLACING ALL LINES CONTAINING THE STRING "ABCD" BY THE LINE "FOUND ONE" CAN BE DONE BY- ?? TOP ?? Y$LOCATE/ABCD/$L/ABCD/0$+REPLACE$FOUND ONE$- THE COMMAND OPERATES AS FOLLOWS- 1. ADVANCE THE POINTER TO THE STRING "ABCD". (IF THIS COMMAND ENCOUNTERS THE END-OF-FILE, RETURN TO THE FIRST LINE OF THE FILE WHICH DOES NOT CONTAIN THE STRING "ABCD". 2. CHECK TO SEE IF THE CURRENT LINE CONTAINS THE STRING "ABCD". THIS TEST WILL FAIL ONLY WHEN THE END-OF-FILE HAS BEEN ENCOUNTERED (AND THE Y COMMAND WILL BE EXITED). 3. AS THE STRING "ABCD" HAS BEEN FOUND, CONTINUE TO THE "REPLACE" COMMAND. THE DATA FOR THE REPLACE (SINCE THE + PREFIX IS NOT USED) IS THE NEXT PHRASE ON THE LINE (OR "FOUND ONE"). 4. EXECUTE THE LAST Y/Z COMMAND (THE "-" COMMAND). THIS LOOPING WORKS SINCE THE - COMMAND IS THE LAST COMMAND ON THE Y/Z LINE. IF THE COMMAND WAS LOCATED IN ANY OTHER PART OF THE LINE, XEDIT WOULD ISSUE THE ERROR "COMMAND STACKING ERROR". ====================================================================== THE FOLLOWING IS A SAMPLE USE OF SOME OF THE COMMANDS IN XEDIT. SOME COMMENTS APPEAR IN BRACKETS NEXT TO NOTABLE LINES. NEW,SAMPLE [CREATE A NEW FILE CALLED SAMPLE] READY AUTO 00100 PROGRAM(INPUT,OUTPUT 00110 PRINT,*INPUT YOUR EYE QUEUE* 00120 READ,IQ 00130 J=SQRT(FLOAT(IQ)) 00140 IP=10HPRIME 00150 DO I=2,J 00160 IF(MOD(IQ,I).EQ.0)IP=10HNOT PRIME 00170 10 CONTINUE 00180 PRINT 400,IQ,IP 00190 400 FORMAT(*YOR IQ - *I10* IS *A10*) 00200 STOP $ 00210 *DEL* SAVE READY XEDIT [CALL UP XEDIT] XEDIT 3.1.0 [XEDIT ACKNOWLEDGES] ?? C/YIR/YOUR/ [TRY TO FIX MISSPELLING] END OF FILE ["YIR" COULD NOT BE FOUND] ?? C$YOR$YOUR [TRY TO FIX MISSPELLING] DELIMITER [THE CLOSING $ IS MISSING] 00190 400 FORMAT(*YOUR IQ - *I10* IS *A10*) [VERIFICATION] ?? 115MODIFY [ATTEMPT TO MODIFY LINE NUMBERED 115] LINE NUMBER NOT FOUND, COMMAND NOT EXECUTED 00120 READ,IQ [LINE 115 WAS NOT FOUND, POINTER AT 120] ?? X190M [MODIFY LINE NUMBERED 190 (IN BRIEF MODE)] 00190 400 FORMAT(*YOUR IQ - *I10* IS *A10*) ? # [REMOVE THE EXTRA *] ?? C/$/$ END/ [ADD THE END STATEMENT] 00200 STOP $ END [VERIFICATION] ?? TOP [SET THE POINTER TO THE TOP] ?? A [ADD THE TRAILING ")"] ? ) 00100 PROGRAM(INPUT,OUTPUT) [VERIFICATION] ?? M 00100 PROGRAM(INPUT,OUTPUT) ^ TEST # [ADD THE PROGRAM NAME] 00100 PROGRAM TEST (INPUT,OUTPUT) [VERIFICATION] ?? XQ [QUIT EDITING (IN BRIEF MODE)] REPLACE [ADD THE CORRECTIONS TO THE PERM. FILE] READY FORTRAN READY RNH [RUN THE CORRECTED PROGRAM] INPUT YOUR EYE QUEUE ? 175 YOUR IQ - 175 IS NOT PRIME STOP RUN COMPLETE. ========== END OF XEDIT DOCUMENTATION ==========