# Differences between DOS/Windows and Unix

NOTE: This sections refers to the old DOS file formats and does not apply to 32 bit Windows versions that support long filenames.

This Section Contains

Overview

The Unix and DOS filename limitations

Color

The USER Command

Case Sensitivity

The Slash and the Backslash in filenames

File Permissions (Attributes)

Filesystems

Overview:

There are several differences between these operating systems that affect filePro. The most important is the old filename limitation from early versions of DOS. When DOS was originally designed it allowed for 8 character filenames and a 3 character extension to that name (the extension follows a "." period). This naming convention has come to be known as 8.3, eight characters a period and three more characters. When you see a DOS directory, (by issuing the DIR command) as in:

DIR

You might see:

Volume in drive C has no label
Volume Serial Number is 3C5C-1EF1
Directory of C:\FILEPRO\STATES

. |  | <DIR> |  | 03-18-97 | 3:48p | .
.. |  | <DIR> |  | 03-18-97 | 3:48p | ..
DATA |  |  | 0 | 12-04-89 | 4:55p | DATA
DEFAULT | OUT |  | 1,344 | 12-30-88 | 5:01p | DEFAULT.OUT
INPUT | PRC |  | 344 | 12-30-88 | 5:21p | INPUT.PRC
INDEX | A |  | 923 | 01-11-89 | 2:15p | INDEX.A
KEY |  |  | 3,618 | 11-08-88 | 6:30p | KEY
MAP |  |  | 110 | 05-16-89 | 1:07p | MAP
MAP | TMP |  | 110 | 05-16-89 | 1:07p | MAP.TMP
SCREEN | 0 |  | 3,282 | 06-30-92 | 1:19p | SCREEN.0
| 7 file(s) | 9,387 bytes |  |
| 2 dir(s) | 57,999,360 bytes free |

The actual name of the files and directories appears on the right side of this display. The left shows a space when there is really a period in the name. If you wanted to erase a file, you could not type:

erase INDEX A

You would have to type:

erase INDEX.A

The Unix and DOS filename limitations

The 8.3 and 14 character limitations of the early versions of both these operating systems constrains your creativity just a bit... or challenges it. Because of this 8.3 file naming convention, filePro changed some of its component names from their original Unix(Xenix) names. Under Unix the name would be "out.default", under DOS it is "default.out". This is true of some other filePro filenames, processing tables are "prc.name" and "name.prc", selection sets are sel.name and name.sel, etc. This does not ever present a problem for you as a filePro user since filePro always handles all these names for you automatically. However, there is one caveat that is important. If you are writing filePro programs that you want to work both under Unix and DOS, you must make sure not to exceed the 8.3 filename constriction when designing your application. This impacts most heavily on screens. Under Unix, screen names can be up to 7 characters long, under DOS the limitation is 3 characters.

Example:

Unix screen.bigname
DOS screen.big

This was the one filePro component which did not take advantage of reversing the order from Unix to DOS.

In any case, if you are going to want to run your apps under both DOS and Unix, remember to pick only eight character names for most filePro components and the name of the actual filePro directory, and only 3 character names for screens. In this way, you can transfer the application from one side to the other without too much problem at all.

Color

DOS supports full color screen design. The Unix system only supports full color on ANSI based terminals/consoles, however, Unix filePro will only display color screens correctly. That is, Unix filePro does not allow you to design a color screen, but it will display a color screen designed under DOS and transferred to Unix.

Unix does have six native color allocations. You can set these six colors (under SCO Unix) with the "setcolor" command. The six associations are for foreground and background text, foreground and background reverse video, and foreground and background graphic lines. These six global settings will be displayed by Unix filePro.

Login ID's (users)

