z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


STOW DISC—Closing a UNIX File

z/OS DFSMS Using Data Sets
SC23-6855-00

BPAM keeps open each UNIX file that is being read. You can use the STOW DISC macro to disconnect from a UNIX file to optimize storage usage. To use the STOW macro, specify DSORG=PO or POU in the DCB macro. The UNIX file also closes when the task ends.

If your program does not issue STOW DISC, the CLOSE macro automatically issues STOW DISC for each connected file. If the file cannot be closed, STOW DISC returns status code 4 and issues an error message. That different tasks issue the FIND and STOW macros for the same file can be a possible cause of errors.

A UNIX file cannot be deleted between the time a program issues FIND or BLDL for the file until the connection for the program ends and BPAM closes the file. For programs that run for a long time or access many files, keeping this connection open for a long time can be a processing bottleneck. The connections consume virtual storage above the 16 MB line and might interfere with other programs that are trying to update the files. The solution is for the application program to issue the STOW DISC macro to close the file as soon as it is no longer needed.

To reaccess the UNIX file, the application program must reissue the BLDL or FIND macro.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014