Frequently Asked Questions - DL4
The Unix file command can properly identify dL4 and UniBasic files by adding lines such as these to the /etc/magic file:
| 0 | string | SAVE | uniBasic saved BASIC program |
| 0 | string | SYST | uniBasic system BASIC program |
| 0 | string | INDX | uniBasic indexed data file |
| >20 | short | >0 | - record length = %d |
| 0 | string | DATA | uniBasic data file |
| >20 | short | >0 | - record length = %d |
| 0 | string | ITEM | uniBasic formatted item file |
| >20 | short | >0 | - record length = %d |
| 0 | string | CONT | uniBasic contiguous file |
| >20 | short | >0 | - record length = %d |
| 0 | byte | 0x61 | c-tree key file |
| 0 | long | 0x1919ba2e | Portable or Universal Contiguous file |
| 0 | long | 0x2eba1919 | Portable or Universal Contiguous file |
| 0 | long | 0x1919ba2c | Portable or Universal Formatted file |
| 0 | long | 0x2cba1919 | Portable or Universal Formatted file |
| 0 | long | 0x1919ba32 | Portable or Universal Huge Contiguous file |
| 0 | long | 0x32ba1919 | Portable or Universal Huge Contiguous file |
| 0 | long | 0x1919ba31 | Portable or Universal Huge Formatted file |
| 0 | long | 0x31ba1919 | Portable or Universal Huge Formatted file |
| 0 | long | 0x1919ba2b | dL4 2.x program file |
| 0 | long | 0x2bba1919 | dL4 2.x program file |
| 0 | long | 0x1919ba30 | dL4 3.x program file |
| 0 | long | 0x30ba1919 | dL4 3.x program file |
The above lines will have to be modified on some Unix systems due to differences in the magic file format. On some systems, such as Linux, the magic file will reside in /usr/share or /usr/share/file and the command "file -C -m /usr/share/magic" must be executed before the file command will use the new definitions. If the "file -C" command produces a magic.mgc file in the local directory, then that file should be copied over the existing magic.mgc file in /usr/share or /usr/share/file.
dL4 is now ported using UnixWare 7.1.4 for compatibility with OpenServer 6 and to improve MySQL support. On older releases of UnixWare, this may cause error messages about libz or libm. Such errors can be corrected by loading libz and libm from maintenance packs or runtime library updates. For example, UnixWare 7.1.1 would need to have libz loaded as an optional component from UnixWare Maintenance Pack 5 (available from SCO) and would also need libm installed from the UnixWare 7.1.3 (UDK) Runtime Libraries (available from SCO at http://wdb1.sco.com/clbk_web/owa/dwn_customer).
This problem occurs because the user password mechanism in MySQL was changed in MySQL 4.1 and later. If you are using dL4 6.1 or earlier, the problem can be fixed by switching the MySQL server to the old password mechanism as described in http://dev.mysql.com/doc/mysql/en/old-client.html.
On all systems, dL4 files can be as large as 2 GB, which is the maximum file size supported by most Unix operating systems. On Linux, AIX, UnixWare, OpenUnix, or Windows NT/2000/XP systems, a new form of Portable file, called a "huge" file can be larger than 2 GB. A huge file is created with the "H" attribute or by using the dL4 makehuge utility to convert an existing file into a huge file. It may be necessary to configure special operating system or file system options in order to use huge files.
UniBasic BCD Contiguous, Formatted and Indexed files can be converted to Universal Data files using the ubconvert utility, available with UniBasic version 6 or greater.
IQ for Windows and IQ for Unix can read Portable files. In addition, IQ for Windows and IQ for Unix (effective version 4) can read Portable files created as Universal Data files.
Portable files created as Universal Data files under dL4 are product independent and are fully accessible to UniBasic.
Universal Data files created by dL4 are fully compatible with the current releases of UniBasic, IQ for Unix, and IQ for Windows.
Universal files can be created by using a <U> attribute or both the NUMMAP=IRIS and CHARSET=IRIS options as part of the BUILD statement. For example, either of the following statements create Universal Contiguous files:
BUILD #1, "<U> [1:10] contfile"
BUILD #1, "(nummap=IRIS, charset=IRIS) [1:10] contfile"
In dL4 version 5 or later, the DL4DRIVERS environment variable or Windows registry entry can be used to make Universal files the default file format (DL4DRIVERS=Universal).
The minimum revision level for Universal Data files are UniBasic 6, dL4 3, IQ for Unix version 4 and IQ for Windows version 5.
Universal Data files are product and hardware independent data files. They are Portable files that contain UniBasic BCD data. Like all other dL4 Portable files, they may be shared or moved among different Unix platforms without conversion. In addition, they may be used concurrently with UniBasic, dL4 for Unix and Windows, and IQ for Unix and Windows.
Yes, but if files on the Unix/Linux server are to be accessed concurrently by both Windows and Unix applications, it may be necessary to set Samba configuration options so that Window and Unix/Linux record locking are handled identically. Please check your Samba documentation for any references to record or file locking configuration.
Although dL4 is 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.
dL4 for Windows will work properly in a Microsoft network file system. It is, however, not tested for Novell networks.
A balanced Indexed-Contiguous file is a file in which each directory contains one and only one key pointing to the data record. Conversely, each data record must have one and only one key in each directory.
The Bridge driver provides an easy way to use Full-ISAM files without changing existing code written for Indexed-Contiguous files. This allows older programs to be used unchanged while new programs use Full-ISAM access, the recommended access method. The indexes emulated by the Bridge driver can either be balanced indexes and part of the Full-ISAM file or external indexes contained in separate files.
All files created under dL4 are portable files by default. However, on the UNIX operating system, a UniBasic file may be created using the AS clause. For example, the following statement creates a UniBasic Contiguous file.
BUILD #0, "[10:10] testfile!" As "UniBasic Contiguous"
A Full-ISAM file can be a maximum of one gigabyte (1 GB).
dL4 for Windows can read UniBasic Universal Data files. All other UniBasic files (except for text files) use platform/operating-system dependent formats and can only be accessed on the platform that created the files.
A native filename is any filename using an absolute path. All other filenames, i.e. those using relative paths, are treated as portable filenames. While native filenames are passed unchanged to the operating system, portable filenames are case insensitive.
On a UNIX system, a filename that begins with a "/" is a native filename and it is case sensitive. Under Microsoft Windows operating system, a filename that begins with "<drive-letter>:\" (a DOS style path) or "\\" (a Microsoft UNC path), is a native filename.
For platform compatibility, usage of portable filenames are encouraged.
Related Article: June, 1997 Technical News
The FoxPro Full-ISAM driver implements FoxPro version 2.6 files and the following are FoxPro limitations. Non-FoxPro Full-ISAM drivers have different limit values.
Maximum number of fields per record: 255 Maximum length of a character field: 32767 characters Maximum number of directories: 47 Number of decimal places in numeric fields is required. Record name parameter is ignored. Binary fields are not definable in BASIC. Key part allowable options are: Uppercase (for string fields) Number of decimals (for numeric fields) Directory allowable options are: Descending sequence Ascending sequence |
Please refer to the "Full-ISAM file" documentation available from our Download Center on our Web Site.
dL4 supports reading through locked records if a file is opened with the ROPEN statement or with the "LW" open options.
The dL4 Logical Unit Search Table (DL4LUST) searches each directory in the search table to locate a file. The search continues with the next search table entry until the file is either located or the end of search table is reached.
Unlike DL4LUST, LUMAP does not use a search mechanism. Instead, it maps a relative file path to an absolute file path using a mapping mechanism. For example, if LUMAP had the value "data=/usr/files", then the relative path "data/customer" would be mapped to the absolute path "/usr/files/customer". If a mapping is found in LUMAP when opening a file and the file is not found, the "File not found" error will be reported without searching for or mapping additional paths.
LUMAP, introduced in dL4 version 3, is a runtime parameter which specifies a list of logical directory names and the absolute path of the actual directories. The list is used to map relative file paths to absolute file paths.
Related Article: Lumap for dL4
DL4LUST is a search path used to locate both data files and program files. DL4LUST is an environment variable or Windows registry entry similar to LUST under UniBasic, but using spaces to separate paths rather than colons. DL4LUST has both the strengths and weaknesses of LUST. For example, it is possible to kill a file, yet have the file seemingly remain (when there are two files of the same name in different search directories). It is also possible to build a file when the file already exists (in a secondary search directory). The multiple directory searches needed by DL4LUST can cause substantial performance degradation, especially when accessing files over a network. Using LUMAP instead of DL4LUST avoids these problems. DL4LUST was introduced in dL4 version 5.
Related Article: September, 1997 Technical News
dL4 locates data files using either an absolute path or a relative path. An absolute path (?/data/customer? or ?C:\data\customer?) is used without any translation. A relative path (?customer? or ?files/customer?) may be translated via LUMAP, introduced in dL4 version 3, or found in the DL4LUST search path, introduced in dL4 version 5.
Related Articles: June, 1997 Technical News, September, 1997 Technical News
The makeosn utility is included with Passport For Unix version 3.6 and Passport For Windows 1.4, both available from our Download Center
.
On most Unix systems, using the "-a" option with cpio alters the "change time" on each file that is processed. Do not use the "-a" option when backing up files in the /etc/DCI directory or skip the /etc/DCI directory when performing backups.
This problem can be avoided by using a hardware passport device.
runw uses the same preference settings as scopew and thus, setting the preferences for scopew also affects runw.
A two (2) seconds delay is recommended in between calling $TRXCO for the port to initialize itself.
Old releases of IQ for Unix or Windows may not work properly with some Universal Data files. These problems can be solved by installing the current release of IQ.
The TZ environment variable should be set to include the new daylight savings time starting and end dates. In the United States, this requires adding the string ",M3.2.0,M11.1.0" to the end of the normal TZ value. For example, a Pacific timezone setting of "PST8PDT" must be changed to "PST8PDT,M3.2.0,M11.1.0". The TZ value can be changed in the user profile or in the file /etc/TIMEZONE. If the value is changed in /etc/TIMEZONE, the system must be rebooted to use the new value.
A dL4 for Windows installation file is an executable program. To install dL4, run the installation file as a user with administrative privileges. The installation procedure is described in more detail in the dL4 Installation and Configuration manual and in the current readme.txt file.
A dL4 for Unix or Linux installation file is a compressed CPIO file archive. To install dL4, you must unpack the installation file into a temporary directory as "root" and then run the "install" script from the package. The installation procedure is described in more detail in the dL4 Installation and Configuration manual and in the current readme.txt file. The separate Passport software product must be installed before using dL4.
