..



                     MEDIT COMMAND REVISIONS

                                                       REVISION
COMMAND                                                    DATE
================================================================


..
MEDIT - START UP - ALTERNATE PROFILES 850729 Medit is initiated with the command "Medit" and the file name. Because Medit is a program file, the name can be changed to anything the user chooses. Since the internal command for entering a file is "e," the start up command could be changed to "e" also by renaming medit.exe to e.exe. The command to enter a file from DOS would then be: e c:\path\filename.ext When Medit enters a file it sets the function keys according to a file called "profile." The user may specify an alternate profile by appending the name of the file to the normal syntax at the dos level. File to enter profile ---------- ---------- The command syntax is: e \03\15\023 \00\03\017 In this case the commands in file 01 03 017 will process the contents of file 03 15 023.
..
NOTE ---- Macros called as alternate profiles should have a tabsoff command, particularly data base files that may be sorted by Supersort. Files without this command that are subsequently processed by Supersort will fail, because the tabs have been compressed after saving or filing to the disk. Morris later made tabsoff the default condition, so we are no longer worried about it.
..
E - OPEN FILES WITHIN MEDIT AND SCROLLS EDIT CHAIN After Medit opens a file, the e command issued from the command line or from a macro can open additional files. When more than one file is in memory, Medit will scroll through the edit chain by switching from one file to another when the e command is assigned to a function key without a parameter that specifies a particular filename. When the function key with e assigned is pressed, Medit opens the last file opened, and then the next until the original file is opened again. Switching between files is called "scrolling the edit chain."
..
MACROS 090119 @macro @0m3gg @{filename} @\00\03\033 Invokes a macro during an Medit session. See also "-GOTO", and "-GOSUB". Macros are files containing a sequence of standard medit commands entered in column 1 of the file. Macros can form composite commands that enhance program performance. They can process data in one or more files.
..
On 090119 Morris developed a new Java version of Medit to address expanded memory of 64-bit technology. This new version requires macro calls using @filename to have the first character in the filenmae begin with letters rather than numbers, thus... @w8888 @gf33g2db
..
Original Medit processes @macros with the filename beginning with either numbers or letters.
..
Typical examples of this function would be formatting a text document with margins, headers, page numbers and print codes; reading a search specification from the screen or a particular file, searching a data base, extracting a record and entering it in a specified file in a desired format.
..
Commands that require a numerical parameter such as Up 1 or 10A on the command window (immed 10a, for macros) may have the number specified with a counter from 0 299, such that the current value in the counter will become the value used to execute the command (see Counter, below).
..
Macros can be nested for as many levels as desired. A macro can specify the file to be processed, and can process itself. When the @ command is issued from the command line it will process the current file as a macro. If no file is specified within the macro, the file from which the macro was called is processed. Within a macro, processing can be directed to any file desired with the e command, and data may be passed between files with the cut and paste or get commands.
..
Temporary files can be created to perform a particular function and then be erased using purge or quit if the file has not been saved to disk. Files on disk can be deleted from within macros using the Dos /c .... command to access DOS, execute a specified command and return to the macro.
..
After a macro has been invoked it is no longer on the edit chain, accessible with the e command alone through a function key. It can be edited by entering the full file name including the path from the command line.
..
File & Quit in macros When either of these commands are encountered in a macro, processing stops, and no following commands in a macro will run at any level. Therefore, the "-exit" and "purge" commands should be used to close a file after it has been processed and is no longer needed, and if processing in the macro is to continue on other matters. See for example file 026021.
..
MACRO COMMENTS 850717 Medit recognizes a blank in column 1 as a comment. It will also accept a * in column 1 to identify comments.
..
We have adopted a convention in macro file 011 assigned to F1 Tab that "compresses" macro files by converting conditionals and line commands to absolute addresses and removes blank lines to increase the speed of performance, to remove single "*" commands. Therefore to use * for a place filler use a double ** or *% or any convenient symbol.
..
DOS PATH PREFIXES DOS path name conventions are supported when calling files from the DOS level and from within Medit. During an editing session the E command issued from the command line or by a PF key assignment, may designate a DOS path name.
..
Files may, also, be called by the Medit macro @ function using Dos path names. This is very helpful in allowing particular macros that perform a single general function to be located in separate directories.
..
DOS "SET" Set profile=\01\me\profile 850130 This DOS command can be used to establish a path so Medit can be called from any subdirectory and the profile will be called as well. The directory where medit and profile are located must be part of the system path. Normally this would be included in the Autoexec.bat file so the feature is available when the system comes on line.
..
To work adequately, macro files assigned to function keys should be listed with the full path name. Otherwise an error message will be given if medit is used from an alternate directory and such a function key is called.
..
DOS /C ______________ 850717 100306 This command allows accessing DOS and executing a command, then returning to Medit. It permits using Supersort as a subset of Medit, since after the command is executed, control is passed back to Medit. A batch file can be created in an Medit macro which contains the Supersort routine. After execution, another command can delete the batch file so everything is cleaned up.
..
On 100306, new Medit java version with unlimited memory eliminates /c parameter. All "dos" calls now only execute cmd batch file ops, and require exit command at the end to close the dos session and return control to user in Medit/SDS.
..
Former commands like.... dos /c dir c:\sd\08\00101\00 > stufq1 Now have to be issued like... dos c:\sd\td\so.cmd ... so.cmd can be in any directory, and can contain any any dos commands, like... dir c:\sd\08\00101\00 > stufq1 exit Performing dos calls in c:\sd\td\ ...enables routine daily maintainance to delete all temporary files once a day.
..
HOME The seven (7) key on the numeric key pad. Moves the cursor to the Command line and executes a command.
..
PFE END The one (1) key on the numeric key pad executes a command and leaves the cursor at the current position.
..
= 841025 Use on CMD> line to repeat prior command. Use in macros to generate loop functions in conjunction with the REPEAT and @ commands. This is largly unnecessary now because of the -goto, -label and -if commands.
..
? 850316 Use on CMD> to edit prior command. Entered on the command line, the last command issued is repeated on the command line, but not executed until a or key is struck. Only applies to commands specifically entered from the command line. This is very helpful because commands issued with function keys can be reissued without having to interrupt data entry by moving the cursor to the command line. However commands such as change, search, get, and e usually have a long string associated with them which must be revised. Restoring the command string after execution allows correcting with minimal editing rather than starting over. This greatly reduces the chance of repeating the same error or making a different error.
..
ZONE (Z) ZONE n1 n2, or Z n1 n2 Sets the file columns within which the following commands operate: OVERLAY (OO); SEARCH; CHANGE; JUSTIFY. Only data within the specified columns will be subject to the command issued. See also LINECNT.
..
MARGIN (M) MARGIN n1 n2, or M n1 n2 Sets the file columns for the justify command, and sets the target for the overlay command. The right margin setting is unimportant when used with the overlay command. See also LINECNT.
..
OO (OVERLAY BLOCK) Use on Cmd Wndw to block overlay text in conjunction with ZONE and MARGIN settings, and the target command. It copies data from one set of line and column values to a target location. The usefulness of this command has been diminished by the CUT & PASTE command series for routine movement of text data. However, it is still better than CUT & PASTE in macros because it does not create a separate, temporary storage file and therefore, uses less memory. oo command was eliminated in new Medit Java.
..
O (OVERLAY LINE) Use on Cmd Wndw to block overlay single line of text similar to OO command.Can use in a macro to create standard text or symbol entry such as a comment block. oo command was eliminated in new Medit Java.
..
REPEAT n 841025 Used in a macro to create recurring nested macros n times. Processing continues at the line below the = line at the end of n or an error message. Therefore, by setting n greater than the possible number of occurrences, the effective result simulates a loop. The errorcnt must be turned on when this command is issued because the command looks for an error at the bottom of the file to cease operation and revert to the next line in the macro. If the errorcnt is set to off, the Repeat command will not find the error message and so will not stop. Similarly, if the errorcnt is on, but the macro called by the Repeat command contains an addcnt or other command that continually sets the counter to 0, the Repeat will not stop. The command has been largly replaced with the loop commands: -goto, -label, -if. repeat n command was eliminated in new Medit Java.
..
R n (LINE REPEAT N TIMES) Use on Cmd Wndw to repeat a line of text n times.
..
RR n (BLOCK REPEAT N TIMES) Use on Cmd Wndw to repeat a block of text n times.
..
IC (INS_CUR) n (INSERT CURSOR) See also page 29 in the Medit manual.
..
INS_DOWN n ID (INS_DOWN) n (INSERT CURSOR DOWN) 840715 Assign to a function key for entering continuous vertical symbols, useful for creating network schematics. To assign a symbol apply the values for n shown on page 3-36 of the IBM GUIDE TO OPERATIONS manual. (see also page 29 of the Medit manual)
..
JJ (BLOCK JUSTIFY TEXT) 840415 REV 860619 In macros, use: immed jj. Use on Cmd Wndw to justify text between margin settings. This command works best to simply insure all text is placed between two margins. The first JJ parameter can be given a value to indent the first line of the paragraph by the specified amount. E.G. 5JJ this will indent the first line of the paragraph 5 columns. Command was modified to work with a space command that sets single space, double space, etc.. See also RAGON, RAGOFF and SPACE.
..
JC (JUSTIFY CENTER) Use on command window to enter text between margin settings.
..
JL (JUSTIFY LEFT) Use on command window to left justify text between margin settings. This command can be used with a macro to move all text strings to the left margin regardless of initial column position.
..
JR (JUSTIFY RIGHT) Use on command window to right justify text between margin settings. It is generally used to positon the file name, date, and page number for the second page of letters, on the right margin.
..
CMD2ON (CMD2OFF) 841025 REV 880528 Turns the Command Window on and off. In off status, the full 80 characters of the screen can be used for data entry, similar to standard wordprocessing programs. The revision on 880528 improved screen management of the window. Preiously, if files in memory had different Command Window status, the screen would scramble when scrolling between files. This was fixed so the screen will not scramble.
..
TOP 841025 Makes line 1 in the file the top line on the screen and places the cursor at column position 1 line 1. This is useful in macros since the cursor must be on a data line to run certain commands. A composite command can be created to place the cursor on any screen column using the top command with a Loc_cur command.
..
BOTTOM 841025 Makes last line in the file line 22 on the screen and places the cursor at column position 1 on the last line. This is useful in macros to accomplish commands such as overlays and block deletes, repeats, etc on the entire file.
..
PAD1 Use with JJ command to eliminate leading blanks.
..
NOPAD1 During a session where Pad1 has been invoked, this command cancels the command.
..
STATS REV 860607 Use on CMD> to invoke screen statistics. The 860607 revision added a reverse video blinking warning when a target or dd is entered on the command window.
..
NOSTATS Use on CMD> to eliminate screen statistics.
..
TABS Medit places a tab mark in the file when the tab command is invoked using a PF key and the settabs command.
..
TABSOFF Eliminates tab compression when the file is saved to disk. This is necessary when using a sort program that keys on file column positions because with tabs on tab compression occurs and when the data is read directly from the disk by the sort program it is not in the same columns originally entered. Therefore, the sort and select specifications will fail with tabs on. To eliminate the problem save files to disk with tabsoff in the profile. This is especially true for macros that are not processed by the standard profile.
..
NOTABS 840215 Medit will not place a tab mark in the file when the tab command is invoked using a PF key and the settabs command. Note: These commands were created to read an Medit file with a Wordperfect program. Wordperfect was treating the tab marks as new lines, disassembling the text. The application of these commands is not otherwise apparent. Do not confuse this command with TABSOFF which disables tab compression. NOTABS does not disable tab compression.
..
ESC <> Use the key above the tab key anywhere within the active screen to enter the hex value for escape. This is helpful for entering printer control escape sequences. Sample: !ELONGATED TEXT" The same symbol can be created with Ctl [.
..
DOS 840715 Exits the current session temporarily to access DOS for file management (e.g. reviewing directories). Normally this should be assigned to a function key.
..
EXIT 840715 Exits DOS and returns to the current MEDIT session. By placing the Exit command in a batch file called Quit, the same command can be used to leave an medit file and return from Dos to medit.
..
RECL n (RECORD LENGTH) 841025 Sets the record length for the file to n columns. N can vary between 1 and 4024. The default is 266. A file that is longer than 256 will adjust the default record length of the editing session to accommodate the file. Similarly the E (edit) and GET commands will adjust the local record length to accommodate a file with a longer record. The minimum record length is determined by the screen mode. For 80 mode, the minimum record length is 81; for 132 mode, it is 133.
..
n<< (BLOCK SHIFT LEFT COMMAND) Block window command to shift the text left n positions on the screen between the line on which the first command is issued and the line where the second command is placed. The second command string omits the counter. The command looks like this: 10<< This is an alternate to using the change command which requires uniformity in the contents of the column to function.
..
n>> (BLOCK SHIFT RIGHT COMMAND) Block window command to shift the text right n positions similar to the n<< command.
..
n< & n> (LINE SHIFT LEFT OR RIGHT COMMANDS) Similar to n<<, but for 1 line only.
..
ADDTABS 841107 Similar to settabs. Used with settabs to enable additional tab settings beyond the number possible within the limitations of a settabs command string. The principal limitation is that a command string cannot extend 100 characters. Since the record length can set to 4000, tab settings at intervals of say 20, 40, or even 100, exceed the 100 column limitation when set for consecutive tabs. The addtabs permits stacking tab settings so as many as needed can be entered using the same command.
..
QUERY (The function and implementation procedures of this command are unknown)
..
LOC_CUR Ln Cl (LOCATE CURSOR) 841107 REV 860329 Line ranges are 0 - 44 (with stats off, 43 with Stats on) Column ranges are 0 - 80 in mode80. Column ranges are 0 - 132 in mode132. Moves the cursor to the specified line number and column number on the screen. Particular file lines and columns can be specified by using the line and offset (or right) commands first within a macro to position the file within the current settings so the desired file line and column numbers are within the Loc_cur parameter ranges. The 0 line or column parameter leaves the cursor at the current position for that parameter. When macros are processed, the screen is in mode80. To place the cursor on a column beyond file column, the file must be offset to within 80 columns of the target column. This command would not work on the last two screen lines until revision 60329.
..
REL_CUR Ln cl (RELATIVE CURSOR LOCATION) 841107 Moves the cursor the number of lines and columns indicated. Negative values can be used to move back and up.
..
LOAD \path\filename 841025 Brings a particular file into memory without being processed by the profile. Such files are not on the edit chain but can be accessed from the command line. A file that is already in memory can be removed from the edit chain by a load command. This allows the user to control what files will be included on the edit chain. A file that is initially entered with the load command will become active on the edit chain after an e command is issued for that file. If it is preferred that the file not be on edit chain, simply enter a load command upon completion of editing. Currently this capability is used in the profile, 084701 to initially load the cut file then process it with a special profile so the function keys are available when the file must be edited. File 0215 which empties the cut file by deleting the lines, enters a load cut command which then removes it from the edit chain. This is further helpful because if the file is empty the program will quit the cut file automatically after all files on the edit chain have quit. But if the cut file has data, the cut file becomes part of the edit chain and requires a specific command quit. The load command requires that the filename be given in the same case (upper or lower) as the file was last saved to disk. Even though Dos always shows the file names in upper case the original case remains and the load command is case sensitive. Since medit macros have numerical names, the case factor does not effect them.
..
CMD2OFF (COMMAND WINDOW OFF) 841025 Eliminates the command window so data can be entered and viewed in all of the screen column positions. This is useful for verifying reports prepared in 132 column format. Without this command, the screen must be continuously shifted which takes time and impairs comprehension. In this mode window commands will only function when assigned to PF keys since all entries in the screen window area are considered text. Note that data entry is wrapped, so continuous typing can be performed without having to enter a carriage return at the end of each line. Since this will result in some words being split, the justify command can be used to establish the proper margins and join improperly separated words.
..
CMD2ON (COMMAND WINDOW ON) 841025 Restores the command window to default setting.
..
AW (ADVANCE WORD) 841107 REV 850729 See also EOL (End of Line) Tabs cursor to next word on the same line or the next line. The revision improved the command so it operates on the entire record length rather than just the current screen.
..
ER (END RIGHT) 841107 Moves cursor to the end of the file record. This is helpful for network files which may be several thousand positions long and so a means is needed to move immediately to the end of a file record in the same manner as the top and bottom commands move immediately to the top and bottom of the file.
..
QUIT (MACRO PROCESSING) 841115 In a non-compiled macro, "quit" stops macro processing, and closes the current file. In a compiled macro, processing may continue, if the next command is one the compiler inherently recognizes, such as "-goto", so the best practice is to add an "-exit" after any "quit." If a macro file does not contain a file or quit command, processing will cease after all commands have executed and the file will be displayed on the screen for further input, unless the macro is a subroutine to another macro. In that case, control will revert to the source macro for continued processing. Since the Quit and file commands stop macro processing, such that no following commands in a macro will run, the purge command should be used to close a file after it has been processed and is no longer needed, if processing in the macro is to continue on other matters. See for example file 026021.
..
FILE (MACRO PROCESSING) 841115 This command will end the editing session from within a macro in order that continuous batch file processing can be performed with medit. Control is passed back to the DOS batch file. See also, QUIT.
..
PUSHC 841115 Saves the cursor position during the current session in a temporary stacked buffer. Used with a POPC command to obtain the location of the cursor when the pushc command was issued. This is helpful for creating macros where it is necessary to perform a function at a particular cursor location within the file, perform subsequent functions which cause the cursor to move from the first location, then return to the initial cursor location to perform another function. For an example, see the 0211 and 0212 macro files. This is useful as a means to mark and return to a particular position in the file when it is necessary to momentarily leave the current screen image to examine other file areas. NOTE: The command is locale to the screen image. Therefore,it must be used in conjunction with the .name and SAVESCR commands in order to function within a file that is larger than a single screen image (which would be the case for most files. Again, this application is demonstrated in macros 0211 and 0212.
..
POPC 841115 Returns to the screen cursor position marked by the pushc command. NOTE: The command is local to the screen image it is necessary to use in conjunction with the the .name and SAVESCR commands.
..
SAVESCR n (SAVE SCREEN) 841115 REV 920623 Retains the current screen offset and cursor positions for recall with the getscr command. Nine (9) screen images were originally available, until June 23, 1992, 10 more were added to support menu operations. (e.g. SAVESCR 1)
..
GETSCR n (GET SCREEN) 841115 Returns the screen offset and cursor positions created (marked) by the savescr command. (e.g. GETSCR 1)
..
UL (UPPER LEFT) 841115 Sets the upper left boundary of a rectangular zone to be cut, copied or cleared by a subsequent command. Will only work in conjunction with a LR command, which sets the other zone boundary. Intended to be issued by a PF key with the cursor marking the boundary location.
..
LR (LOWER RIGHT) 841115 Sets the lower right boundary of a rectangular zone to be cut, copied or cleared by a subsequent command. Will only work in conjunction with an UL command, which sets the other zone boundary. Intended to be issued by a PF key with the cursor marking the boundary location.
..
CUT 841115 Removes the data from within a zone created by the UL and LR commands, to a temporary file called CUT (i.e. The cut command creates a cut file). The cut command can be issued from either the command line or a PF key. PF key commands are generally more useful (flexible and fast) for this function. The records to the right of the zone (defined by the LR command) collapse to the left margin (defined by the UL command) of the zone removed. Functionally, this command is similar to the move command except the records below those removed do not collapse upward, and the entire record need not be moved. Consecutive cut commands can be issued from multiple files. The records removed are stacked in the cut file in the order removed. Generally, a cut file can be edited as any other medit file with the E command. The contents can be changed and saved or filed under a different file name in order to create a permanent record. As well, the data in the cut file can be transferred to an another file via the COPY command. Thus, the cut file is similar to any other medit file with the exception its contents are automatically modified by the C&P commands. Therefore, special consideration must be given to the disposition of the data in the cut file prior to issuing subsequent C&P commands. When the session ends, the cut file is closed and the data is lost unless it was specifically saved to another file. Use of the cut file with either the cut, clear or copy commands reduces the available work space in the main memory until the cut file is deleted with a quit or purge command.
..
Note Cut rcl paste command -------------------- When succesive entries are made to the cut file with either copy or cut (see below), the length of the data that can be entered into a target file with the paste command is set by the length of the last record in the cut file including blanks. If a line of 65 is cut, then a block of of 10 before emptying the cut file, then a paste will enter the entire block using only a length of 10 position. The last entry into the cut file should be at least as long as the longest line already in the file, if a past command is to be used.
..
COPY 841115 Copies the data from within the boundaries marked by the UL and LR commands to a temporary file called CUT. The copy command can be issued from either the command line or a PF key. The records copied remain as is. For an explanation of the cut file see the CUT command.
..
CLEAR 841115 Removes the data from within the boundaries marked by the UL and LR commands to a temporary file called CUT. The clear command can be issued from either the command line or a PF key. The records surrounding the boundary of the cleared zone remain as is, leaving spaces in the specified zone. For an explanation of the cut file see the CUT command.
..
PASTE 841129 See, also, CUT for more information on the cut file. Overlays the data in the cut file to the boundary marked by the UL command issued from a target file. The paste command can be issued from the command line or it may assigned to a PF key so it can be issued without moving the cursor. Any data previously located within the cut file boundaries is replaced, i.e. lost. Consecutive paste commands may be issued from anywhere within a file, or, from within multiple files, until the cut file is deleted or emptied. The cut file need not be created using the cut, clear or copy commands in order to make use of the paste and insert commands. The cut file can be created at any time, and data entered into it, in the same manner as any other medit file. An entire file could be copied into a file with the name "cut", and then data may be pasted or inserted into a target file.
..
INSERT 841129 Inserts the data in the cut file to a target file from the boundary marked by the UL command issued from the target file. The paste command can be issued from the command line or assigned to a PF key so it can be issued without moving the cursor. The existing data is moved right the number columns needed to accommodate the cut file data. See, also, PASTE, for more information on the cut file.
..
REP_DOWN (REPEAT DOWN) 841208 REV 860619 Repeats a change to a record on screen line 1 (the source line) to the depth specified by the immed t (target) command. All changes to screen line 1 will be repeated to the depth of the target, however, the Rep_down command must be issued while the source line is still on screen line 1. For large files, if the repeat is to span more than the current screen, the screen must be scrolled to the desired line number in order to issue the target command. For the Rep_down command to function, the source line must be restored before issuing the Rep_down command. The easiest procedure is to determine the target line and issue the immed t command before changing the source line, then move the source line to screen line 1, make the needed changes and issue the Rep_down command. This will save 1 screen move step. See macro 03902. On 60619 the command was improved so it would work on a file space that had no data to the right of the area to be repeated. Formerly this wouldn't work.
..
PURGE (Filename) 841231 REV 880528 Removes from main memory the named file. The 880528 revision, changed the operation so it does not load and quit a file that is not already in memory. Now if the file is not in memory, processing stops. Note, that if a file with a lot of short lines, i.e. less than 30 characters, is purged, then the memory restored by the purge command is only available to other files with similarly short data lines, such as other macros. If we load a series of macro files, at once, then begin loading data files, even though the macro files are purged, the data files won't fit in the memory space available by the vacated macro files.
..
WARNING ------- There CANNOT be any comments on the line with the purge command, which is similar to the way the e and @ commands work within macros.
..
INS_TEXT/. . . . . . 90/ (INSERT TEXT) 841231 INS_TEXT ". . . . . 90" (INSERT TEXT) 841231 Permits a specified string of text to be placed in the file beginning at the location specified by the Loc_cur command. The parameters can be / or ". This is useful in macros to create headers and field names without using the Get file routine. Medit will fail, if the delimiters are mixed or omitted.
..
WRAPON (WRAPOFF) 850316 REV 850729 REV 860607 REV 860619 REV 920102 REV 920215 REV 921023 Wraps data entry between specified margins. At the end of a line, it adds a line, and moves the file up so entry continues on the added line.
..
Outlining Support Macros 610 & 611 ----------------- Before it adds the line though it calls macro 610, which looks for an outline symbol, such as "1. " or "B. " and if it finds it, sets the left margin to the outline level. After it completes the wordwrap code by adding the new line, moving the file up and placing the cursor at the beginning of the new line, it then runs macro 611, which removes the outline level entered on the new line by the wrapflag 1 code. If these macros 610 and/or 611 are not found, they are ignored, so the program does not stop. A new command, "wsplit" was added on 931023 to provide greater flexibility in applying wordwrap to the Subject Index. Macro 610 and 611 are in macro file 000002.
..
The supplemental command wrapflag 1 is needed in the profile for working on data base files to repeat the data to the left of the margins. See wrapflag below. This was added June 7, 1986. Modified again June 19, 1986, to work with the space command which sets the number of blanks between text lines. See also, ragon, wrapflag, space, wsplit
..
RAGON (RAGOFF) 850605 Causes justification to be performed with a ragged (i.e. uneven right margin, which is standard for type written text) right margin rather than an even margin. This eliminates the multiple spaces between words with a smooth right margin.
..
COUNTER COMMANDS 850605 REV 850724 REV 860329 REV 860607 See also cntsubr, below. These commands have three (3) elements. First the name identifies the process, i.e. setcnt, addcnt, subcnt, divcnt, mulcnt, and modcnt. The counter number is an integer from 0 to 299, to identify the particular counter being processed. A second number is the value assigned to the specified counter. Counters are local to the file, but values can be can be passed between files with the global commands (see SETGBL and GETGBL). Since there are 300 counters available for a file, the total number of counters is limited only by the number of files in memory. For example, if 4 files are opened, a total of 800 counters could be used. The flexibility this offers is very helpful. It also requires considerable care in managing the counters so that a value created within a particular file is not expected to be applied in a different file. A counter library or index may be needed in some instances to identify the relationships. All Medit commands that use a numerical parameter such as Up _ or loc_cur __ __ , etc, can use the counter command with the following format: up @10; loc_cur 0 @15; Setcnt 0 @5 The first example moves the file up the number of lines in counter 10. The second example places the cursor on the column position corresponding to the value in counter 15; and the third example places the value in counter 5 into counter 0.
..
COMMAND WINDOW COUNTERS The command window was made susceptible to counters on 860607. To repeat the cursor line the number of times equal to the value in counter 5, the command from within a macro would be: Immed 5@r
..
STRCNT 0 0 850724 This command captures the numerical value of numbers and puts them in a specified counter. The second parameter establishes the field width from the cursor location.
..
SETCNT (SET COUNTER) 850605 REV 850724 Cntr # is 0 to 299 that specifies which counter you are using. Value is the number that the counter will have after the command. It cannot exceed 64000, and in some cases cannot exceed 32000.
..
SETGBL 0 0 851202 Places a value in a global counter that can be transferred between files. The second value can be an @# to use the value in another counter. The first number is the global counter that can be captured by any file with a getglb command.
..
GETGBL 0 0 851202 Captures a value from a global counter. The second value is the global counter so it cannot be an @#. The first number is the counter in the local file that is set to the value in the global counter.
..
ADDCNT (ADD COUNTER) 850605 Cntr # is 0 to 299 that specifies which counter you are using. Value is the number that will be added to the counter.
..
SUBCNT (SUBTRACT COUNTER) 850625
..
MULCNT (MULTIPLY COUNTER) 850625
..
DIVCNT (DIVIDE COUNTER) 850625 The first value is the operand, the second is the oper- ator. The counter retains only whole numbers, i.e. integers. The remainder is discarded. It can be cap- tured using the modcnt command. So for example: divcnt 15 5 This divides the amount in counter 15 by 5 and makes the counter value the integer value of the division, rather than what it was before.
..
MODCNT (DIVISION REMAINDER COUNTER) 850625 This works similar to the divcnt except the remainder goes into the counter rather than the integer value of the division.
..
INSCNT (INSERT COUNTER) 850605 This command writes the current value to the screen or the current active file at the cursor position. The cursor moves 1 position for each column needed to enter the counter number. The counter number identifies the particular counter to be processed. The second parameter establishes the field width for writing the counter value. A field width of 0 is the natural size of the number. The field begins with the column where the cursor is placed.
..
EOL (END OF LINE) 850605 REV 871006 910102 Places the cursor at the end of a line, immediately following the last character entered by the user. As of January 2, 1992, the code no longer offsets the screen when the end of the line is in the command window area. If data is on column 80, then it offsets the screen.
..
SETCUR 0 0 850625 This command gets the column position of the cursor and places it in a counter. The counter is identified by the first value: e.g. 0, is counter 0, 79, is counter 79, etc. The second value is generated by the command itself which is the cursor column number within the record. The value entered in the counter is 1 less than the screen column number shown in the screen diagnostics (screen line 25 - bottom line), because Medit reads the cursor position beginning with 0 rather than 1. WARNING 850919 ------- In addition to entering the column position into the counter specified, the command also enters the screen offset value into the next counter. Therefore macros that use setcur commands should use counters that are not contiguous so the setcur command does not overwrite the offset value in a counter where other data is intended. For example, if the following command was entered: setcur 94 0, then the column value would be entered into counter 94, and the screen offset would be entered into counter 95. Thus counter 95 should not be used for another purpose since this command would replace the value. This command can be used to pass the cursor position to other commands such as offset, zone and margin. Composite commands have been created to shift the screen to the cursor position and adjust the margins automatically. See also OFFSET and COUNTER COMMANDS. See 01 ME 0103, 0373, 0374 and 0375
..
SETCURA n 0 920623 Gets the actual screen position of the cursor based on an 80 x 25 array. "n" is a counter in which the x value is entered, and n+1 is the counter that holds the y value. This is different from setcur, in that the latter only works when the cursor is within the regular file lines. Screen line 1 = 0, and screen line 25 = 24. Screen column 1 = 0, and screen column 80 = 79. This supports the mouse operation.
..
CHRCNT 0 0 850717 This command gets the character code from the cursor location and puts it in the specified counter. The second parameter does nothing but conform to the counter format. This can be used to determine the value of a string or a single position. Among other things a test for a blank to find out when the end of a string is reached; with the advance word, AW, command it can remove blanks between fields. The chrcnt command can also do limited math since it can read the screen to obtain values. See file 01 ME 04801 for example of math function.
..
SETLEN 0 0 850625 Revised 850715 Puts the length of the current line in the specified counter. By placing a symbol in a unique column position, this command will identify a specified location and processing can be redirected at that point. Both the top-of-file and end-of-file marks are evaluated as negative values which can be used to indicate all of the records have been processed. This only seems to work if the last line in the file is blank. The last line can be made blank, by initially adding an extra line at the bottom of the file. Another solution, is to use the errorcnt 0 0 command to ignore the error message that occurs when using the up command with a file that has the last line non-blank.
..
-IF @ = "any command" 850625 -IF @ = -GOTO <-LABEL> -IF @ = -GOSUB <-LABEL> This is a conditional string. If the condition is met, processing is passed to the command specified, or to the line of the label, otherwise, the next line is processed. The relationships can be =, <=, >=, <, >, != (not equal). Nesting is available which is equivalent to an "and" condition, so that a command of the following type could be given: -if @15 = 1 -if @0 = 0 ins_text "This is a good feature." The length of the string can be at least 100 characters.
..
-GOTO 850625 This is one of the conditional commands for processing loops. It works with the label and -if commands to direct processing to a specified line in the macro file identified with the -label command. See also "-GOSUB". As an alternate to this command, see the -DOWN and -UP commands. They work much faster.
..
-LABEL <________> 850625 This command causes processing to continue on the next line. It is used with the -goto command to direct the sequence of processing. The label can be a maximum of 8 characters.
..
ERRORCNT 0 0 850715 Allows program code to continue executing commands when an error occurs, and counts errors so that a conditional can branch processing to another routine when an error condition occurs. A common usage is to start every macro with... errorcnt 0 0, ...to put the number of errors in the second parameter of counter 0. Then a command like... -if @0 > 0 -goto xyz ...this tells the code that a process is over and to go do the next routine. A common way an error occurs is when the end of file mark is encoutered, which means all of the contents have been processed. Typical situations are search and up commands, since these return an error message when the end of the file is reached. Up is often used to process every line in a file.
..
ERRORCNT 0 1 850715 Turns error messages back on if it is necessary within a particular process. Note that after a file is processed and normal editing is resumed from the keyboard, the error messages will occur even if this command was not issued. Experience has shown that this command has never been used.
..
-EXIT 850715 This command causes processing to cease from within a particular macro and diverted to a higher level macro or restore normal editing.
..
SEARCH S/............../ 850715 REV 860607 REV 860619 This was changed so a closing / is not required. The argument commands have a length of 100 characters, including the command syntax. Alternate ways to enter the command using s and l in place of search and locate are helpful. Command delimiters can be !@#$%^&, in addition to / Revised on 860607 so it will locate a space on column line 1. Revised again 60619 so it will locate a space on any column.
..
L / / 860825 Morris fixed this so it will locate a blank on a single column zone. This was failing on macro 28.bat. Search begins from current line, rather than cursor line. If search fails the last line in the file is current indicating every line was checked from the cursor to the end of the file.
..
L-/ / 851109 Reverse search works the same as standard search and locate commands beginning from the current line; except it looks for specified string to the top of the file rather than the bottom. If search fails, line 1 is current rather than the last line in the file, as with normal locate command. This performs the search from the cursor location but only places the located record on the current line if it is initially off the screen. This can be corrected with a routine that makes the cursor line the current line and leaves the cursor on the current column.
..
FR/ / 851109 FR / / Performs a search for a specified string on the cursor line from the cursor position to the right of the file. It works within the current zone and places the cursor on the column following the end of the specified string. The screen is shifted as necessary. The left zone parameter is ignored; search begins at cursor position. Spaces are valid arguments to the command, so it can locate the end of a word or a field by looking for a single or double space.
..
FL/ / 851109 FL / / Performs a search for a specified string on the cursor line from the cursor position to the left of the file. It places the cursor on the first character in the specified string. The right zone parameter is ignored; search begins at cursor position.
..
CHANGE C/............97/ 850715 REV 860619 REV 860825 Revised so it will change blank spaces with no data to the right of the zone. Prior to 860619 revision neither the search or change commands would work on blanks that did not have data in columns to the right of the target zone. Revised again on 860825 because it was not treating blanks correctly. For a zone on a single space, a change command would put characters in the column to the right of the zone.
..
ZONEREPS 850724 REV 850729 Captures the string within a specified zone and puts it in a buffer. The string in the buffer can then be compared with a second line using the repscnt 0 0 command. The string may be anywhere on the cursor line, and can be up to 100 characters. Generally the command will work better if the repscnt zone length is the same or less than the zone length of the zonereps command. See for example: 01 ME 049.
..
REPSCNT 0 0 850724 REV 850729 Captures the string within a specified zone and compares it with the last string entered into the search buffer. The second value is generated by the command and so is always entered as 0 by the user. The first value is the counter which accepts a number corresponding to the comparison results, as follows: 0 is identical 1 is greater than -1 is less than Thus the command can be used to compare numbers, as well as to establish simple identity between alpha text. Alpha text is evaluated by the value of the characters and so a comparison could be either 1 or -1 if the strings are not equal. The string may be anywhere on the cursor line. Generally the command will work better if the repscnt zone length is the same or less than the zone length of the zonereps command.
..
DOS /C ______________ 850724 090430 This command accesses DOS executes the specified command and returns to the command line. Thus, a batch file could be called from within an medit macro. After the DOS command has run, execution continues with the next medit command in the macro. This provides a means to create continuous processing. Note that the DOS command without the /C accesses DOS for manual operation with return using the exit command. This allows using Supersort from within Medit macros. On 090430 Morris added dos command to Java Medit for SDS Windows application to run in 64-bit Windows 7 with no limits on memory. Since there are no limits on memory, do not need dose command.
..
DATECNT 0 0 850930 This command captures the current year, month, day, hour, minute, seconds, and day of the week in consecutive counters, beginning with the specified counter. Note that like the chrcnt, setcur, and setlen, commands, the second 0 is not entered as part of the command, but must be entered to complete the syntax. For example if the command is entered, datecnt 1 0, then the following will occur: counter 1 = year counter 2 = month counter 3 = day counter 4 = hour counter 5 = minute counter 6 = second counter 7 = day of week See for example: 01 ME 0501, 0502, 0162 & 04705
..
LINECNT 0 0 851109 Captures the cursor line in the first counter, the zone in the next 2, and the margins in the last 2. It thus occupies 5 counters. The second parameter is always "0".
..
linecnt n1 0 called on Top of File line increments errorcnt command, typically used to signal empty file; in SDS java linecnt on top of file line does not return an error, it sets counter n1 0, reported on June 3, 2011
..
MARKCUR nn 851109 ECUR nn REV 880417 Marks the current file for use with the ECUR command and places it in a buffer. When ECUR is executed, Medit returns to the file that was active when the markcur command was executed. It was changed in 1988, so an argument can be appended, if desired, to distinguish different files being saved. If no argument is used, it works the same way it always has. The argument can be either a value or a counter. Thus, markcur 3; and markcur @10 will return processing to the same file when ecur @10 is executed, if counter 10 = 3 at that time.
..
ZAPDOTS 851202 Deletes all dot marks entered with the . command. This is to reset the marks.
..
DEBUG 1 .. 100 860329 REV 860607 Causes the commands executed from within a macro to be displayed on the screen command line slowly. Macro execution will cease after either the home, end or the return key is struck. The alternate values control the speed of execution with one fastest. Created a step feature for the debug command. It will run progressively slower as the parameter is increased from 1 to 99. Actually, debug 15 is slow enough to do most program analysis.
..
Debug 100 is a special condition that will step each command in a macro by striking any key. The "-" key will exit from the command. In the step mode, the entry keys will only function to execute the next macro command. Carriage return does not move the cursor to the next line; home does not move the cursor to the command line, etc. The cursor remains stationery until the "-" key is hit.
..
DEBUG 0 860329 Displays and executes commands within a macro for each keystroke; if a key is held, executes commands continuously until the key is released.
..
FREE 860329 Displays memory usage diagnostics on screen line 2.
..
WRAPFLAG 1 or 0 860607 920102 Modifies the application of the wrapon command. Wrapflag 1 causes the wrapon command to repeat the data left of the left margin. This is needed for the SDS and other data base type applications. With Wrapflag 1, as of January 2, 1992, Medit simply calls a macro 610, so I can control the type of cursor operation in SDS according to various fields. Wrapflag 0, or using wrapon without the wrapflag command in the profile, causes wrapon to perform word wrap without repeating data outside the margins. See wrapon above.
..
SPACE 1 860619 Sets the number of spaces for word wrap and justify. Space 1 is single, space 2 is double, etc. See justify and wrapon above.
..
IMMED [n]@[a,r,d, etc] 860619 Immed 5@r See discussion under counters.
..
FFILE.COM 860824 Syntax: ffile [path] [file spec] This is not an Medit command. It is a DOS utility created by Morris to supplement the Dir and tree commands. It makes a list of files on the system with the path name and the dir diagnostics. Requires a space between the command, the path and file parameters. Uses DOS wild card parameters.
..
-DOWN n (-D or -d) 861025 This permits passing macro control to the number of lines specified (n) without using a -label command. The only problem is that when creating macros, comments can interfere with the number of lines to pass control because they greatly increase the number of lines. When the comments are removed, the number of lines necessaryily changes. Therefore, macros should be created with the -label and -goto commands. After it is settled, the -goto commands can be changed to -u and -d, and the -labels can be deleted to save file size.
..
Macro File c: sd 03 011 automatically converts -goto commands to -u and -d commands and deletes the -labels. This macro is called by function F1 Tab.
..
-UP n (-U or -u) 861025 Works similar to the -d command to pass control in macros n lines below the command.
..
NB n 861025 Moves the first non-blank string within the current zone to the specified (n) depth. If no parameter is entered, the search is for the entire file depth.
..
ANNOTATE 870103 Places data on the annotation region of the screen. The annotation region of the screen is located on line 2 starting about column 51, and contains information to help the user of Medit. Data starting with the second character after the annotate command is placed in the annotation region. There is no removal of leading blanks.
..
ERRORMSG 870103 Places data in the error portion of the screen, making it possible to have macros return errors and warnings. The error line is used by the macro system to control termination of the macro. If an error message begins with a blank character, then it is assumed to be a warning message, and the macro will not be terminated. If an error begins with any non-blank character, then the macro will be terminated. Therefore, an errormsg with a non-blank in the 1st position has the same effect as an -exit command. The error message or warning displayed with the ERRORMSG command will be removed after the next action key is pressed on the computer.
..
-GOSUB {label} 871006 -GOSUBUP nn REV 871010 -GOSUBDN nn REV 880416 -RETURN @[filename] -x{label} @[filename] #nn This is a series of code processing redirection commands to aid macro development and consolidation. With respect to consolidation, it is an interim step toward compiling the code.
..
"-Gosub" works similar to "-goto" except after it begins executing commands at the target -label, when it encounters a "-return" command, processing returns to the line below the initial "-gosub" line. Commands may be nested to 10 levels. This makes it possible to create standard subroutines so code can be easily reused without creating complicated counter flags, and conditionals with -gotos.
..
In April 1988, the -return command was made global so processing returns to the line below the initialization -gosub command even if the file is changed within the subroutine. Previously, processing was local, so processing returned to the top of the new file when an e command occurred in a subroutine.
..
Macros are typically created using "-gosub" and "-label" commands, similar to the "-goto" command. They are then "compressed" by macro 011 which converts -gosub into "-gosubdn" or "-gosubup", eliminating the labels. The compression macro calculates and enters the number para- meters required for each alternate command.
..
The "-gg " appended to a profile function key assignment together with a "label", permits placing function key assignments within the same file rather than having seperate files for every function. This reduces maintenance and eliminates the 2k of overhead required for seperate profile function files.
..
Medit executes the commands following the specified "-label". (The "gg" was added to the "-" to facilitate macro compression conversion from the -label to a line number. It is not actually part of the Medit command, just the "-" comprises the command.)
..
Syntax: pf1 @c:\01\03\04701 -gg sys_lv2
..
Macro compression (file 011) changes the "-gg {label}" to a "#nn" similar to the way "-goto" and "-gosub" commands are converted to "-d nn", "-u nn", "-gosubdn nn" and "-gousbup nn". Except the number is the actual line number where the commands begin, rather than the number of lines to jump. Since the calculations are performed by macro compression, file 011, the User need not be concerned about this difference.
..
Macros may also use subroutines within other macros. Note that if the labels are removed from a target macro (the standard situation under the Welch Super System), then the address must be entered in the object file with the "#nn" rather than the "-gg {label} command.
..
These features makes it possible to greatly reduce the amount of code needed to create applications. Profiles can be created that contain standardized routines that are used in a variety of situations to build more complicated functions. File 06 02 04 is an index of current subroutines, files and line numbers.
..
PCMD2 871006 Purges all pending commands in the command window.
..
LEDGER [1][0] 880416 Creates a file, ledger.dat, of macro commands executed, so -gosub errors can be identified. Ledger 1 initiates the process; ledger 0 ends the process.
..
CNTSUBR NN 0 880417 Puts the current value of the "-gosub" stack into a counter. If the value is 0, then an equal number of -gosubs have been executed, as -returns. If it is not 0, then there may be an error in the coding. This value can be obtained at any time with the cntsubr command and entered in a file with the inscnt command. The value is entered into a global counter so the value must be transferred to a local. Also the reported value is twice the actual number of pending "-gosub" commands. Created an 04701 function *3F08 that returns the status of the "-return" stack in an errormessage on screen line 2.
..
COMPILER 890218 The record on 890218 reports initial ideas on creating a compiler that incorporates Medit macros into assembled program code for increased speed performing daily work.
..
MACRO nnnn 890220 Begin executing commands at -entry n within Medit compiled macros. Can have maxiumum 1999 Java program increased to 5000 macros,
..
-ENTRY n 890220 Medit compiled macro called by the "macro" command. Can be no more that 2008 of these. They all have to be numbers.
..
-RETURN 890220 Processing stops launched by a macro n command that executes code below -entry n until it reaches -return, and then code below the macro n command continues.
..
SAVX [d][path]\filename 890703 Same as "save" except it creates a directory for the path if none exists. This is used in the 04702 and 0702051 macros. [Below, on 001001 Morris created savc.]
..
DOSE 891209 090430 Same as "dos" except it writes the current session of Medit to the disk, so there is enough memory to load other applications. This is applied with function 022S07, to open files in other applications like Wordperfect and Lotus. The usual syntax is: dose /c {command} Where command might be wp f:\03\01010\[filename] ... and the result would be: The current session of Medit would be written to disk, the program wordperfect would be loaded and would call the named file. When User completes work in WP, it closes Wordperfect and loads the saved Medit session so User can resume working at the initial position. The temporary file written to disk is erased. On 090430 Morris added dos command to Java Medit for SDS Windows application to run in 64-bit Windows 7 with no limits on memory. Since there are no limits on memory, do not need dose command.
..
SETCOLOR n1 n2 891212 REV 920703 Where n1 = screen field... 1 = Editing area 2 = CMD field 3 = Screen line 2 for filename 4 = Screen line 2 for Profile indicator, annotate 5 = Command Window 6 = Cursor 7 = Command Line screen line 1 without CMD n2 = color value
..
N2 is comprised of two components, plus a third for blinking, under the following formula: 16*X + Y X = background taken from primary colors from 0 7, as follows:
..
[These values are shown in the Advanced MS Dos programmers manual on page 512 for interupt 10H (16) subfunction 02H, Set palette and border] 00h 0 = invisibile (same as black) 01h 1 = blue 02h 2 = green 03h 3 = cyan (kind of blue) 04h 4 = red 05h 5 = majenta (purple, dark red) 06h 6 = brown 07h 7 = white White wth Black letters Intense White with Black letters 16 16 7 15 112 240 Y = color of letter within background. Blinking letters within the colored background area is achieved by: 16(X + 8) + Y
..
In addition to the 8 primary colors available for both background and letters, letters can be created with the following additional 8 colors. 8 = gray, light) 9 = blue, light) 10 = green, light 11 = cyan, light 12 = red, light 13 = majenta, light 14 = yellow 15 = white, intense
..
Morris has set the default field colors in the following files: Medit.asm at line 416 for fields 1 - 5 Fullscrn.asm at line 890 for field 6 The cursor automatically floats, so it contrasts with the color it encounters in the background field. Up until 920703, the cursor color was global, but it was changed to local to accomodate the great variety of different screens in SDS.
..
PFESC 891212 This can now be programmed like the other function keys, except it does not have alternate modes for the Alt, Ctrl and Shift keys. Permits assigning the standard function used in most other programs, by the following command: pfesc quit
..
PFU & PFD 910203 REV 910310 These are new function keys that permit assignments. The existing functionality can be assigned with the follow- ing: pfu gup PgUp scrolls down 10 lines and takes cursor pfd gdn PgDn scrolls up 10 lines and takes cursor Any assignments can be make to these functions, as with the other function keys. Main objective of this program change to permit unplug- ging these functions in menu screens, so User does not accidentally change the screen.
..
NO_1A_EOF 910310 The change today makes it the default condition so that Medit does not automatically enter a Ctrl Z to end the file. This is necessary in order for the DOS copy command to concatenate files, which is used to assemble large pointer files to do multiple month searches.
..
PFENT ENTER 910525 REV 910705
..
Made this a function key to execute Menu functions, instead of F1. PFENT with no argument restores Enter to stardard function of executing commands and doing a line feed carriage return. Pfent does not take alternate forms, like pf1 pa1 pc1 ps1. The only way to make an assignment is on the command line or in a macro... pfent macro 136 Morris completed the fix on May 25th, in SF.
..
PFT 910525 Made tab a function key, similar to pfent, per above.
..
F11 & F12 910525 REV 910705 Added these to the other function key list so they work like the other function keys with Alt, Ctrl and Shift options.
..
GETKEY n 0 920404 Getkey receives the ascii value from the keyboard when a key is struck. If a macro is called, and the code encounters the getkey command, processing stops until a key is pressed. This enables the code to control User input based on what is read from the keyboard.
..
This is helpful to control User input for menu, see ref SDS 921006 113040, for samples. It is used in 04070211, and 04702 to support SDS program launch in the Group Manager.
..
PFB1 PFB1i PFB2 PFB2i MOUSE 920610 REV 920623 When a mouse driver is installed and when a mouse is also connected, Medit will now show TWO cursors. One that moves with the cursor keys and the data entry keys, and another is moved by the mouse. When a mouse button is pressed, the actual cursor moves to the position of the mouse cursor. So the mouse is a simple means to quickly jump the cursor to a particular position. Functions ---------- pfb1i left button executes macro before click moves cursor pfb1 left button executes another macro pfb2i right button executes macro before click moves cursor pfb2 right button executes another macro Setcura, is a new command created 920623 to work with the mouse code. It is described above following, SETCUR.
..
POSMOUSE x y 920610 This jumps the mouse cursor to a particular location like loc_cur command. It is mainly for the menu system. As of 920610, however, it is not working in OS2, in that it will not move the os2 pointer. The Utility of this command is not clear, it will not move the mouse to a position. We can eliminate this command since it does not really do anything for us.
..
INSERT PFINSW 921024 PFINSW1 PFINSW is a function key assignment in compiled macro 153 created in sd 03 000008, as part of the main profile. It calls macro 341 which has macro 610 assigned. There is no function key for pfinsw; it is called in Morris' Medit code when Insert is "on" and text is pushed forward to the right edge of the screen, column 80. Anything can be assigned to pfinsw, but the assignment is macro 341 which does initial assessment, then calls macro 610.
..
PFINSW1 calls macro 49 to justify text within margins, and is called in Morris' Medit code after macro 610 runs to figure out the left margin, and Morris splits the word to the line below on the left margine. PFINSW1 is called automatically like pfinsw when Insert is on to justify the text so that typing continues with insert on, similar to wordprocessing. 931023
..
Morris programmed Medit today to call pfinsw when Insert is "on" and text is pushed beyond column 80 with keyboard entry, so that macro 610 can apply wsplit, a new wordwrap command also created today (see below), that enables wrapping and justifying text differently in SDS records from standrd editor files, so when Insert is "on" and pushes text at the end of the line into the right edge of the screen, then the next keyboard entry will wrap the word to the next line, rather than return a beep and stop the typing process by the user. This aligns some typing situations in SDS with conventional typing with insert on, familiar to people who use wordprocessing programs. It also prevents inadvertent data entry from corrupting menus, and in the subject index to maitain structure for subject description lines.
..
TM n 921024 Causes a delay of n milliseconds until the execution of the next command. It is used in initialization macros, 04702 and 0470211, to display messages for brief periods of time. This requires using a debug 1 command before the tm n command, and a debug 0 command afterward, to return control the screen for the period of the specifi- ed delay. Problem: it does not seem to work in compiled code.
..
H [Header} 930220 This is a Window Command, that duplicates the line and places it on screen line 3, as a Header. We have to change the code to place line 2 at top of file, instead of line 1, because the command duplicates the top line. As long as it is covered up it is okay. Turned out this code could not be applied and so is not really needed in the program.
..
TL n 931023 Title line, where n = number of lines from tof, to be used for title header. Command is local to a file, since each file will have different title requirements. Macros seem to work okay, but Users cannot do data entry on the tl line.
..
WSPLIT 931023 When num is zero, then word wrap will split the line after macro 610 and before macro 611. when it is a 1, it will not split the line or really do anything useful. Only macro 610 and 611 will be called. You may just turn it off and on in macros 610 and 611 if you want, or you may do whatever you want.
..
GFNAME 980722 Moves the values of ASCII characters for the path and filename of the current file into local counters beginning with counter 1. The counter at the end of the filename is set to 0 so that macro 1180 and 1181 will stop. This supports loading the filename into file commands using macro 1181. Macro 1180 can be called to transfer the filename between files.
..
IOFF 990912 Insert Off Turns insert function off. It is called in a macro, for example macro 80 for the menu, so that data entry will not disrupt the position of menu choices, if the Insert function is on when the menu is opened.
..
SAVC [d][path]\filename 020703 Same as "savx" created per above on 890703, except it creates directories and filenames in upper or lower case, and it supports long strings, i.e., more than 8 characters which was a limit in the original DOS program. Path and filename extended to the width of the screen, which is about 80 characters. Since CMD> field name takes up 4 characters, and since the command itself takes 1 - 4 characters, the actual length of a path and file name supported is only about 75 characters, and to be safe, probably more like 65 characters.
..
ATTR [n] 021220 Sets attribute of current file based on value of n. attr 0 = All attributes off attr 1 = read-only attr 2 = hidden attr 4 = system attr 32 = archive attr 3 = read-only and hidden attr 7 = read-only hidden system Adding the values produces combinations of attributes. This is used in macro 1421 to support confidentiality feature. RMVERR 031112 This is a simple command that removes any error message the Medit code might put on the screen that obscures the filename field. Errors, especially reporting the top or bottom of the file has been reached are an integral part of SDS program code, and so do not reflect actual errors. Since they often occur and give new users a false impression of a problem, this code simply lets the program avoid a cosmetic problem.
..
GET filename [n n] 031113 Get can also be issued as simply "g" CMD>g fred ...reads the all of the lines in the file fred in the current directory below the current line on the screen. The command can process up to 64K lines. CMD>g c:\sd\10\fred n n This is a new feature created today that gets lines in the file fred in the specified path, c:\sd\10, but only beginning with the number "n" and then the next "n" lines into the current file. The "n" parameters support Medit @num feature described above. The command... CMD>g c:\sd\10\stufq 414 200 Reads lines in the file c:\sd\10\stufq beginning with line 414 and the next 199 lines and places them into the current file below the current line. One application is to provide virtual memory support in building chained files for a sorted index, because these files combine a number of chronological files that are segmented by date into a large file organized alphabetical, which then needs to be read into Medit in small pieces.
On 090119 Morris working on new version of Medit java for 64-bit technology.
..
SETRGBCOLORFG 6 255 0 0 text 090119 screen field............... 1 main text, 2 CMD, etc. red..................... red intensity green................ green intensity blue............... blue intensity SETRGBCOLORBG background screen field............... 1 main text, 2 CMD, etc. red..................... red intensity green................ green intensity blue............... blue intensity Application of these commands is explained on 090119, but remains unclear. On 100129 Morris developed a command in the main profile setting a useful color for the cursor, however the rationale for settings is not clear.
..
FONT "fontname" nn 090131 New command to set the font for Medit. Put the name of the font file in quotes, and nn is the size of the font. The font file has to be in a location the operating system can find the name in quotes. For Windows XP the font directory and font file is... i: windows fonts luconp.ttf
..
The name of the font to call with the Medit font command is... Lucida ConsoleP (TrueType) The command would be something like... font "Lucida ConsoleP" 16
..
LSFILE path filename 100415 This replaces sf for the purpose of generating a list of files for a specified directory, mainly used for F1 F3 called by macro 58 and running macro file c: sd 03 0608. The new command works only from within Medit, as follows... CMD>lsfile c:\sd\10\* CMD>lsfile c:\sd\10\fun*
..
The command reads the disk and lists in the file current in memory all files on the disk that satisify the specification. Therefore, the command does not need a redirection parameter to put the list in a particular file, and then read the file into memory. The current file needs to be empty, because content is read at the bottom of the file, even if the file has only blank lines.
..
$SCREENX 100920 $SCREENY New commands that capture variable Window size; and can be applied as follows... loc_cur 0 $screex-1 Puts cursor 1 column less than screen width. setcnt 1 $screenx Puts value of screen width in counter 1 setcnt 2 $screeny Puts value of screen depth in counter 2 Knowing screen depth allows expanding the number of lines in the Group Manager to fill the screen.
..
TITLE ".........." 110621 Sets title used for application title line read at time application launches. Medit java appends time hhmmss, to provide unique identification when using multiple sessions of the same app. Syntax... title "Schedule Diary System" Result... Medit java will post the string in quotes on the title line of the applicaiton session, and append the time for providing unique identification.... Schedule Diary System 08:27:31
..
CLEARMSG 110621 clears any message in the buffer for this file.