Monday, September 30, 2019 UniBasic version 11.1.2 Maintenance Release All Rights Reserved. Copyright (c) 1990 - 2019 by: Dynamic Concepts, Inc. Irvine, CA 92618 USA Email address: techsupport@dynamic.com Information: www.dynamic.com Downloads: ftp.dynamic.com Release instructions ==================== o This release requires an SSN authorized for UniBasic release 11. UniBasic can be used in a single user demo mode if the system lacks an SSN. o For Apple Mac OS X systems, this release requires Passport version 4.5 or later. For all other systems, this release requires Passport version 4.1 or later. Any earlier version of Passport should be upgraded before installing UniBasic 11.1.2. IMPORTANT REMINDERS: ==================== UniBasic 11.1 2 will not run with an SSN issued for UniBasic release 10 or earlier. Please acquire and install a UniBasic 11 SSN prior to installing UniBasic 11.1.2. UniBasic 11.1.2 will not run with a release of Passport older than release 4.5 on Apple Mac OS X systems. All other systems require Passport 4.1 or later. Please install the current release of passport before installing UniBasic 11.1.2. Previous versions of UniBasic will run with UniBasic 9 SSNs and the current release of Passport. Highlights of This Release ========================== o Support for Huge+ files with larger indexed files and more up to 4 billion records on 64-bit platforms. Important Files =============== README This file license.txt License terms and conditions unibasic UniBasic executable Installation instructions ========================= 1. Ensure that you have Passport version 4.1 or greater installed on your system. For Mac OS X systems, Passport version 4.5 is required and all DCI products must be updated to the current releases. The latest Passport software can be obtained from www.dynamic.com or ftp.dynamic.com. 2. Login as 'root'. 3. Copy the distribution file to any temporary directory on your system, e.g., "/tmp". Please note that upon successful installation, all files from the current working directory and the current directory will be removed. 4. If the distribution file has a ".Z" extension, uncompress the file using the command "uncompress filename.Z". On Linux systems, use the command "gzip -d filename.Z". If the file has an extension of ".z", rename the file with an uppercase "Z" before uncompressing the file. 5. Unpack the distribution file using the command "cpio -imcdu [1:40]File" The "H+" option letters are used to select the "Huge+" format. A new PREALLOCATE value, 32768, can also be used to create Huge+ Universal files. On 64-bit platforms such 66 (Red Hat 6/7) or 64 (Red Hat 5), Huge+ files also increase the maximum number of records from 2147483647 to 4278190080. On 32-bit systems, using record numbers greater than 2147483647 will result in illegal record number errors. To share huge files across a network, both the file server and the client systems must support sharing files larger than 2 gigabytes in size. o The "H+" option letters ('BUILD #1,"[10:100]file"') can be used to select the "Huge+" format when creating a Universal Formatted, Contiguous, or Indexed file. This option allows a file to grow to 2 terabytes or more in size on operating systems that support user files of that size (see above). o Behavior change: the default value of ISAMMAXSECT has been increased to 32 to simplify use of index files with large block sizes. The default block size, which is controlled by the ISAMSECT environment variable, has not been changed. o Bug fixed: CALL $DXSAVE truncated the names of output files. o Bug fix: the PORT statement and CALL $TRXCO could not attach ports if uniBasic was started with the "-F" (exit after running program) option. Dec 21 2017 (Maintenance Release 10.1.12) o Bug fixed: input action 22, non-destructive backspace, did not work and caused subsequent input on a line to be lost. Aug 29 2017 (Maintenance Release 10.1.11) o Support platform A6, Raspbian (Debian 9) Linux on ARM version 7 (Raspberry Pi 2/3). Jun 8 2017 (Maintenance Release 10.1.10) o Bug fixed: a write protection error occurred whenever the MODIFY statement was used to change permissions on a non-portable uniBasic file. o Bug fixed: CALL 53 sometimes failed if the conversion flag argument wasn't used. o Bug fixed: the VARIABLE command randomly failed with an error if the output was sent to a file and file permissions ("") were not specified. o Bug fixed: MSC(29) returned various values instead of -1. Nov 8 2016 (Maintenance Release 10.1.9) o The ubcntl utility now displays additional information if a system error occurs. o The file magic.txt is now installed in the sys/ directory. The magic.txt file contains instructions on how to extend the Unix/Linux "file" utility to recognize uniBasic and dL4 files. o Bug fixed: the UNIT statement and the "bye" command did not calculate the number of available disk blocks correctly on some Linux systems. Jun 29 2016 (Maintenance Release 10.1.8) o Bug fixed: CALL $RDFHD (CALL 97) did not work on some file systems (such as networked Windows file systems) on 32-bit Linux platforms (36 and 6D). Feb 26 2016 (Maintenance Release 10.1.7) o Bug fixed: in IRIS mode, statements such as 'LET A = B USING "#######.##"' truncated the USING mask if the destination variable was smaller than the mask. Such truncation should only have occurred when the destination variable was a string. o Bug fixed: system errors were sometimes reported when starting phantom ports. Nov 20 2015 (Maintenance Release 10.1.6) o Bug fixed: typing a control-C while executing an INPUT statement or other input function caused an infinite loop. Nov 6 2015 (Maintenance Release 10.1.5) o Platform 6D, a 32-bit Linux platform, is now compiled and linked on a Red Hat Enterprise 5 system rather than on Red Hat Enterprise 3. Red Hat Enterprise 5 is the oldest version of Linux supported by Red Hat. Systems using older versions of Linux may need to be upgraded before using UniBasic 10.1.5. o The "install" script now saves any existing /usr/lib/ub/sys directory to /usr/lib/ub/sys.old before upgrading the sys directory. The "install -p" option can be used to leave the sys directory unchanged and place all new files in /usr/lib/ub/sys.new. When using "-p", the user is responsible for copying any desired files files from sys.new to sys. Sep 16 2015 (Maintenance Release 10.1.4) o Bug fixed: SWAP 100/110/120 statements sometimes corrupted memory. Sep 1 2015 (Maintenance Release 10.1.3) o Bug fixed: programs containing SWAP 100/110/120 statements or using the PSAVE "-ro" option were sometimes loaded incorrectly leading to corrupted programs. Any program using SWAP 100/110/120 statements or using the the "-ro" option should reloaded from text. Aug 5 2015 (Maintenance Release 10.1.2) o Bug fixed: hot key swapping sometimes caused subsequent terminal input to fail or freeze. May 12 2015 (Maintenance Release 10.1.1) o Bug fixed: on some systems, leading zeroes in a logical unit number were not correctly deleted from file paths resulting in "File not found" errors. For example, "02/filename" could not be opened, but using "2/filename" succeeded. o Bug fixed: when a file path had a leading directory name consisting of a zero followed by non-digit characters, the directory name was changed to "sys/". For example, "0somthing/filename" was converted to "sys/filename". The standard behavior of converting "0/filename" or "00/filename" to "sys/filename" has not been changed. Feb 9 2015 (Release 10.1) o The SWAP statement has been extended to call dL4 subprograms when the SWAP mode is 100, 110, or 120. The dL4 subprograms can use all of the features of dL4 such as the socket drivers, SQL drivers, email driver, or GUI programming. To use the new SWAP modes, dL4 version 10.5 or later must be installed. Arguments can be passed in the new SWAP modes in the same manner as in the CALL-subprogram statement. The arguments can be expressions, numeric variables, string variables, array elements, or entire array variables (using the same "[]" suffix as in CALL statements). Array arguments cannot be re-dimensioned in the dL4 subprogram. The new SWAP modes do not pass open channels or COM variables to or from the dL4 subprograms. Syntax: SWAP Mode,"pgmpath",Arg1,Arg2,...,ArgN The three SWAP modes differ in how the user terminal is handled. Mode 100 supports all dL4 mnemonics according to the terminal type and performs normal dL4 terminal initialization. Mode 110 uses a "dumb" or "glass tty" terminal definition that does not support display mnemonics and leaves the terminal state unchanged. Mode 120 supports all dL4 mnemonics according to the terminal type and, if uniBasic window tracking is enabled, preserves the screen (the screen is cleared before the dL4 subprogram is executed and restored after the subprogram exits), SWAPped dL4 subprograms do not appear in the uniBasic TERM or PORT utility listing of active ports but are displayed by the dL4 TERM or PORT utilities. A dL4 subprogram uses a dL4 port number equal to the port number of the calling uniBasic program. If the dL4 port number is in use, the next available dL4 port number is used. The dL4 subprograms invoked by the SWAP statement are not considered additional users but do require an SSN that authorizes dL4. To allow debugging, the SWAP statement normally uses SCOPE to execute dL4 subprograms but will use the RUN utility if the calling unibasic program was started with "unibasic -F". If an error occurs within a dL4 subprogram called by SWAP and the dL4 program does not have error handling, the error will be passed to the uniBasic program at the SWAP statement if the uniBasic program has an error handler or unibasic was started with the "-F" option. If the error is not passed to the uniBasic program, the dL4 subprogram will enter the dL4 debugger. New error codes used by the new SWAP modes: BITS IRIS Error message 163 292 SWAP failed due to incompatible dL4 and uniBasic revisions 164 293 Error copying SWAP program parameters 165 296 A dL4 specific error occurred in a SWAPped dL4 program (this is for dL4 error codes such as SQL driver errors which do not have uniBasic equivalents) When using the SWAP 100, 110, or 120 statements, it is possible to step into or out of a dL4 subprogram using the "." command. The ".." command can be used to step over SWAP 1xx statements. When stepping into a dL4 subprogram, the dL4 debugger will be entered at the first line of the dL4 subprogram regardless of the step count. The step count will be similarly ignored when stepping out of a dL4 subprogram. o An optional fourth numeric parameter has been added to CALL $WHOLOCK. The fourth parameter receives the process id number of the program that has locked the specified record or -1 if the record is not locked. This enhancement makes it possible to identify which user has locked a record even when the port number cannot be determined (for example, if the record was locked by a program which then SWAPped to another program). o A new CALL, $DXSAVE, has been implemented to export the dynamicXport input or output tables to a text file. The syntax of the CALL is: CALL $DXSAVE,TABLE,PATH$ The numeric value "TABLE" must be 0 to export the input table or 1 to export the output table. The string "PATH$" specifies the path of the text file. o An option, "-r", has been added to the "FILE" command to display additional channel information such as the open mode, the current record number, and whether the current record is locked. If the current record is locked, a capital letter "L" is appended to the displayed record number. Syntax: file -r o Behavior change: the CHN() and MSF() functions that return string values now return those strings using their actual dimension rather than a fixed dimension of 256. This change produces more compatible results for applications that use the functions in WRITE statements. o Source files for UniBasic, including user CALLs, have been modernized to use ANSI C function prototypes. Jan 14 2015 (Maintenance Release 9.6.6) o Bug fixed: a memory leak occurred when closing an encrypted file. This could eventually cause a "User partition space exhausted" error. o Bug fixed: the PRINT and INPUT statements did not report an error when accessing an encrypted file and instead used non-encrypted data. The PRINT statement could also corrupt an encrypted file. Dec 4 2014 (Maintenance Release 9.6.5) o Bug fixed: hot key swapping did not work and instead appended old input to the input buffer. Nov 12 2014 (Maintenance Release 9.6.4) o Improved compatibility with Linux signal handling functions on platforms 36, 64, 66, and 6D. Oct 1 2014 (Maintenance Release 9.6.3) o Bug fixed: the MODIFY statement, CALL $RENAME, and the CHANGE utility generated a "file is in use and locked" error when used with universal files if the universal file was currently open by any user. Sep 25 2014 (Maintenance Release 9.6.2) o Bug fixed: CALL $RDFHD (CALL 97) caused a memory violation error on some platforms when it encountered a file that was read protected. Jul 7 2014 (Maintenance Release 9.6.1) o Bug fixed: CALL $DXSET sometimes caused a memory violation error on 64-bit systems such as platform 64 or 66. o Bug fixed: if the UBKEYFILE environment variable was defined but set to an empty string (""), a bad key file error was generated. Apr 16 2013 (Release 9.6) o Enhanced input editing has been implemented as a term file option. The feature is disabled in the standard term files for compatibility with existing applications that may use the same control characters. The feature allows the user to insert, replace, or delete any character in the current input by using arrow keys or control characters. A program can use CALL $INPBUF to set a current input value and then execute an INPUT statement to allow the user to edit the value. The following new input action codes can be defined in the term file: 25 Move cursor left 26 Move cursor right 27 Move cursor to start of input 28 Move cursor to end of input 29 Toggle insert mode 30 Move cursor back one word 31 Move cursor forward one word 32 Invisible toggle echo To enable enhanced input editing, the "crt_input" value in the term file must be set to 1 (default replace mode) or 3 (default insert mode). For Wyse50 and Wyse60 terminals, it is also necessary to uncomment the term file lines that define the cursor left (action 22) and cursor right keys (action 23). The feature can only be used if the 'ML' and 'MR' mnemonics are supported in the term file. In this release, the term files for dL4Term, Wyse 50, and Wyse60 terminals have been prepared for enhanced input editing. If the feature is enabled, the following keys are used: dL4Term Wyse 50 Wyse 60 Move cursor left left arrow left arrow left arrow Move cursor forward right arrow right arrow right arrow Move cursor to start of input HOME HOME HOME Move cursor to end of input END control-N control-N Toggle insert mode INSERT control-T control-T Move cursor back one word control-P control-P control-P Move cursor forward one word control-F control-F control-F o Term files have been enhanced to support multi-character keys for input editing keys. Multi-character keys are keys, such as arrow keys, that generate more than one character when pressed and begin with a unique leadin character. The leadin character for a multi-character key cannot be used as a separate action. For this reason, some multi-character keys in the wyse 50 and wyse 60 term files are commented out by default because they use ESCAPE as a leadin character. To use those multi-character keys, the lines must be uncommented and another character must be used as the escape key (the "^[:6" line must be changed). Multi-character keys are defined in the same way as single character keys. For example, the term file line ^AF0AB:20 defines a control-A followed by the four characters "F0AB" as action 20 (cursor up). Oct 10 2012 (Maintenance Release 9.5.2) o Platform 36 is supported for Red Hat 6 32-bit x86 Linux. Platform 36 is ported on RedHat ES6 and requires a compatible 32-bit or 64-bit version of Linux. o Platform 66 is supported for Red Hat 6 64-bit x86 Linux. Platform 66 is ported on RedHat ES6 and requires a compatible 64-bit version of Linux. Sep 26 2012 (Maintenance Release 9.5.1) o Fixes a problem in which "ubcntl -suspend" did not work on SCO OpenServer systems. Sep 7 2012 (Release 9.5) o To support storage area networks with snapshot features, the new ubcntl utility can suspend all data file updates in uniBasic and dL4 while a snapshot is taken. Suspending updates ensures that index files aren't saved with partial updates which cause broken links and unusable index files. This feature is typically used in a snapshot script with a "ubcntl -suspend" command executed prior to the snapshot and a "ubcntl -resume" command executed when the snapshot is finished. To use ubcntl, all uniBasic and dL4 processes as well as the snapshot script must have the "DL4SUSPEND" environment variable set to "true". The ubcntl utility is installed in /usr/bin. The suspend feature should only be used for snapshots that can be completed in a short period of time (seconds rather than minutes). Any ESCAPE or INTERRUPT character such as "ESC" or "Control-C" will be ignored if it typed while a program is suspended in a WRITE or other file update statement. Instead of using "-suspend", a snapshot script can use "ubcntl -pause N" where "N" is the maximum number of seconds to suspend file writing. Using this option prevents the system from being left frozen if the snapshot script fails to run a "ubcntl -resume" command. dL4 programs will not automatically resume after the timeout unless version 10.2 or later of dL4 has been installed. While updates are suspended, any program that attempts to modify, delete, or create an indexed contiguous, contiguous, formatted, or (in dL4) FoxPro Full-ISAM file will freeze until updates are permitted. A frozen program will not respond to the user typing ESCAPE or to "term evict" commands until updates are resumed. The update suspension does not prevent updates in dL4 of SQL databases or output to text files. The tools/term utility displays the status of a suspended program as "Susp". The PORT mode 3 statement returns a status of 11 for suspended programs. The ubcntl utility is compatible with the dl4cntl (version 10.2) utility and either can be used to control both uniBasic and dL4 file updates. To control uniBasic file updates without effecting dL4 programs, use the ubcntl "-ubsuspend", "-ubresume", and "-ubpause N" options. To restrict suspend and resume operations to a specific administrative user, run the command "ubcntl -init" as that user before any uniBasic or dL4 sessions are started. o Fixes a problem in the makehuge utility that caused an illegal record number error when converting some files. Nov 15 2011 (Maintenance Release 9.4.2) o Fixes a problem where indexes in Indexed-Contiguous files were corrupted when using platform 6D (32-bit Linux) on RedHat 6 and similar Linux distributions. Jul 7 2011 (Maintenance Release 9.4.1) o Fixes a problem that caused Universal Formatted files to become locked indefinitely after a file was extended. Aug 6 2010 (Release 9.4) o Indexes can now be encrypted in encrypted Indexed-Contiguous files. For compatibility and performance, indexes are not encrypted by default. An index is only encrypted if the index was created by SEARCH mode 0 with 16384 added to the key length. Example: ! Create an indexed file with a non-encrypted 20 character index 1 and ! an encrypted 20 character index 2. Dim K$[20],R,S Build #1,"[1:40]file" R = 10 \ Search #1,0,1;K$,R,S \ If S Stop R = 10 + 16384 \ Search #1,0,2;K$,R,S \ If S Stop Search #1,0,0;K$,R,S \ If S Stop Close #1 The encryption status of an index can be determined using SEARCH mode 12 which returns the key length of an index with 16384 added if the index is encrypted. SEARCH mode 12 is otherwise identical to SEARCH mode 1 when used to determine key length. The QUERY utility has been extended to display the encryption status of indexes as part of the key length table. Apr 20 2010 (Maintenance Release 9.3.3) o Fixes a problem where an SSN for combined UniBasic/dL4 users could not be entered using UniBasic. Mar 24 2010 (Maintenance Release 9.3.2) o Uses an improved version of emulated message queue system for Apple Mac OS X. Mar 1 2010 (Maintenance Release 9.3.1) o Fixes a problem where "huge" formatted files were created with the wrong file type and could not be used. Jul 14 2009 (Release 9.3) o This release supports up to 2048 users on Apple Mac OS X. Previous releases of UniBasic for Mac OS X were limited to the number of message queues supported by the operating system (typically only 40). This release uses an emulated message queue system on OS X. Passport 4.5, which also uses the emulated message queue system, must be installed prior to installing or using this release of UniBasic on Apple Mac OS X. o The number of Indexed Contiguous file indexes that can be simultaneously opened is no longer restricted by the value of the ISAMFILES environment variable. The internal tables are dynamically expanded as necessary if ISAMFILES is too small. Note that operating system limits may still apply on the maximum number of open files or record locks. o Fixes a problem where CALL $TRXCO sometimes failed to start a phantom port. o Fixes a problem where setting the PORT environment variable to "" was treated the same as "0". Setting PORT to "" is now identical to not setting the PORT environment variable. Mar 27 2009 (Maintenance Release 9.2.3) o Fixes a problem that caused memory violations and other symptoms when loading a program saved with variables if the program was created with "MAXVARS=extended". o Fixes a problem that caused cursor tracking input on some platforms to return "" instead of a translated arrow key character. Sep 29 2008 (Maintenance Release 9.2.2) o Two command line options, "-v" and "-V", have been added to unibasic to display the full version text or just the version number and then exit. o Behavior change: if a file is expanded beyond the ULIMIT value, an error 90 (BITS) or error 158 (IRIS) will be reported. In previous releases on some platforms, unibasic immediately exited and sometimes created a core dump file. o Fixes a problem in which programs saved with variables (CHAIN SAVE or VSAVE) could not be listed. o Fixes an error that occurred in the QUERY utility when segment options were displayed for files with partially encrypted records. Jul 2 2008 (Maintenance Release 9.2.1) o Data file encryption is now supported on AIX systems (platform 07). This release requires AIX 5.2 or later. o Platform 07 (AIX) is now compiled and linked on AIX 5.2 instead of AIX 4.3.3. Jun 4 2008 (Release 9.2) o Platform 64 is supported for 64-bit x86 Linux. Platform 64 is ported on RedHat ES5 and requires a compatible 64-bit version of Linux. o When using UniBasic with Passport 4.4 or later, a combined UniBasic and dL4 license can be used to license "N" users of either UniBasic or dL4. o The error message for insufficient message queues has been improved. o A simplified installation script named "install" has been added. The new script installs the UniBasic utilities and terminal definitions in the /usr/lib/ub directory. The traditional "ubinstall" script is still available and has not been changed. o Fixes a problem in which cursor addressing expressions in IRIS programs were listed or dumped with semicolons instead of commas and a colon instead of the expected semicolon. Jan 9 2008 (Maintenance release 9.1.2) o Fixes a problem in which a write protection error was reported when reading from an encrypted file that had been opened using ROPEN. o Fixes a problem where the QUERY utility didn't print the starting offset of an encrypted field in a file with partially encrypted records. Jan 3 2008 (Maintenance release 9.1.1) o Compatibility with different Linux distributions has been increased by using static library linking for some, but not all, libraries. o Fixes a problem in which a memory violation sometimes occurred if a SHOW command was used in a program that contained a WINDOW ON statement. Jul 30 2007 (Release 9.1) o Data in Universal Indexed Contiguous or Universal Contiguous files can be now be encrypted. Either entire records or parts of records can be encrypted. In this release, encryption is not supported for keys in indexes. Data can be encrypted using the AES, "Triple DES", or DES algorithms. To use encrypted files, the UniBasic encryption option must be enabled in the SSN. The initial 9.1 release will support encryption on the Linux (6D), SCO OpenServer 5 / UnixWare 7 (55), and Apple Mac OS X (A1) platforms. Other platforms will be supported in the future. A file is encrypted by creating the file with an "N" attribute. Unless the PREALLOCATE 8192 or 16384 option has been set to force creation of Universal files, the "N" should be prefixed with a "U" to select a Universal file. For example, the following BUILD statement creates an encrypted file with fully encrypted records using a key named "CustData": BUILD #1," [1:40] filename" The key "CustData" is NOT the actual passphrase used to encrypt the data. Instead, "CustData" is the logical name of an encryption key that has been previously defined using a SYSTEM 100 statement or loaded from a key file. A key name is case insensitive and can include any character except for a double or single quotation mark. The quotation marks in the filename string surrounding the key name are mandatory. Records in encrypted files cannot span record boundaries. An OPEN, ROPEN, or EOPEN statement does not use any special syntax to open encrypted files. When a previously encrypted file is opened, UniBasic uses the currently defined keys to open the file. If none of the current keys matches the one required by the file, an error 160 (BITS) or 284 (IRIS) is generated. If a current key matches the key name needed to open a file, but the encryption parameters of the key do not match those used to create the file, an error 160 (IRIS 284) will be generated. A file can be encrypted with partially encrypted records by specifying 1 to 16 encrypted segments as part of the "N" attribute. The segment definitions must be placed before the key name using the format "S-E" where "S" is the zero based starting offset of the segment and "E" is the zero based ending offset of the segment. The segments must be defined in ascending order. The example below creates a file in which the first 10 characters and last 6 characters of each record are encrypted: BUILD #1," [1:40] filename" Partially encrypted records are used to decrease encryption overhead or to allow programs to read the non-encrypted sections of a record without a key. To permit reading non-encrypted sections, each encryption segment definition must be followed by a fill code. Three case-insensitive fill codes are supported: "Z" Binary zero fill the segment "S" Space fill the segment "*" Asterisk fill the segment The previous example could binary zero fill the first segment and space fill the second segment using the following format: BUILD #1," [1:40] filename" If the file was then opened without a matching key, read-only access would be permitted. Whenever data was read from a record, it would appear that characters 0 through 9 contained binary zeroes and characters 74 through 79 contained spaces. When using a file with fully encrypted records, this release requires a record size of 64 bytes or larger. Each UniBasic session maintains a list of keys to be used in creating or opening encrypted files. The list is initially loaded with the keys from the optional key file and can be modified during the session by executing SYSTEM 100 statements. The list persists throughout the UniBasic session until UniBasic exits even when different programs are loaded. The key list is NOT passed to separate sessions started via SWAP, SPAWN, or CALL $TRXCO statements. The SYSTEM 100 statement, described in a section below, is used to add, modify, or delete keys in the current key list. If the UBKEYFILE environment variable is defined when UniBasic starts, the string will be used as the key file path for the session. Key files are text files containing one or more key definitions. The key file begins with a readable label line which is followed by a list of key values. The key values are not readable and are encrypted with a user defined passphrase or the standard UniBasic default passphrase. If a user defined passphrase is used, a SYSTEM 100 statement must define the key "SYS_KEYFILE" using the chosen passphrase and cipher before opening or creating any encrypted files. Key files can only be used on the system on which the key file was created (or one with a matching license number). A master key list should always be maintained in an encrypted contiguous or indexed contiguous file using an application defined key. Key files are created using the MAKEKEY utility or by using the SYSTEM statement. Warning: changing any printable character in a key file, including those on the label line, will make the key file unusable. o The SYSTEM statement has been extended with two new modes to support encrypted files. The SYSTEM 100 statement is used to add new keys to the current key list, modify existing keys, or to delete the key list. The following SYSTEM format is used to add a new key or to replace an existing key of the same name: SYSTEM 100,"keyname","passphrase","cipher" where "keyname" is a string expression that specifies the key name "passphrase" is a string expression that specifies the passphrase "cipher" is the name of encryption algorithm. A key name can be any sequence of ASCII characters. Key names beginning with "SYS_" are reserved for special purposes and should not be used for application keys. A passphrase can be any sequence of ASCII characters and must be at least six characters long. The supported cipher names are "AES-256" (256 bit AES), "AES-128" (128 bit AES), "3DES" (triple DES), and "DES". Cipher names are case-insensitive. The recommend ciphers are "AES-256" and "AES-128" where "AES-128" offers somewhat weaker protection but higher performance when compared to "AES-256". Keys can be deleted from the current key list by using a SYSTEM 100 statement with the name of the key and empty strings for the passphrase and cipher. Example: SYSTEM 100,"keyname","","" The entire current key list can be deleted by using "" as the key name to be deleted: SYSTEM 100,"","","" The SYSTEM 101 statement is used to generate a key file string image that contains all of the keys from the current key list (except those that begin with "SYS_"). The SYSTEM 101 statement has the format SYSTEM 101,S$ where "S$" is any string variable. Before executing the SYSTEM 101 statement, "S$" must be initialized with the label string to be used by the key file. When the SYSTEM 101 statement completes executing, "S$" will contain the key file string image (without the key file label string). A key file is created by writing the key file string image to a text file preceded by a label line. The key file string image can written as a single line or as many lines as desired (except for the label line, end of line characters are ignored when UniBasic reads a key file). Before using a SYSTEM 101 statement, the current key list must be deleted and then filled using SYSTEM 100 statements. The following example creates a user specific key file with two keys: DIM I$[32000] SYSTEM 100,"","","" SYSTEM 100,"CustData","abcdefghijkl","AES-128" SYSTEM 100,"Private","gibberish","AES-256" I$ = "Our keys" SYSTEM 100,"SYS_KEYFILE","userpassphrase","AES-256" SYSTEM 101,I$ BUILD #1,+"userkeyfile" PRINT #1;"Our keys" PRINT #1;I$ CLOSE #1 To use this key file, the application would have to define the key "SYS_KEYFILE" before the first open or creation of an encrypted file. All key files are usable only on a system using the same license number as that used when the key files was created. Key files must be 32767 characters or less in length. o A new SYSTEM statement mode, 102, has been implemented to restore the encryption key list from the user key file. If UBKEYFILE is defined and one or more keys have been deleted or modified, executing a SYSTEM 102 statement will cause the user key file contents to be restored into the current key list when the next OPEN or BUILD statement attempts to use an encryption key. Example: SYSTEM 102 o The KILL, MODIFY, and DUPLICATE statements can be used with encrypted files without an encryption key. o A new command line utility, MAKEKEY, has been added to the system directory. The utility is used to create and maintain both user and master key files. A user key file is an encrypted text file that contains a list of encryption key definitions. These key definitions can be automatically loaded when unibasic starts by setting the UBKEYFILE environment variable to the file path. The key definitions can then be used by any OPEN, BUILD, or CREATE statement. A user key file is encrypted with either a standard UniBasic encryption key or a user/application specified key (see "SYS_KEYFILE" below). A user key file is bound to a specific system by the Passport license number. A master key file is an encrypted Contiguous file that contains a list of encryption key definitions. Unlike a user key file, a master key file can be moved between systems, but a master key file cannot be used directly by unibasic. Instead, the master key file must be loaded in the MAKEKEY utility and then written to a user key file for future use. A passphrase must be entered every time a master key file is loaded or saved in the MAKEKEY utility. For high security, user key files should always have a user/application specified passphrase. The application must use a SYSTEM 100 statement to set the "SYS_KEYFILE" key to the key file passphrase and cipher before opening or creating any encrypted files. o Five new error numbers have been defined for use with the new encryption feature: BITS IRIS Error message 159 283 File is encrypted 160 284 Unrecognized encryption key 161 285 Unsupported encryption method 162 286 Inaccessible or corrupt key file 253 273 Not licensed to use this feature o CALL 127 has been extended to return the encryption status of files. If a file is encrypted, an "N" attribute will be set in the attribute characters of the returned filename. Encrypted record segment definitions are returned in an optional numeric array parameter. If used, the array parameter must be DIMmed as "a[128,2]" with the following usage: a[X,0] segment fill type a[X,1] segment item number a[X,0] segment length in bytes where "X" is the segment number. The end of the array is marked by a segment definition with a length of zero. The segment fill type has the following meaning: 0 Segment cannot be read without a valid encryption key 1 Segment is zeroed if read without a key ("Z") 2 Segment is space filled if read without a key ("S") 2 Segment is asterisk filled if read without a key ("*") Example: CALL 127,D$,A,B$,M,I,E ! array E receives segment defs o The QUERY utility has been extended to print the encryption status of files. If only selected record segments have been encrypted, the segment definitions are displayed. o The PSAVE command has been extended with a "-ro" option to prevent modifications without the master OSN. Example: PSAVE -ro 1,pgmname o Behavior change: when opening a filename that begins with a dollar sign, any file with execute permissions will be used in preference to a non- executable file. In previous releases, the first file found in the search list would be opened even if it didn't have execute permission set. o Beta behavior change: files with fully encrypted records are no longer required to have a record length larger than 63 bytes. o Fixes a problem in which an error opening the index portion of a Universal file did not trigger an error branch. o Fixes a beta problem where a parameter error was reported for any attempt to use SYSTEM 100 to delete a specific key ('SYSTEM 100,"keyname","","''). o Fixes a beta problem that prevented record locks from being released until a channel was closed. o Fixes a beta problem in which file encryption did not work on some platforms. o Fixes a problem in which a memory violation sometimes occurred if a CALL to a subprogram failed due to a missing OSN or some other program loading problem. May 18 2007 (Maintenance release 8.1.8) o A new input mode has been implemented to convert all lowercase input characters to uppercase characters. The mode is enabled by executing a SYSTEM 34 statement and disabled by executing a SYSTEM 35 statement. If echo is enabled, lowercase characters will be echoed in uppercase while the mode is enabled. The current mode state is carried across CHAIN and SWAP statements. Mar 23 2007 (Maintenance release 8.1.7) o Because updated daylight savings time rules are not available on earlier operating system revisions, platform 99, SCO OpenServer 5, is now compiled and linked with OpenServer 5.0.7 instead of 5.0.6. Static linking is used to enhance compatibility with older revisions of OpenServer. The 8.1.7 development kit should only be compiled and linked on OpenServer 5.0.7 systems, but the generated unibasic executable can be used on older revisions of OpenServer. o Fixes a problem on SCO OpenServer 5 systems in which SIGNAL 2 and SIGNAL 5 statements with non-zero timeout values less than 10 never timed out. Jan 25 2007 (Maintenance release 8.1.6) o Fixes a problem that caused portation problems on some platforms. Jun 9 2006 (Maintenance release 8.1.4) o Support negative message queue id numbers that sometimes occur on Apple Mac OS X systems. o Fixes a problem that sometimes caused the "-s" option to produce a bad SSN on Apple Mac OS X systems. Apr 12 2006 (Maintenance release 8.1.3) o The Linux platform, 6D, is now compiled and linked on a RedHat 9 system rather than on RedHat 7.3. This platform upgrade was made so that the UniBasic development kit could be linked on current Linux systems. Systems using RedHat 7.x or similar kernels may need to be upgraded before using UniBasic 8.1.3. Apr 7 2006 (Maintenance release 8.1.2) o A new PREALLOCATE value, 16384, selects creation of Huge Universal files. o UniBasic can now read from named pipes. o Fixes a problem in which ubtestlock did not work on Mac OS X systems. Jan 9 2006 (Maintenance release 8.1.1) o UniBasic can now create, read, and write contiguous and indexed contiguous files larger than 2 gigabytes using BITS format data. The files are written in Huge Universal format, but the numeric fields are not portable due to the use of BITS format data. The files are created by using both the "H" (huge) and "Z" (BITS) attributes. Example: BUILD #1,"[1:500]filename" o Fixes a problem where INPUT TIM statements never reported a timeout when standard input was set to /dev/null. Sep 15 2005 (Release 8.1) o SCO OpenServer 6 is supported by platform 55 which has been renamed as "SCO OpenServer 6 / UnixWare 7". Platform 55 is now ported on UnixWare 7.1.4 and this may cause compatibility problems on earlier UnixWare releases such as 7.1.1. o The maximum number of variables can now be increased from 348 to 1113 by setting the MAXVARS environment variable to "extended" when creating uniBasic programs. The number of variables is only increased in new programs; to increase the limit in an existing program, the program must be dumped to a text file and reloaded after a "new" command. If the MAXVARS environment is not set to "extended", newly created program files will be limited to at most 348 variables and the program files will be executable with older releases of uniBasic. Program files created with MAXVARS set to "extended" will only be usable in uniBasic 8.1 or later (a "Not a loadable program file" error will occur if an extended program is loaded in an older version of uniBasic). Setting MAXVARS to "extended" is only required to create programs - it is not needed during program execution. o The PORT environment variable can now set to the value of "any" to force autogeneration of a port number. If this feature is used, the tty name will be ignored and the first available port number starting downwards from the maximum port number will be selected. A profile script can use this feature to prevent telnet connections from using the port numbers assigned to serial ports. o Adds support for systems running Apple Mac OS X 10.4 or later (platform id "A4"). o Adds the ability to read and write standard dL4 Portable Indexed Contiguous, Contiguous, or Formatted files. ANSI characters which are not part of the 7-bit ASCII character set will be ignored when reading from dL4 Portable files. Mnemonic characters cannot be written to dL4 Portable files. o Improves compatibility with RedHat Enterprise Linux Version 3. o Increases the maximum length of terminal type names from the TERM environment variable from 9 to 80 characters. o Adds terminal translation files for "xterm" and "xterm-color" terminals. o Improves handling of improperly disconnected telnet sessions. o Changes unibasic so that it exits if an end of file is detected when reading a command line. o Fixes a problem with PSAVEd programs not running when unibasic was started with the "-X" or "-P" options. o Fixes a problem where using CALL 45 with a bad argument list caused a memory violation. o Fixes a problem such that CALL 65 sometimes caused memory violations. o Fixes a problem in which lpt.iris.sco did not delete lock files correctly on file systems where the inode number exceeded 16 bits. o Fixes a problem where email.sendmail looped forever if an unrecognized command line parameter was encountered. The script will now exit with an "exit 1" statement if a bad parameter is found. Nov 5 2004 (Release 7.2.5) o Fixes a problem in which a spanned record read reported an error 88 if a variable size extended beyond the end of the file. The error should not have occurred as long as some data had been successfully read. o Fixes a problem in which UniBasic would suddenly exit with an "error -22" or "Message queue init: Invalid argument" message. The problem occurred most often on multiprocessor systems with applications that performed a large number of SWAP or SPAWN statements. o Fixes a problem in which the port number was not correctly extracted from a terminal device name. For example, a user running with /dev/pts/123 was given port 23 instead of port 123. Sep 3 2003 (Release 7.2.4) o Compatibility with RedHat 9 Linux has been improved. May 16 2003 (Release 7.2.3) o Huge files (files larger than 2 gigabytes) are now supported on the Alpha platform (BB). o Fixes a problem in which opening an indexed contiguous file using ROPEN sometimes caused recently added or modified keys to be ignored. Feb 21 2003 (Release 7.2.2) o Fixes a problem where the PREALLOCATE 4096 option would sometimes report that a program had written to a deleted record when, in fact, no such error had occurred. o Huge files (files larger than 2 gigabytes) are now supported on the Linux platform (6D). o The Linux platform, 6D, is now compiled and linked on a RedHat 7.3 system rather than on RedHat 6.1. This platform upgrade matches that used by dL4 and was required to support files larger than 2 gigabytes. Systems using RedHat 6.x or similar kernels may need to be upgraded before using UniBasic 7.2.2. o The SCO platform, 99, is now compiled and linked on SCO OpenServer 5.0.6 rather than SCO Unix 3.2.4. o A new CALL, $CALLSTAT, has been added so that programs called by filename can determine the name of the calling program. The syntax of the new CALL is: CALL $CALLSTAT,NAME$ The string variable NAME$ is set to the name of the calling program or to "" if the current program isn't a subprogram. o Fixes a problem in which Portable files created by dL4 were opened as Universal files even though the numeric and/or string data formats were not compatible. Such files are now opened as Unix text files which is the standard open mode for non-UniBasic files. Dec 26 2001 (Release 7.2.1) o Fixes various portation problems for systems that do not support files larger than 2 gigabytes. Oct 16 2001 (Release 7.2) o Universal Indexed, Contiguous, or Formatted files larger than 2 gigabytes in size can now be created on UnixWare 7 or AIX 4.3 systems. The maximum size of the index portion of Universal Indexed files is 256 gigabytes on those systems. The size of the data portion is limited only by the amount of storage space available. To use this feature a file must be created as a huge file using the "H" attribute: Build #1,"[1:40]File" All huge files are also Universal files and can be used by both UniBasic and dL4. Currently, huge files are supported only on UnixWare 7 and AIX 4.3. They are not supported on SCO OpenServer because OpenServer does not allow user files to be larger than 2 gigabytes. In order to build huge files on UnixWare 7 or AIX, the file system must be configured to support files larger than 2 gigabytes. Please see the UnixWare or AIX OS documentation for instructions on how to configure file systems. To share huge files across a network, both the file server and the client systems must support sharing files larger than 2 gigabytes in size. Note: the ISAMSECT environment variable should be set to a value of 8 on any system using huge indexed files. The index portion (.idx) of an indexed file cannot exceed 2 gigabytes in size if the default ISAMSECT value of 4 is used. Files with very large keys (more than 64 characters) may benefit from or even require ISAMSECT values greater than 8. Universal files can be converted to Huge Universal files by using the makehuge utility. Example: #makehuge filename where "filename" is the name or path of an existing Universal file. The makehuge utility cannot change the index node size (ISAMSECT value) of a file. To change the index node size, run the "ubcompress" utility on the file with the new ISAMSECT value before converting the file into a Huge Universal file. Huge files are not supported by the current release (5.x) of IQ for Windows. o A new environment variable, ISAMMAXSECT, has been implemented to define the maximum index file node size that can be opened. Like ISAMSECT, the variable is defined as a number of 128 byte blocks. ISAMSECT still controls the node size of newly created index files. If ISAMSECT is larger than ISAMMAXSECT, then ISAMMAXSECT will be set equal to ISAMSECT. The default value of ISAMMAXSECT is 8 which allows index files with up to 1024 byte nodes to be opened. This default is compatible with the default node size of dL4 index files. The default value of ISAMSECT is 4 as in previous UniBasic releases. o The terminal translation file "term.scoansi" has been modified to be compatible with the SCO OpenServer 5.0.6 system console. Either the new term.scoansi or the old term.ansi can be used on pre-5.0.6 system consoles. o Fixes a problem in which the ubcompress utility changed the index portion of a universal file to a non-portable format. To fix a universal file that has become non-portable, run the command: ubcompress -f filename on the system on which the file was created. The "-f" option will not work correctly if a file has been moved to a platform different from that on which the file was created. When moving to a new platform, the ubcompress utility with the "-f" option should be run on all universal indexed files before the files are moved. The "-f" option will not change universal files that do not have the non-portability problem. o Fixes a problem in which the value "2^31" was sometimes treated as being equal to zero. May 15 2001 (Release 7.1.1) o A new dynamicXport CALL, $DXCOPY, has been added. This new CALL copies the input table to the output table ('CALL $DXCOPY') o Fixes a problem in which the dynamicXport CALL $DXCLOSE would not overwrite an existing file even if the filename included a trailing exclamation mark ('CALL $DXCLOSE,"file!"). Apr 26 2001 (Release 7.1) o Support for writing DynamicXport applications. DynamicXport is a new middleware product from Dynamic Concepts that makes it easier to add web access to existing UniBasic, dL4, or other applications. Five new CALLs have been added for use with DynamicXport. The new CALLs are $DXOPEN, $DXCLOSE, $DXGET, $DXSET, and $DXURL which are described in the DynamicXport programming documentation. These CALLs cannot be used unless the system SSN includes a DynamicXport license. o A new intrinsic CALL, $NCRC32, has been added to calculate 32-bit CRC values of string values. The CALL has two forms: CALL $NCRC32,C,S$ and CALL $NCRC32,C,S$,O where "C" is a 3% or 4% numeric variable that receives the calculated CRC value, "S$" is the string to be checksummed, and "O" is an optional numeric value containing a previously calculated CRC value. The second form is used to calculate the combined CRC value of several strings. In order to support checksums of entire record images, the CRC value is calculated using the DIMmed size of the string and not the current string length. String subscripts can be used to limit the number of string characters included in the CRC calculation. o A new startup option, "-X", has been added to support DynamicXport applications. DynamicXport applications written in UniBasic are started with the command "unibasic -X programpath". This format identifies the program as a DynamicXport application and configures UniBasic with necessary options. The "-X" option disables all terminal I/O (PRINT statements without a channel number will be ignored). The "-X" option is otherwise similar to the "-F" option. o An alternate form of the "-F programpath" option has been implemented to run non-interactive programs. If UniBasic is started using the command line "unibasic -P programpath", then the UniBasic program "programpath" will be executed without the normal startup text and without terminal translation. UniBasic will exit when the program exits. o A new option, "-i k", has been added to the ubconvert and ubconvertfiles utilities to support converting files with IRIS style ("k" attribute) keys. The keys must consist of character data, not binary 8-bit data. May 10 2000 (Release 6.1.5) o Fixes a problem in CALL 28 that caused a memory violation if only one parameter was used ("CALL 28,A$"). Apr 19 2000 (Release 6.1.4) o Fixes a problem that caused the QUERY utility to output no information for Universal Indexed-Contiguous files. o Fixes a problem in CALL 127 and SEARCH that prevented reporting the number of active records in Universal Indexed-Contiguous files. o Fixes a problem in CALL 24 in which no error was reported when a date did not include a year. For example, the string "01/04/**" returned the same successful result as "01/04/00". o Fixes a problem in lptfilter in which using the "-f" option caused a memory violation on some platforms. Feb 4 2000 (Release 6.1.3) o Fixes a problem in the QUERY utility in which incorrect file creation and last access dates were displayed. o Changes platform 6D to use RedHat 6.1 as the Linux reference system. This release may not be compatible with older releases of Linux such as RedHat 5.x or earlier. The platform update is necessary for compatibility with RedHat 6.x and other current Linux distributions that use glibc 2.1 as the C runtime library. o Fixes a problem in CALL 127 in which incorrect file creation and last access dates were returned. o Fixes a problem in CALLs 24, 25, 27, and 28 in which subscripted string and literal string arguments were processed incorrectly or overwritten. o Enhances CALLs 24, 25, 27, and 28 to skip leading spaces in input arguments. o Fixes a problem in TIM(3) and SPC(3) where an incorrect time was returned after the system time was changed or adjusted. o Fixes a problem in which OSNs were not available unless the user had write access to /etc/DCI/osn. o Fixes a problem in $DEVREAD in which fixed length reads returned more than the specified number of characters. o Adds a terminal translation file, term.linux, for a Linux system console. June 2 1999 (Release 6.1.2) o Change platform 55 from "UnixWare" to "UnixWare 7" to reflect move from UnixWare 2x to 7x. o Fixes a problem on Motorola SVR4 (platform C3) where Dynamic Window borders were not printed properly. December 9 1998 (Release 6.1.1.2) o Changes native OS of BB platform from OSF/1 V3 to Digital Unix 4.0 (a later, renamed release of OSF/1 with year 2000 support). o Fixes a problem where "initializing the free list" (unnecessary in UniBasic, but supported for compatibility) in a newly created Universal Indexed Contiguous file resulted in records being allocated twice if the application did not immediately write data to newly allocated records. o Fixes a problem in CALL 56 in which a search failed if the target string match included the end of the dimensioned length of the source string. For example, 'CALL 56,S$,"cd",P' would set P to -1 instead of 3 when S$ was "abcd" if S$ was dimensioned to 4 characters. August 4 1998 (Release 6.1.1) o Fixes a problem where deallocating records that were never allocated in a malfunctioning program eventually exhausted system record lock resources. o For backwards compatibility, CALL 127 now allows the third parameter, filename, to be dimensioned to 31 bytes. However, the Universal Data File attribute, (U attribute) will not be reported. This variable should be dimensioned to 64 for possible future expansion. o Fixes a problem with CALL $DATE, where $DATE incorrectly returned an eight (8) digit date for a six (6) digit requested date. May 18 1998 (Release 6.1) o Universal Data files: these file types are hardware independent, can be moved among different Unix platforms and are fully accessible using UniBasic 6 and dL4. These files are also accessible on IQ for Unix and Windows and dL4. o ubconvert is a user-level utility that converts UniBasic BCD files to Universal Data files. A separate ubconvert document is available from www.unibasic.com. o ubconvertfiles is a low-level utility that converts UniBasic BCD files to Universal Data files. The ubconvertfiles utility is fully described in a separate ubconvert document, available from www.unibasic.com. o New PREALLOCATE value, 8192, selects creation of Universal Data files. o New "communication" calls, $DEVOPEN, $DEVREAD, $DEVWRITE, $DEVPRINT, and $DEVCLOSE. o New scripts $email.mail and $email.sendmail that allow sending email from a BASIC program. o UniBasic no longer incorrectly reports "File is in use and locked" since it now detects if a process died without removing printer lock files. o UniBasic port numbers and Unix process ids are written to printer lock files. o Supports 132 columns for wyse 50 and wyse 60 terminals. The default distribution files for term.wyse50 and term.wyse60 are set for 80 column support. If you plan to use 132 columns for these emulations, please change max_x:80 to max_x:132 in the appropriate Terminal Translation Files, i.e. term.wyse50 and term.wyse60. o Supports 132 columns terminal output. o A new ubtestlock diagnostic program to test record locking in a network environment. o A new sample printer driver, lpt.iris.sco, corrects a 32-bit printer i-node problem for SCO OpenServer users. o All date and time related functions are year 2000 compliant. o Calls 24, 26, 27, and 28 can handle 4 digit years. o New TIM options, TIM(14), TIM(15), and TIM(16), return 4 digit years. User Documentation: =================== A release 8 version of the "UniBasic Reference Guide" is available from www.dynamic.com. A separate ubconvert document is available from www.dynamic.com. Passport: ========= UniBasic 9 requires Passport 4.1 or later. On Apple Mac OS X systems, Passport 4.5 or later is needed. Please install the current version of Passport prior to running UniBasic. The UniBasic installation script does NOT install Passport. The revision number of Passport can be found in /etc/DCI/passport.log or its equivalent error log file. If you attempt to run UniBasic with a Passport older than that required, you will see messages such as: Waiting for response from security daemon ... and eventually an exit. Networking: =========== Although this product was not specifically tested in a network environment, it should work in a properly configured NFS system which can properly handle record locking. The product itself does not use any system calls specific to networking. Please verify that your system is configured correctly if you are having problems using this product in a network environment. For your convenience, this product includes a standalone utility, ubtestlock, to assist you in testing your configuration. Year 2000: ========== In addition to date and time related functions, those user calls that are documented in the "UniBasic Reference Guide" are year 2000 compliant. Effective UniBasic 6, 2 digit years (Y2) are converted by date calls to be in the nearest century based on a plus/minus 50 years rule. A two digit year is thus assumed to be within 50 years, plus or minus, of the current year as returned by the system. For example, if the system returns 1998 as the current year, then the year 47 will be interpreted as year 2047, and year 49 will be interpreted as year 1949. Although UniBasic 9 is year 2000 compliant, an application program itself may have problems with year 2000. For instance, application programs may calculate time incorrectly, compute leap years incorrectly, or sort dates incorrectly. For example, if keys in Indexed Contiguous files contain 2 digit years, then a simple sequential search will NOT correctly sort dates. Dynamic Concepts strongly recommends that all two and three digit years should be converted to a four digit years to avoid any possible misinterpretation. Copyright Notices: ================== UniBasic is a trademark of Dynamic Concepts, Inc. dL4 is a trademark of Dynamic Concepts, Inc. IQ is a registered trademark of IQ Software Corporation. Windows is a registered trademark of Microsoft Corporation.