The bs2fs file system enables you to access BS2000 files using POSIX interfaces (commands and program interfaces).
To do this, the user must specify the set of files with which they wish to work (using BS2000 wildcard syntax) and have these files mounted (by the system administrator) in POSIX as a bs2fs file system. This mount operation makes these BS2000 files accessible to the user in POSIX. These files can then be edited in the bs2fs file system using POSIX commands or from POSIX programs.
To enable these accesses, when the first access takes place in the bs2fs file system (first open), a background process (daemon) copies the files concerned from BS2000 to a special ufs fie system in POSIX which was mounted solely for this purpose (bs2fs container). Only the system may access this file which is stored temporarily in the bs2fs container. Access by a user take place only to the file mounted below the mount point in the bs2fs file system. The system redirects this access to the file stored in the bs2fs container.
In the case of write accesses, the file is locked for other users in BS2000, but the bs2fs file is not locked for other POSIX users. After processing in the bs2fs file system has been completed, a daemon transfers the file back to BS2000 again. After this has been done, it can then also be accessed there by other BS2000 users. As long as only information functions such as ls are executed, no copy function by a bs2fs daemon is initiated. The ls command merely outputs the files determined in BS2000 using FSTST as POSIX path names from the bs2fs mount point.
To summarize, use of the bs2fs file system therefore offers the advantage that the user no longer needs to copy each individual file from BS2000 to the POSIX file system (e.g. with bs2cp) in order to be able to edit them with POSIX means. The user need only define the required BS2000 file set and have this mounted by the system administrator. The file set
defined can consist either of files which already exist or ones which are to be created later. Transfer between BS2000 and POSIX and in the opposite direction is executed invisibly for the user of copy daemons as soon as a file is opened or when write processing has been completed.
The use of bs2fs file systems offers, for example, the following options:
BS2000 files and PLAM library elements can be searched according to particular patterns using the POSIX command grep.
make can be used to generate programs or program systems efficiently.
Nested procedures in which multiple switches between the BS2000 command level and the shell take place can be replaced by pure POSIX shell scripts if the required BS2000 files are mounted beforehand in a bs2fs file system.