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

GPOPAR - Open Archive File

GPOPAR (arid, ncid, flag, length, ardesc)

Purpose

Use GPOPAR to open and initialize a graPHIGS API archive file.

This subroutine function sets the current archive state to Archive Open (AROP)

If the specified archive file exists as read only and the application attempts to open the file as 1=OPEN_READ/WRITE , then the graPHIGS API opens the file and issues the warning message 1113 If it cannot open the file, then the graPHIGS API issues an error.

If the specified archive file does not exist and the archive flag is set to a value of 1=OPEN_READ/WRITE , then the archive file resource creates a new read/write file. If the specified archive file does not exist and the archive flag is set to a value of 2=OPEN_READ_ONLY , then the graPHIGS API issues an error.

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 contents and formats of the EDF, see The graPHIGS Programming Interface: Technical Reference under "Defaults and Nicknames"

Parameters

arid -- specified by user, fullword integer

Archive file identifier.

ncid -- specified by user, fullword integer

Nucleus identifier.

flag -- specified by user, fullword integer

Archive flag (1=OPEN_READ/WRITE, 2=OPEN_READ_ONLY )

length -- specified by user, fullword integer

Length of the file descriptor (>=1)

ardesc -- specified by user, variable length character string

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 do 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

    Error Codes

    61
    LENGTH IS INVALID
    142
    VALUE OF ARCHIVE FLAG IS INVALID
    202
    SPECIFIED NUCLEUS DOES NOT EXIST
    217
    RESOURCE CREATION REQUEST EXCEEDS NUCLEUS TABLE CAPACITY
    218
    ARCHIVE FILES ARE NOT SUPPORTED ON SPECIFIED NUCLEUS
    219
    SPECIFIED ARCHIVE FILE IDENTIFIER ALEADY IN USE
    1105
    INVALID FILE NAME, a2
    1107
    FILE a2 NOT FOUND
    1110
    CONCURRENT USAGE OF FILE a2 NOT ALLOWED
    1113
    FILE IS READ ONLY
    1114
    FILE CANNOT BE CREATED. DISK IS READ ONLY
    1117
    INCORRECT RECORD LENGTH OR FORMAT ON a2
    1205
    FILE IS NOT A VALID graPHIGS ARCHIVE FILE
    1206
    VERSION OF graPHIGS ARCHIVE FILE NOT RECOGNIZED

    Related Subroutines

    GPCLAR
    Close Archive File

    RCP code

    201348353 (X'0C005501')


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