{
{ PURPOSE:
{       The purpose of this request is to create or locate the mainframe
{   file tables for a particular file.  If the mainframe file tables for the
{   file already exist, a usage count for the file will be incremented
{   and the system file id for the file will be returned.  If the file
{   tables do not exist, they will be built using the information
{   supplied with the attach request, the usage count will be incremented
{   and the system file id for the file will be returned.
{
{ NOTES:
{   Permanent_file recovery uses the RESTRICTED_ATTACH, EXIT_ON_UNKNOWN_FILE
{   and EXISTING_SFT_ENTRY parameters to prevent an overflowed file from
{   being attached with an incorrect stored_fmd and to insure the integrity
{   of files attached before the point_of_commitment.
{     If the PF catalog indicates a file is attached in write mode and no
{   entry for the file is found in the system_file_table there is a possibility
{   the file has overflowed and the PF catalog was not updated. In this
{   situation dmp$attach_file should exit before attaching the file with
{   a possibly incorect stored_fmd. Permanent_files will recognize this
{   condition, reconcile the fmd, and call dmp$attach_file with the updated
{   stored_fmd.
{     When a file is being attached before the point_of_commitment the PF
{   catalog cannot be modified. For all files attached before the point
{   of commitment a field in the fmd_header will be set to force PF to
{   update the stored_fmd in the catalog since there is no way to
{   determine if the file has overflowed.
{
{          DMP$ATTACH_FILE (GLOBAL_FILE_NAME, FILE_TYPE, STORED_FMD,
{                FILE_USAGE, FILE_SHARE_SELECTIONS, FILE_HISTORY, FILE_LIMIT,
{                LOCKED_FILE, RESTRICTED_ATTACH, EXIT_ON_UNKNOWN_FILE,
{                SERVER_FILE, SYSTEM_FILE_ID, EXISTING_SFT_ENTRY, STATUS);
{
{  GLOBAL_FILE_NAME:(input)  This parameter specifies the name of the file.
{
{  FILE_TYPE:(input)  This parameter specifies the type of file being
{                     attached.
{
{  STORED_FMD:(input)  This parameter specifies the stored mass
{                 storage file medium descriptor for the file.
{
{  FILE_USAGE:(input)  This parameter specifies how the file will be used.
{
{  FILE_SHARE_SELECTIONS:(input)  This parameter specifies the manner
{                                 in which other jobs may concurrently
{                                 access the file.
{
{  FILE_HISTORY:(input)  This parameter specifies a count of the previous
{                        usage of the file.
{  FILE_LIMIT:(input)  This parameter specifies the maximum length of the file.
{
{  LOCKED_FILE:(input)  This parameter specifies whether the file is to be
{                       attached in lock mode.
{
{  RESTRICTED_ATTACH: (input) This parameter specifies whether the file is
{       being attached prior to the point of commitment.
{
{  EXIT_ON_UNKNOWN_FILE: (input) This parameter specifies whether the file
{       should be attached if it it determined that the file is not currently
{       attached. For most situations this should be set to FALSE. During PF
{       recovery if PF expects the file to be attached it will set this
{       parameter to TRUE to prevent the file from being attached incorrectly.
{
{  SERVER_FILE: (input)  This parameter indicates that the file being attached
{       is on the server mainframe.
{
{  SYSTEM_FILE_ID:(output)  This parameter returns the system identification
{                           for the file.
{
{  EXISTING_SFT_ENTRY: (output)  This parameter returns an ordinal value
{          indicating the presence of an existing entry in the system file
{          table and the type of entry if one exists.)
{
{  STATUS:(output)  This parameter returns the request status.
{