The Unix O/S assigns a user name (and ID#) to every login session. Unix filePro can take advantage of this unique ID. There is no analog for this under DOS or Network-based filePro..

The USER Command

Under Unix, filePro can hand values a "user-based" program that is executed by the operating system and gather back returned values from that program. This is not possible under DOS. However, Windows 7 and higher added the ability for the USER command to work so it was added to the Windows compiles.

Case Sensitivity

The older DOS operating systems were case-insensitive. This means that you could type in either lower or UPPER case and the system would convert your input to UPPER case automatically. If you executed the command:

ERASE truck

DOS would remove the filename TRUCK.

This is important because filePro uses the system to find files and is also case insensitve in this regard. If you ask filePro to look into a file called "truck" or one called "TRUCK" it will get the file called "TRUCK".

Under Unix, case is VERY important. If you ask to do something to a file called "truck" and there is only a file called TRUCK, Unix will say something like "truck not found". The following filenames are all completely different and unique under Unix:

filename
FILENAME
fileNAME
FiLeNaMe
(etc.)

The Slash and the Backslash in filenames

DOS uses the backslash "\", Unix uses the slash "/". An easy way to remember which is which: The slash is the one used in fractions, i.e., ½, ¾, etc. The backslash is the other one. It is important to use the right one for each operating system, but more and more programs (including filePro) are allowing you to use either and making the necessary substitution for you automatically. However, at the command line, or in scripts (and batch files) the shells of either O/S will NOT make this substitution... you must get it right. Slash / for Unix, backslash \ for DOS.

File Permissions (Attributes)

Each operating system protects its files from being removed, overwritten and abused by unauthorized people. Under Unix, the system uses an elaborate permission scheme involving the owner of a file, his or her group and the rest of the world. The permissions can be set by the owner of the file to allow or dissallow read, write and execute permission for this file to any of these users (owner, owner's group, world). The permissions also denote whether a file can be "executed", that means run as a program. You would not need to make a word processing document executable, however, you would want to make a script that performs some work for you executable. The "chmod" (change modification) comand is used to set a files permissions. See the index for more on Unix permissions and ownerships.

Unix also designates the "owner" of every file or directory in a filesytem. FilePro makes use of this security feature by naming all of its directories and files owned by the user "filepro". This user is installed on the system before filePro will run on a Unix system. The "chown" (change owner) command is used to change a file's ownership. See the index for more information.

DOS has a series of "attributes" for filenames and directories. These attributes denote a file's accessibility, whether it has been backed up since the last backup, etc. whether it is hidden or visible, readable, etc. These settings are not important to filePro as long as the file(s) needed are not "read-only". There might be some sharing problems across various networks, but that is something the network should handle correctly.

Filesystems

Filesystems under DOS are sometimes called "drives". C: is a filesystem, D: is another filesystem. The association is out of date now. It comes from a time when each drive was turned into one filesystem. Now a hard drive can be partitioned into many filesystems, they are still given letter names in DOS D:, E:, F: etc.

Under Unix, filesystems are not called "drives". They are still, however, a partition of any particular drive. Under Unix, they may have a name like "/u/hd2" or /u, or /u/appl.

A typical filesystem is organized into directories. Under DOS/Windows these directories are also called "folders". A directory may contain other directories and/or files. A file can be anything from a screen layout, an ouput format or a plain text file that describes the organization of your database. Files can be plain text files which can be read by humans or they can be binary files which can only be deciphered by the computer. A file can be a program, a document, device description, etc. The computer opens files to do all of its work, including loading its own brains into memory at startup... so it can do all the other things it does. The brains of the computer are also stored in a file somewhere on the hard disk. A built in "startup" routine within the computer's Basic Input Ouput System (its BIOS) tells it how to find this file and how to load it into memory so that it can be a computer and not a useless hunk of junk. Once the computer has loaded the files it needs into memory (for its own well being) then it can assist you in loading your files and programs.

FilePro is a collection of programs in a directory called "fp". This directory can sit anywhere (under any other directory or long chain of directories) as long as the program itself knows where this directory is located. The filePro applications that you write and use are also a collection of files and directories. Each filePro "file" is really a directory under the "filepro" directory. The name of the filePro file is the name of the directory. Under this directory are the various screens, output formats, processing tables and data which this file uses. The two directories "fp" and "filepro" are very important to filePro and it must know how to locate these files. Special environment variables are used by filePro to find these directories. If these environment variables that point to "fp" and "filepro" are empty, filePro uses default values.