Wednesday, November 19, 2014
Where is the System ID located in D3?
I always find myself trying to remember where in the world the system id is located in a D3 system. The issue is that I don't always need to know or remember but when I have to migrate or update/upgrade a server with a new system id, it's nice to know where it is located. Currently in D3 systems, up to 9.x the system id is located in the dm,messages, config file/item. So in order to edit it, login to the DM account and get to TCL. Type "ED MESSAGES CONFIG" and you will see your current system id. Make the necessary changes and make sure to "FI" (file it).
That's it for now. Stay tuned for more regular tidbits regarding other MultiValue systems!
Tuesday, September 30, 2014
How to Resize a File in uniVerse
How to Resize a File in uniVerse
MEMO file used in this example
- Resizing is a function which can be performed by any user with access to an account. Since it's not something a normal user would stumble over without some searching and looking, this shouldn't be a problem. However, resizing is something which should be understood and performed with no one on the account, or at least a certainty that no one is accessing the file which is being resized. In newer releases of uniVerse, a resize can't be done if the file is open by any process wether background or user initiated. So, here's the steps to follow assuming the previous issues are known and controlled.
ANALYZE.FILE MEMO
(from TCL)
This will return data which is significant in determining the new size. Here's a sample of what may come back:- Analyze the data returned by the ANALYZE.FILE command
File type: 18
which is fine for this file. For files which are wholly numeric, other file types can be used, however 18 has proven to be very fast and stable. [Note: A discussion of using Dynamic Files (type 30) is not included in this document.]Modulo: 1009
which will be used for reference to see how badly sized the file is.Separation: 1
The separation should be based on the hardware/OS use of blocksizes at the disk level. On HP, this is usually 2048-bytes per block. IBM uses 1024-byte blocks. So, depending on your hardware, you need to adjust this accordingly. The block size for the separation is 512 bytes. A separation of 2 will equal blocksizes in uniVerse of 1024, 4 = 2048, 8 = 4096, etc. You can use any separation you wish, however, it is recommended that you stay within the recommended sizes based on hardware constraints.Number of data bytes: 37423452
This number, when expected growth is included, is the most important. It is used to calculate the new filesize.Average number of bytes per record: 3696.1434
This number will be used to determine if a separation larger than the current separation is needed.Minimum number of bytes in a record: 20
This number, in conjunction with the previous number, will be used to determine the optimum separation.Maximum number of bytes in a record: 427496
With the previous 2, this is used to determine the separation. Whether this number is used is determined by how close to the average it is. Usually this number is so much higher than the average that it's considered too disproportionate to be considered. If the average and this number are relatively close, then it carries more weight.- RESIZE the file.
- Go home and eat dinner. You're finished.
>ANALYZE.FILE MEMO File name = MEMO File type = 18 Number of groups in file (modulo) = 1009 Separation = 1 Number of records = 10125 Number of physical bytes = 46554112 Number of data bytes = 37423452 Average number of records per group = 10.0347 Average number of bytes per group = 37089.6452 Minimum number of records in a group = 5 Maximum number of records in a group = 20 Average number of bytes per record = 3696.1434 Minimum number of bytes in a record = 20 Maximum number of bytes in a record = 427496 Average number of fields per record = 76.8433 Minimum number of fields per record = 1 Maximum number of fields per record = 7733 Groups 25% 50% 75% 100% 125% 150% 175% 200% full 0 0 0 0 0 0 0 1009The above example gives us all the information we need to resize the file and make it usable and fast for now. The only missing information, which the client will have to provide and should know, is how much growth they expect over a specified period of time. That time period is measured by how soon they expect to resize the file the next time.
The data of interest is:
[Note: If you are on a Microsoft platform, use a separation of 4, which has proven to be very stable, as a base-line for resizing unless your record size mandates a larger separation.]
[Note: On Microsoft platforms, this can still be modified if desired, but be sure to use a multiple of 2. I.e.: 2, 4, 8, 16, 32. values larger than 16 become difficult to maintain and are very inefficient where disk usage is a concern.]
Now for the analysis:
Note: Too much analysis may become counter-productive. In many cases it's more important just to get the resize done, rather than worrying about what separation to use. If you feel this is your case, just use a separation of 4 when the average sized item is smaller and 8 for those that are larger on average. Also use a filetype of 18, which seems to be very efficient, unless a case can be made to use dynamic files (type 30). If you choose to take this route, you may not need to pay much attention to the next section, however, you accept all responsibility.
- A. Find the best SEPARATION. Use the Average from e. above as the rule, but consider how close it is to the minimum and maximum in f. and g. In this case, it's closer to the minimum than the maximum, so we can surmise that the maximum is an exception rather than the rule. The rule of thumb for determining the separation is to fit somewhere between 3 and 10 records per group. At 3700 bytes per record, we can determine that the separation might best be 16, which makes each of the primary buffers in the file (blocksize) 8192 bytes. This is not unusual for the MEMO file. If you follow this process on the FISCAL file, you will find different results.
B. Calculate the correct MODULO based on the SEPARATION from step A. above. For this number, divide the Number of data bytes (37423452) by the SEPARATION (16 * 512, or 8192). For this example, that would equal 4568.29.
C. Add the growth percentage the client provides. This example assumes 20 percent growth between now and the next resize in say, six months. So, multiply 4568.29 by 1.2. No, wait. I usually consider the oversized records and overflow area which the large records will require, so I typically add about 10% to the filesize myself. So, take 4568.29 and multiply it by 1.30 which will give you a modulo of 5938.777, or 5939.
NOTE: If you are going to add a large amount of data to a file that is currently sized appropriately, you will need to calculate the percentage increase of the new data in relation to the existing data. After that, calculate the modulo accordingly. I.e.: if you are adding 5,000 records to the file in our example, which holds 10,125 records, multiply 4568.29 by 1.6, which will increase the size of the file by half, plus a 10% growth allowance.
D. Calculate the PRIME number. At TCL, type PRIME 5939. You will get the following response:
>PRIME 5939 Next lower prime number: 5939. Next higher prime number: 5939.
Now that isn't going to happen very often (having the number you calculated be a prime number). Okay, back to work... We now have the sizes to use when we perform the RESIZE command.
>RESIZE MEMO * 5939 16
where the *' tells the process to keep the current parameter. In this case, that's the filetype. In our example, that's a type 18, which is fine.
If you don't have enough disk space on the filesystem or partition, but do on another filesystem or partition, here's the command you would use:
>RESIZE MEMO * 5939 16 USING /u5You must have checked and know that /u5 has plenty of space for the new file.
NOTE: The USING switch on Microsoft platforms would have D:\directory, rather than /u5.
I.e.:
RESIZE MEMO * 5939 16 USING D:\WINNT\TEMP\
The process will create the new file, either in the same directory as MEMO or the directory specified after the USING keyword. After the file is created, the process begins copying data from the old to the resizeNNN file. It does this by copying an item to the new file from the old file. When each item is copied, a flag is set in the old file so the process knows where to go next. The groups are moved through in sequential order setting these resize flags, until all the records are copied. Then the old file is deleted and the new file is moved into place, being renamed from resize9e6151, in this sample, to MEMO.
NOTE: If you run the resize as a superuser or administrator, you must check the permissions to verify that the new file has read/write permissions set appropriately for the users that will need access. This is especially true on Hewlett Packard (HP/UX) Unix systems.
Depending on how large the file is, what the new file type is, if that's being changed, or what the separation is, this process could take a very long time. That's one reason I recommend keeping files to a manageable size. It might become necessary to distribute files to make that possible.
Should you need to interrupt the resize for any reason, including those out of your control, the following command must be run on the file before it can be used:
filepeek MEMO
which will give some information about the file, then prompt with
Addr:
where you will type RCL to reset the resize bits. It will prompt you to enter Y to continue or N to stop. Enter Y.
You must be superuser to execute filepeek. Do not do anything else in this program because it alters data at the disk level and can't be undone. Fixes resulting in misuse of this program will be billable at the current emergency coverage costs. Please don't abort the resize unless absolutely necessary. You will probably lose an item or two if you do. If the process is aborted by a power outage, you can expect multiple corruptions in the file and perhaps the loss of many records.
Sunday, September 7, 2014
Abs do not verify
"ABS FRAME MISMATCHES - EXPECTED FFFF FOUND FFFF."
This message occurs when ABS in memory does not match the DATA ABS, due to ABS corruption. This corruption could be in the DATA ABS, or in memory.
To correct this problem, clear the DATA ABS and SEL-RESTORE the DATA ABS from the Pick DATA diskettes or from a pseudo floppy. Reload the VIRTUAL ABS (ABS Diskettes #1 & #2 or Pseudo Floppy) from the 'A' option.
WARNING: This process will require reloading any ABS Patches and custom ABS.
PROCEDURE:
1. From the DM account at TCL type: clear-file data abs
2. SET-FLOPPY (AH or SET-DEVICE device#
This message occurs when ABS in memory does not match the DATA ABS, due to ABS corruption. This corruption could be in the DATA ABS, or in memory.
To correct this problem, clear the DATA ABS and SEL-RESTORE the DATA ABS from the Pick DATA diskettes or from a pseudo floppy. Reload the VIRTUAL ABS (ABS Diskettes #1 & #2 or Pseudo Floppy) from the 'A' option.
WARNING: This process will require reloading any ABS Patches and custom ABS.
PROCEDURE:
1. From the DM account at TCL type: clear-file data abs
2. SET-FLOPPY (AH
(depending on the drive you will be loading your Pick Data files from).
3. If Pick was loaded from diskette then, insert the original Pick data #1 diskette.
4. Type SEL-RESTORE ABS (I, choose F)ull, Account name on tape = DM Filename = ABS
5. Insert the DATA #2 disk when prompted.
6. From TCL in the DM account type VERIFY-SYSTEM
7. If the system still does not verify, Shutdown and reboot the system (with the System #1 disk or Monitor patch if you have a NATIVE or PRO system), at the option menu choose A)BS and reload ABS using ABS #1 & #2 diskettes or the ABS file listed in the display.
8. The system should verify now.
9. Reload any ABS patches and custom ABS that were previously loaded.
3. If Pick was loaded from diskette then, insert the original Pick data #1 diskette.
4. Type SEL-RESTORE ABS (I
5. Insert the DATA #2 disk when prompted.
6. From TCL in the DM account type VERIFY-SYSTEM
7. If the system still does not verify, Shutdown and reboot the system (with the System #1 disk or Monitor patch if you have a NATIVE or PRO system), at the option menu choose A)BS and reload ABS using ABS #1 & #2 diskettes or the ABS file listed in the display.
8. The system should verify now.
9. Reload any ABS patches and custom ABS that were previously loaded.
Sunday, August 31, 2014
Wednesday, August 27, 2014
How do I suspend or quiesce the UniVerse database?
To perform valid backups of your database, it is important to suspend the database. This prevents modifications of files during the backup process. Our standard backup script uses database suspension with snapshots to create point-in-time images of your database files, but it is also possible to perform the suspension procedure manually:
Do not forget to remove the suspension after you have completed the backup, or users will be unable to use Eclipse.
Log in as root
Run the following command to suspend the database:
uv -admin -L
Run the following command to validate the status of the database:
uv -admin -R
Run the following command to sync any cached data to disk:
sync
At this point, the database files are ready for backup
When the backup is completed, run the following command to release the database:
uv -admin -U
Universe Editor Commands
The EDITOR can be called with the following formats:
ED (file and record id's will be prompted)
ED file (record id's will be prompted)
ED file id (edit the record 'id' in 'file')
ED file id id... (edit multiple id's in 'file')
ED file * (edit all records in 'file')
SELECT ... (may precede 'ED file' command)
Special ASCII characters may be entered as:
...^nnn... where nnn is the decimal character code
...^^... will enter a single UP ARROW character.
An Editor command ending with a '?' will be placed on the command stack, but will not be executed.
The following commands may be used in the Editor:
A - Do the last 'A any' (APPEND) command again.
A any - APPEND 'any' to this line.
ABORT - Toggle command execution ABORT between ON and OFF.
B - Set the current line pointer to the BOTTOM line.
B any - BREAK the current line after 'any' into two lines.
BLOCK - Toggle BLOCK operation verification between ON and OFF.
C - Do the last 'CHANGE' command again.
C/// - CHANGE one or more lines.
Formats permitted are:
C/from/to C/from/to/#
C/from/to/G C/from/to/#G C/from/to/G#
C/from/to/B C/from/to/BG C/from/to/GB
where / - is any delimiter character.
from - is the character string to be replaced.
to - is the character string to substitute.
# - is the number of lines to CHANGE. (The default is one)
G - is the letter 'G' (global) CHANGE all instances in line.
B - is the letter 'B', CHANGE all lines in the defined BLOCK.
CASE - Toggle CASE mode between ON and OFF. When CASE is ON, input will remain in the
case as typed. When CASE is OFF, input will be UPCASEd for case insensitivity support.
TCL CASE insensitivity must be ON to use CASE.
case as typed. When CASE is OFF, input will be UPCASEd for case insensitivity support.
TCL CASE insensitivity must be ON to use CASE.
CAT any - CONCATENATE the next line onto the current line, separated by 'any'.
COL - Display relative COLUMN POSITIONS on the CRT.
COPY - COPY a BLOCK (see '<' and '>' ), source block is unchanged.
D - DELETE the current line.
D# - DELETE '#' lines starting with the current line.
DE - DELETE the current line.
DE# - DELETE '#' lines starting with the current line.
DELETE - DELETE the entire record from the FILE.
DROP - DROP (DELETE) all lines in the defined BLOCK (see '<' and '>' ).
DUP - DUPLICATE the current line.
DUP# - DUPLICATE the current line '#' times.
EX - EXIT the editor (same as QUIT).
F - Do the last 'FIND' command again.
any - FIND the next line that starts with the string 'any'.
F# any - FIND the next line that contains the string 'any' starting in column '#'.
FANCY.FORMAT - Format a BASIC program to show logical structure by indenting. This command is
similar to the FORMAT command except that it handles comments and labels
differently.
similar to the FORMAT command except that it handles comments and labels
differently.
FD - Delete the entire record from the file (same as DELETE).
FI - FILE the record (same as FILE).
FIL - FILE the record under the originally specified name.
FILE name - FILE the record under the specified 'name'.
FILE f name - FILE record 'name' in file 'f'.
FORMAT - FORMAT a BASIC program to show logical structure by indenting.
G# - GO TO line '#' (set line pointer to line '#'; 'G' is optional).
G< - GO TO line defined by the beginning of the current BLOCK.
G> - GO TO line defined by the end of the current BLOCK.
HELP - Prompt user to display HELP information on the CRT.
HELP any - Display HELP information on CRT for 'any'.
I - INSERT new lines AFTER the current line. Prompt for successive lines of INPUT until
NULL input. An INPUT line of a single space will store a NULL line.
NULL input. An INPUT line of a single space will store a NULL line.
IB - INSERT new lines BEFORE the current line. Prompt for successive lines of INPUT until
NULL input. An INPUT line of a single space will store a NULL line.
NULL input. An INPUT line of a single space will store a NULL line.
I any - INSERT (INPUT) the line 'any' AFTER the current line.
IB any - INSERT (INPUT) the line 'any' BEFORE the current line.
L - Do the last 'LOCATE' command again.
L any - LOCATE the next line that contains the string 'any'.
L# - LIST '#' lines starting with the current line on to the CRT.
LOAD name - LOAD the record 'name' from the current FILE; line #'s will be prompted.
LOAD f name - LOAD the record 'name' from file 'f'; line #'s will be prompted.
M - Do the last 'MATCH' command again.
M any - Search for next line that MATCHES the pattern 'any'.
MOVE - MOVE a BLOCK (see '<' and '>' ); source block is deleted.
N - Go on to next selected record; used when SELECT list is active.
OOPS - RESTORE the record to the condition prior to the last change.
P - PRINT on CRT the same number of lines specified with last 'P#'.
P# - PRINT on CRT '#' lines starting with the current line.
PB - PRINT on CRT all lines in the defined BLOCK (see '<' and '>' ).
PE - The PE command allows a user to execute any legal PERFORM command from within
the editor. Upon completion of the command, control will be returned to the editor.
the editor. Upon completion of the command, control will be returned to the editor.
PERFORM - The PERFORM command allows a user to execute any legal PERFORM command from
within the editor. Upon completion of the command, control will be returned to the
editor.
within the editor. Upon completion of the command, control will be returned to the
editor.
PL# - PRINT the current line and the next '#' lines; do not change the current line pointer.
PL-# - PRINT the current line and the prior '#' lines; do not change the current line pointer.
PO# - POSITION current line pointer to line '#' ('PO' is optional).
PP# - PAGE.PRINT a window of '#' lines around the current line; do not change the current
line pointer.
line pointer.
Q - QUIT - EXIT the editor.
QUIT - QUIT - EXIT the editor.
R - Do the last 'REPLACE' (R any) command again.
R any - REPLACE this line with 'any'.
R/// - CHANGE one or more lines (same as C/// command.)
RELEASE - RELEASE the update record LOCK for this file.
SAVE - SAVE (FILE) a copy of this record under the original name.
SAVE name - SAVE (FILE) a copy of this record under the specified 'name'.
SAVE f name - SAVE (FILE) a copy of this record as record 'name' in file 'f'.
SEQ/// - Generate SEQUENTIAL numbers. Formats permitted are:
SEQ/from/start/# SEQ/from/start/#/inc
where / - is any delimiter character.
from - is the optional character string to replace.
start - is the starting sequential number.
# - is the number of lines to SEQUENCE, or the letter 'B'
(sequence in defined BLOCK).
inc - is the optional increment (default is one).
SIZE - Display the SIZE of this record (# of LINES/FIELDS, # of BYTES).
SPOOL - SPOOL entire record to PRINTER.
SPOOL# - SPOOL '#' lines to the PRINTER.
SPOOLHELP - SPOOL the HELP listing to the default PRINTER.
STAMP - INSERT a 'last modified' stamp into the record, which begins with a '*' (for BASIC
'comment'), and contains the account name, LOGIN name (if different from account
name), date and time. Used to mark when record was last changed.
'comment'), and contains the account name, LOGIN name (if different from account
name), date and time. Used to mark when record was last changed.
T - Set current line to the TOP (before first line).
UNLOAD name - UNLOAD to record 'name' in this FILE; line #'s are prompted.
UNLOAD f name- UNLOAD to record 'name' in file 'f'; line #'s are prompted.
X - EXIT (QUIT) from the editor and abandon an active SELECT list.
XEQ - The XEQ command allows a user to execute any legal PERFORM command from
within the editor. Upon completion of the command, control will be returned back to
the editor.
within the editor. Upon completion of the command, control will be returned back to
the editor.
.A# any - Append 'any' to stack command '#'. The default for '#' is 1.
.C#/s1/s2 - CHANGE string 's1' to string 's2' in stack command '#'. The default for '#' is 1. '/' is
any delimiter character.
any delimiter character.
.D# - DELETE stack command '#'. The default for '#' is 1.
.D name - DELETE pre-stored command record 'name' from file '&ED&'.
.D f name - DELETE pre-stored command record 'name' from file 'f'.
.I# - Prompt for successive command lines to INSERT at stack command '#' until null input.
'#' defaults to 1.
'#' defaults to 1.
.I# any - INSERT (INPUT) 'any' at command stack '#'. '#' defaults to 1.
.L# - LIST, on the CRT, the last '#' commands in the command stack. '#' defaults to 9.
.L name - LIST, on the CRT, the pre-stored command string in record 'name' in file '&ED&'.
.L f name - LIST, on the CRT, the pre-stored command string in record 'name' in file 'f'.
.L f * - LIST, on the CRT, the names of the pre-stored command records in file 'f'. 'f' defaults
to '&ED&'.
to '&ED&'.
.R# - RECALL command '#' to stack position 1 (moves command '#', does not copy it).
.R name - RECALL pre-stored command record 'name' to the stack.
.R f name - RECALL pre-stored command record 'name' in file 'f' to the stack.
.S# name - SAVE commands, starting with command '#' and ending with command 1 in the stack,
in record 'name' in file '&ED&'.
in record 'name' in file '&ED&'.
.S# f name - SAVE commands, starting with command '#' and ending with command 1 in the stack,
in record 'name' in file 'f'.
in record 'name' in file 'f'.
.S n s#,e# - SAVE commands starting with command 's#' and ending with command 'e#' in the
stack, in record 'n' in file '&ED&'.
stack, in record 'n' in file '&ED&'.
For example, '.S n 4,2' saves three commands, with stack command #4 becoming
pre-stored command #1, in record 'n' in file '&ED&'.
pre-stored command #1, in record 'n' in file '&ED&'.
.S f n s#,e# - SAVE commands starting with command 's#' and ending with command 'e#' in the
stack, in record 'n' in file 'f'.
stack, in record 'n' in file 'f'.
For example, '.S n 4,2' saves three commands, with stack command #4 becoming
pre-stored command #1, in record 'n' in file 'f'.
pre-stored command #1, in record 'n' in file 'f'.
.X# - EXECUTE stack command '#' and put it in stack position 1.
.X name - EXECUTE the pre-stored commands in record 'name' in file '&ED&'.
.X f name - EXECUTE the pre-stored commands in record 'name' in file 'f'.
.XK - EXECUTE KILL. This command ABORTs a pre-stored command string after execution is
suspended by a PAUSE command.
suspended by a PAUSE command.
.XR - EXECUTE RESUME. This command RESTARTs a pre-stored command string after
execution is suspended by a PAUSE command.
execution is suspended by a PAUSE command.
PAUSE - Is a pre-stored command string command (i.e. It is valid only within the pre-stored
command string itself) that suspends command execution when encountered. A '.XR'
command restarts execution and a '.XK' command aborts execution.
command string itself) that suspends command execution when encountered. A '.XR'
command restarts execution and a '.XK' command aborts execution.
LOOP #1 #2 - Is a pre-stored command string command (i.e. It is valid only within the pre-stored
command string itself) that repeats the sequence of commands beginning with
command '#1' and ending with the LOOP command itself, for '#2' iterations. Both '#1'
and '#2' default to 1.
command string itself) that repeats the sequence of commands beginning with
command '#1' and ending with the LOOP command itself, for '#2' iterations. Both '#1'
and '#2' default to 1.
+# - Advance current line POINTER by '#' lines.
-# - Back up current line POINTER by '#' lines.
# - Set the current line POINTER to the '#' line.
< - Define the first line of a BLOCK (for COPY/CHANGE/DROP/MOVE/PB).
> - Define the last line of a BLOCK (for COPY/CHANGE/DROP/MOVE/PB).
<> - Define first and last line of a BLOCK (for COPY/CHANGE/DROP/MOVE/PB).
^ - Switch UP ARROW on/off to display non-printing characters as ^nnn where nnn is
the decimal equivalent of ASCII code.
the decimal equivalent of ASCII code.
? - PRINT key parameters on the CRT.
Shutdown D3 from the command line
Here is what you need to shutdown D3 from the command line
d3 -0 -n pick0 -d '\rdm\rDM\rDM\rshutdown (y\r'
It can be done in cron (linux) or used with UPS's that shutdown the host in Windows, etc.
Assuming no password on DM account. Otherwise you'll need that in the command line.
D3 Auto Boot
We no longer use /etc/inittab to auto boot D3. It was replaced by a new subsystem called Upstart.
There is now a directory called /etc/init. We must place our d3 boot configuration file in there.
vi /etc/init/d3.conf
# D3 Database start on last console tty12 (alt F12)
description "D3 database server"
start on stopped rc RUNLEVEL=[2345]
exec /usr/bin/d3 -0 -a x -t tty12
Once you save the d3.conf file, you can start D3 one of 2 ways:
1) Reboot and it will start, a good final test
2) Use the command "start d3" and it will execute this new d3.conf file.
To see if it is really running issue this command:
# initcl status d3
d3 start/running, process 5547
To stop d3, just login to D3 and issue the normal shutdown command at TCL. Also, there is d3 -k in Linux but only use this as a last resort.
# start d3
d3 start/running, process 5547
# initctl status d3
d3 start/running, process 5547
Tuesday, August 26, 2014
D3 - Replace variable length strings
I came across an issue where I needed to convert a single (1) character to two (2) characters and the normal CONVERT statement just did not cut it.
So I found this little command buried in the D3 docs called “EREPLACE”
It will convert a variable length string to another variable length string in a record, array or string.
Use:
In your code, you have to put in “$OPTIONS EXT” (without the quotes obviously) preferably in the top of the program where you might have $INCLUDE for instance.
Then you can use this command like this:
NSTRING = EREPLACE(“The new time is…”,”new”,”oldest”)
PRINT NSTRING
Which will print “The oldest time is…”
I hope you can use this in your D3 adventures. There might be other tricks out there, but this worked pretty well and it was very quick.
Let me know if you have any questions.
Friday, July 25, 2014
Adds VP Emulation - Cursor On/Off
In case you do not know how…..
In Adds VP emulation :
Cursor ON is ESC`0
Cursor OFF is (you guessed it) ESC`1
ESC=CHAR(27) (obviously right?)
The single quote is not a single quote but the character under the Tilde on the keyboard.
Universe Editor Commands
Universe Editor
Commands
The EDITOR can be called with the
following formats:
ED
(file and record id's will be prompted)
ED
file
(record id's will be prompted)
ED file
id
(edit the record 'id' in 'file')
ED file id
id... (edit multiple id's in 'file')
ED file
*
(edit all records in 'file')
SELECT
... (may
precede 'ED file' command)
Special ASCII characters may be entered
as:
...^nnn... where nnn is the decimal character code
...^^... will enter a single UP ARROW character.
An Editor command ending
with a '?' will be placed on the command stack, but will not be executed.
The following commands may be used in
the Editor:
A
- Do the last 'A any' (APPEND) command again.
A
any
- APPEND 'any' to this line.
ABORT
- Toggle command execution ABORT between ON and OFF.
B
- Set the current line pointer to the BOTTOM line.
B
any
- BREAK the current line after 'any' into two lines.
BLOCK
- Toggle BLOCK operation verification between ON and OFF.
C
- Do the last 'CHANGE' command again.
C///
- CHANGE one or more lines.
Formats permitted
are:
C/from/to
C/from/to/#
C/from/to/G
C/from/to/#G C/from/to/G#
C/from/to/B
C/from/to/BG C/from/to/GB
where / - is
any delimiter character.
from - is the
character string to be replaced.
to - is the character
string to substitute.
# - is the number of
lines to CHANGE. (The default is one)
G - is the
letter 'G' (global) CHANGE all instances in line.
B - is the letter
'B', CHANGE all lines in the defined BLOCK.
CASE
- Toggle CASE mode between ON and OFF. When CASE is ON, input will remain
in the
case as typed. When CASE is OFF, input will be UPCASEd for case insensitivity support.
TCL CASE insensitivity must be ON to use CASE.
case as typed. When CASE is OFF, input will be UPCASEd for case insensitivity support.
TCL CASE insensitivity must be ON to use CASE.
CAT
any
- CONCATENATE the next line onto the current line, separated by 'any'.
COL
- Display relative COLUMN POSITIONS on the CRT.
COPY
- COPY a BLOCK (see '<' and '>' ), source block is unchanged.
D
- DELETE the current line.
D#
- DELETE '#' lines starting with the current line.
DE
- DELETE the current line.
DE#
- DELETE '#' lines starting with the current line.
DELETE
- DELETE the entire record from the FILE.
DROP
- DROP (DELETE) all lines in the defined BLOCK (see '<' and '>' ).
DUP
- DUPLICATE the current line.
DUP#
- DUPLICATE the current line '#' times.
EX
- EXIT the editor (same as QUIT).
F
- Do the last 'FIND' command again.
any
- FIND the next line that starts with the string 'any'.
F#
any
- FIND the next line that contains the string 'any' starting in
column '#'.
FANCY.FORMAT
- Format a BASIC program to show logical structure by indenting.
This command is
similar to the FORMAT command except that it handles comments and labels
differently.
similar to the FORMAT command except that it handles comments and labels
differently.
FD
- Delete the entire record from the file (same as DELETE).
FI
- FILE the record (same as FILE).
FIL
- FILE the record under the originally specified name.
FILE name
- FILE the record under
the specified 'name'.
FILE f name
- FILE record 'name' in file 'f'.
FORMAT
- FORMAT a BASIC program to show logical structure by indenting.
G#
- GO TO line '#' (set line pointer to line '#'; 'G' is optional).
G<
- GO TO line defined by the beginning of the current BLOCK.
G>
- GO TO line defined by the end of the current BLOCK.
HELP
- Prompt user to display HELP information on the CRT.
HELP
any
- Display HELP information on CRT for 'any'.
I
- INSERT new lines AFTER the current line. Prompt for successive lines of
INPUT until
NULL input. An INPUT line of a single space will store a NULL line.
NULL input. An INPUT line of a single space will store a NULL line.
IB
- INSERT new lines BEFORE the current line. Prompt for successive lines
of INPUT until
NULL input. An INPUT line of a single space will store a NULL line.
NULL input. An INPUT line of a single space will store a NULL line.
I
any
- INSERT (INPUT) the line 'any' AFTER the current line.
IB
any
- INSERT (INPUT) the line 'any' BEFORE the current line.
L
- Do the last 'LOCATE' command again.
L
any
- LOCATE the next line that contains the string 'any'.
L#
- LIST '#' lines starting with the current line on to
the CRT.
LOAD
name - LOAD the record
'name' from the current FILE; line #'s will be prompted.
LOAD f name -
LOAD the record 'name' from file 'f'; line #'s will be prompted.
M
- Do the last 'MATCH' command again.
M
any
-
Search for next line that MATCHES the pattern 'any'.
MOVE
- MOVE a BLOCK (see
'<' and '>' ); source block is deleted.
N
- Go on to next selected record; used when SELECT list is active.
OOPS
- RESTORE the record to the condition prior to the last
change.
P
- PRINT on CRT the same number of lines specified with last 'P#'.
P#
- PRINT on CRT '#' lines starting with the current line.
PB
- PRINT on CRT all lines in the defined BLOCK (see '<' and '>' ).
PE
- The PE command allows a user to execute any legal PERFORM command from
within
the editor. Upon completion of the command, control will be returned to the editor.
the editor. Upon completion of the command, control will be returned to the editor.
PERFORM
- The PERFORM command allows a user to execute any legal PERFORM command from
within the editor. Upon completion of the command, control will be returned to the
editor.
within the editor. Upon completion of the command, control will be returned to the
editor.
PL#
- PRINT the current line and the next '#' lines; do not change the current line
pointer.
PL-#
- PRINT the current line and the prior '#' lines; do not
change the current line pointer.
PO#
- POSITION current line pointer to line '#' ('PO' is
optional).
PP#
- PAGE.PRINT a window of '#' lines around the current line; do not change the
current
line pointer.
line pointer.
Q
- QUIT - EXIT the editor.
QUIT
- QUIT - EXIT the editor.
R
- Do the last 'REPLACE' (R any) command again.
R
any
- REPLACE this line with 'any'.
R///
- CHANGE one or more lines (same as C/// command.)
RELEASE
- RELEASE the update record LOCK for this file.
SAVE
- SAVE (FILE) a copy of this record under the
original name.
SAVE
name - SAVE (FILE) a copy of
this record under the specified 'name'.
SAVE f
name - SAVE (FILE) a copy of this record as
record 'name' in file 'f'.
SEQ///
- Generate SEQUENTIAL numbers. Formats permitted are:
SEQ/from/start/# SEQ/from/start/#/inc
where / - is any delimiter character.
from - is the optional character string to replace.
start - is the starting sequential number.
# - is the number of lines to SEQUENCE, or the letter 'B'
(sequence in defined
BLOCK).
inc - is the optional
increment (default is one).
SIZE
- Display the SIZE of this record (# of LINES/FIELDS, # of BYTES).
SPOOL
- SPOOL entire record to PRINTER.
SPOOL#
- SPOOL '#' lines to the PRINTER.
SPOOLHELP
- SPOOL the HELP listing to the default PRINTER.
STAMP
- INSERT a 'last modified' stamp into the record, which begins with a '*' (for
BASIC
'comment'), and contains the account name, LOGIN name (if different from account
name), date and time. Used to mark when record was last changed.
'comment'), and contains the account name, LOGIN name (if different from account
name), date and time. Used to mark when record was last changed.
T
- Set current line to the TOP (before first line).
UNLOAD name - UNLOAD to record
'name' in this FILE; line #'s are prompted.
UNLOAD f name- UNLOAD to record 'name'
in file 'f'; line #'s are prompted.
X
- EXIT (QUIT) from the editor and abandon an active SELECT list.
XEQ
- The XEQ command allows a user to execute any legal PERFORM command from
within the editor. Upon completion of the command, control will be returned back to
the editor.
within the editor. Upon completion of the command, control will be returned back to
the editor.
.A#
any
- Append 'any' to stack command '#'. The default for
'#' is 1.
.C#/s1/s2
- CHANGE string 's1' to string 's2' in stack command
'#'. The default for '#' is 1. '/' is
any delimiter character.
any delimiter character.
.D#
- DELETE stack command '#'. The default for '#' is 1.
.D
name
- DELETE pre-stored command record 'name' from file '&ED&'.
.D f name
- DELETE pre-stored command record 'name' from file 'f'.
.I#
- Prompt for successive command lines to INSERT at stack command
'#' until null input.
'#' defaults to 1.
'#' defaults to 1.
.I#
any
- INSERT (INPUT) 'any' at command stack '#'. '#' defaults to
1.
.L#
- LIST, on the CRT, the last '#' commands in the command
stack. '#' defaults to 9.
.L
name
- LIST, on the CRT, the pre-stored command string in record 'name' in file
'&ED&'.
.L f
name -
LIST, on the CRT, the pre-stored command string in record 'name' in file 'f'.
.L f
*
- LIST, on the CRT, the names of the pre-stored command records in file
'f'. 'f' defaults
to '&ED&'.
to '&ED&'.
.R#
- RECALL command '#' to stack position 1 (moves command '#', does not
copy it).
.R
name
- RECALL pre-stored command record 'name' to the stack.
.R f
name -
RECALL pre-stored command record 'name' in
file 'f' to the stack.
.S#
name -
SAVE commands, starting with command '#' and ending with command 1 in the
stack,
in record 'name' in file '&ED&'.
in record 'name' in file '&ED&'.
.S# f
name - SAVE commands,
starting with command '#' and ending with command 1 in the stack,
in record 'name' in file 'f'.
in record 'name' in file 'f'.
.S
n s#,e# -
SAVE commands starting with command 's#' and ending with command 'e#' in the
stack, in record 'n' in file '&ED&'.
stack, in record 'n' in file '&ED&'.
For example, '.S n
4,2' saves three commands, with stack command #4 becoming
pre-stored command #1, in record 'n' in file '&ED&'.
pre-stored command #1, in record 'n' in file '&ED&'.
.S
f n s#,e# - SAVE commands
starting with command 's#' and ending with command 'e#' in the
stack, in record 'n' in file 'f'.
stack, in record 'n' in file 'f'.
For example, '.S n
4,2' saves three commands, with stack command #4 becoming
pre-stored command #1, in record 'n' in file 'f'.
pre-stored command #1, in record 'n' in file 'f'.
.X#
- EXECUTE stack command '#' and put it in stack position 1.
.X
name
- EXECUTE the pre-stored commands in record 'name' in file '&ED&'.
.X f
name -
EXECUTE the pre-stored commands in record 'name' in file 'f'.
.XK
- EXECUTE KILL. This command ABORTs a pre-stored command string
after execution is
suspended by a PAUSE command.
suspended by a PAUSE command.
.XR
- EXECUTE RESUME. This command RESTARTs a pre-stored command string after
execution is suspended by a PAUSE command.
execution is suspended by a PAUSE command.
PAUSE
- Is a pre-stored command string command (i.e. It is valid only
within the pre-stored
command string itself) that suspends command execution when encountered. A '.XR'
command restarts execution and a '.XK' command aborts execution.
command string itself) that suspends command execution when encountered. A '.XR'
command restarts execution and a '.XK' command aborts execution.
LOOP
#1 #2 - Is a pre-stored
command string command (i.e. It is valid only within the
pre-stored
command string itself) that repeats the sequence of commands beginning with
command '#1' and ending with the LOOP command itself, for '#2' iterations. Both '#1'
and '#2' default to 1.
command string itself) that repeats the sequence of commands beginning with
command '#1' and ending with the LOOP command itself, for '#2' iterations. Both '#1'
and '#2' default to 1.
+#
- Advance current line POINTER by '#' lines.
-#
- Back up current line POINTER by '#' lines.
#
- Set the current line POINTER to the '#' line.
<
- Define the first line of a BLOCK (for COPY/CHANGE/DROP/MOVE/PB).
>
- Define the last line of a BLOCK (for COPY/CHANGE/DROP/MOVE/PB).
<>
- Define first and last line of a BLOCK (for
COPY/CHANGE/DROP/MOVE/PB).
^
- Switch UP ARROW on/off to display non-printing
characters as ^nnn where nnn is
the decimal equivalent of ASCII code.
the decimal equivalent of ASCII code.
?
- PRINT key parameters on the CRT.
Subscribe to:
Posts (Atom)