[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface: ISO PHIGS Subroutine Reference

OPEN ARCHIVE FILE (PHOP,*,*,*)

Purpose

Use Open Archive File to open a graPHIGS API archive file.

This subroutine function sets the current archive state to Archive Open (AROP). The graPHIGS API adds the archive file identifier to the set of open archive files.

The graPHIGS API External Defaults File (EDF) allows the application to denote, indirectly, the actual value of the file descriptor. For more information on the External Defaults File, see The graPHIGS Programming Interface: Technical Reference under "Defaults and Nicknames".

Language Bindings

C

popen_ar_file (archive_id, archive_file)

Input Parameters

Pint archive_id
Archive file identifier.

const char *archive_file
Archive file descriptor. This parameter looks like a Unix AIX file descriptor which consists of a [path]/filename[extension]. Path is the route of directories through the file system on an AIX system. Path is optional and ignored for MVS and VM. An example of a full file descriptor:
     /phigs/file1.archive
where:

  • path = /phigs which says go from the root directory to the directory phigs.

  • filename = file1

  • extension = .archive The following rules apply to the descriptor, depending on which system the nucleus is running in:

  • AIX

    If you did not specify the path, then the graPHIGS API uses the default directory at the time of the execution of the subroutine.

  • MVS

  • filename - You must specify a filename. This is the DD-name of the BSAM data set of the archive file.

  • extension - Any extension is ignored.

  • VM/CMS

    The file descriptor can have one of two forms:

  • filename [filetype [filemode]] or

  • filename[.filetype[.filemode]] If the filetype is missing, then the graPHIGS API uses a filetype of ARCHIVE.

    If the filemode is missing, then the graPHIGS API uses a filemode of A1.

  • FORTRAN

    POPARF (afid, arcfil)

    Input Parameters

    integer afid
    Archive file identifier.

    integer arcfil
    Archive file descriptor. An integer value for this descriptor. An association between this value and a valid file descriptor is then made via an External Defaults File (EDF).

    For example, the file descriptor of file1.archive is attained if the EDF contains the following line:

       AFMMDFT ARCHIVE=(99,file1.archive,)
    and the application is coded:
       CALL POPARF(1,99)
    If the EDF does not contain a match for the integer value, then a filename is created based on the integer value using the following formula:
       final value = Remainder (Absolute Value (original value) / 999)
    The graPHIGS API uses this final value (000<=final value<=999) to create the filename (AFMAFxxx, where xxx is the final value).

    Errors

    2
    Function Requires State (PHOP,*,*,*)
    402
    Archive File Identifier Already In Use
    400
    Archive File Cannot Be Opened
    401
    Exceeded Maximum Number Of Simultaneously Open Archive Files
    403
    Archive File Is Not A PHIGS Archive File

    Related Subroutines

  • Close Archive File


  • [ Previous | Next | Contents | Glossary | Home | Search ]