Different operating systems have different restrictions and naming conventions. To ensure portability across platforms, use the conventions described in this topic when naming your fields, files, tables, and variables.

Characters to avoid

Several characters have special meanings or are invalid in one or more supported operating systems. Avoid using these characters:

/ \ " ’ * ; | ? [ ] ( ) ~ ! $ { } < >

Do not use a hyphen as the first character of a filename. Do not use spaces in filenames; spaces delimit filenames.

Case sensitivity

Although operating system filenames are not case sensitive in Windows, they are on UNIX. On systems where operating system filenames are case sensitive, filenames and command names in uppercase are different from those in lowercase. By convention, lowercase is used for most UNIX filenames.

To ensure portability among operating systems, use lowercase when specifying a procedure name in a RUN statement, and make sure your procedure files have lowercase names on UNIX.

File path specifications

You can use UNIX pathname syntax in OpenEdge procedures in Windows. OpenEdge automatically converts the UNIX pathname syntax to Windows pathname syntax. This can help maintain portability among operating systems.

Use forward slashes (/) as separators in specifying file paths when using the RUN, INPUT FROM, or OUTPUT TO statements. Although OpenEdge running in Windows supports both forward slashes (/) and backslashes (\), OpenEdge running on UNIX supports only forward slashes. OpenEdge automatically converts forward slashes in pathnames to backslashes. Therefore, use forward slashes for the best portability across operating systems.

OpenEdge can only reference UNIX pathnames of up to 60 characters and Windows pathnames of up to 255 characters.

Use environment variables and relative paths instead of hard coding full paths. This allows you to make global changes more easily and creates more meaningful names. This also helps OpenEdge applications appear customized for each environment.

Terminal key definitions

The operating system you port to might expect certain terminal key mappings that do not exist in the environment where you developed your application.

Alternatively, your code might rely on unique key mappings or operating-system-specific terminal control information stored in the user-interface environment files: the PROTERMCAP file on UNIX and the registry or a progress.ini file in Windows. For more information on environments, see Manage ABL Applications.

Consider the following portability issues:
  • If you are planning to port your applications from one operating system to another, use the tilde (~) as an escape character in your application. While versions of OpenEdge running on UNIX interpret both the backslash (\) and the tilde as an escape character, versions of OpenEdge running in Windows interpret only the tilde as an escape character.
  • Wherever possible, use spaces rather than tabs. Spaces are consistent in size regardless of the operating system, but tabs might vary.
  • Use KEYFUNCTION in code logic, which is portable across platforms. Use KEYLABEL in messages to the user.