Creating, Erasing, and Renaming Files

Creating Files

To create a file, PRO/5 has a number of different forms available:




Create a C-ISAM file


Create a *SIT DIRECT file


Create any type file


Create an INDEXED file


Create an MKEYED file


Create a PROGRAM file


Create a SERIAL file


Create a *SIT SORT file


Create a STRING file

*SIT = Scatter Index Table

Most host systems allow PRO/5 file types (except SIT SORT and SIT DIRECT) to be dynamic. A dynamic file grows as space is needed in the file. A file may be made dynamic by defining it with a number of records of 0.

Erasing Files

A file may be removed from the system by using the ERASE verb. A file may not be ERASEd unless it is OPENable and LOCKable (you must be able to completely own the file). In addition, some host operating systems may not allow you to remove a file from a particular location due to access restrictions, security, etc. The syntax for ERASE is rather simple:

ERASE "file"

Renaming Files

Generally, if a file may be ERASEd it may also be RENAMEd. PRO/5 will not allow you to rename a file to a name that currently exists. The general form of RENAME is:

>RENAME "oldname" TO "newname"

Care should be taken to not attempt to rename files across hardware boundaries such as disk drives or disk volumes. In this case, PRO/5 will return an error.

A file currently OPENed by yourself or by another user may not be ERASEd or RENAMEd.