HPlogo Using KSAM XL and KSAM 64 > Chapter 9 KSAM Intrinsics

HPFOPEN

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 4 ♥
E0394 Edition 3

Syntax Parameters Operation Notes Condition Codes

Establishes access to a file and creates a file.

Syntax



           I32      I32      I32V     *
  HPFOPEN (filenum, status [,itemnum, item [,...]]);


NOTE: Up to 41 itemnum/item pairs can be specified.

Parameters


filenum

32-bit signed integer by reference (required)

Returns a file number used to identify the opened file in subsequent intrinsic calls.

Can be used safely with all file system intrinsics that require a 16-bit file number to be passed in the intrinsic call (for example, FREAD, FWRITE, FCLOSE).

status

32-bit signed integer by reference (optional)

Returns the status of the HPFOPEN call. If no errors or warnings are encountered, status returns 32 bits of zero. If errors or warnings are encountered, status is interpreted as two 16-bit fields:

Bits

Value/Meaning

0:16

status.info

A negative value indicates an error condition, and a positive value indicates a warning condition.

16:16

status.subsys

The value represents the subsystem that set the status information. Refer to the MPE/iX Error Message Manual Volumes 1, 2 and 3 for status messages.


CAUTION: If an error or warning is encountered and the status parameter was not specified, HPFOPEN causes the calling process to abort.

itemnum

32-bit signed integer by value (optional)

Passes the item number, refer to Table 9-7 "HPFOPEN Itemnum/Item Values"

item

type varies by reference (optional)

Passes and/or returns the option indicated by the corresponding itemnum parameter, refer to Table 9-7 "HPFOPEN Itemnum/Item Values"


NOTE: An itemnum takes precedence over any previously specified duplicate itemnum. Any duplicated itemnum is flagged as a warning.

Table 9-7 HPFOPEN Itemnum/Item Values

Itemnum Mnemonic Item Description
0End of option list: There is no corresponding item. The absence of an itemnum after the last itemnum,item pair is equivalent to specifying this option.
2CAFormal designator:

Passes a formal file designator, following MPE/iX file naming conventions. The file name must begin with an alphabetic character and contain alphanumeric characters, slashes, or periods. If the file name is the name of a user-defined file, it can begin with an asterisk (*). If the file name is the name of a system-defined file, it can begin with a dollar sign ($). Specify the remote location of a device as filename:envid. The file, lockword, group, and account names are each limited to eight characters in length. The formal file designator may contain command interpreter variables and expressions that are evaluated by HPFOPEN before the formal file designator is parsed and validated.

A character placed in the first element designates the delimiter used by HPFOPEN to search for the end of the character array. The delimiter can appear again only following the last valid character of the character array, for example:
  • %devname% (% is the delimiter, devname is the designator)

  • fabcxyzf (f is the delimiter, abcxyz is the designator)

For a KSAM file, the device must be a random access device such as a disk.

The following are examples of valid MPE/iX formal file designators:
  • &file/lock.group.account:node.dest.level&

  • &filename&

  • &!myfile&

  • &!afile/![FINFO("!afile",33)]&

The following are examples of invalid formal file designators:
  • "filename.group (missing delimiter ("))

  • file.group" ( 'f' is used as delimiter, missing at end)

Default: A nameless file is assigned that can be read from or written to, but not saved. (The domain of a nameless file must be new.) Only one of the following options can be in effect when a file is opened:
  • itemnum=2

  • itemnum=51

3I32

Domain:

Passes a value indicating which file domain MPE/iX searches to locate the file. A nameless disk file must always be a new file. A device file (such as a tape or terminal) always resides in the system file domain (permanent file directory). Always specify a device file as old or permanent.

The following values are valid:
0

The file is a new temporary file. It is not placed in a directory.

1

The file is a permanent file, found in the system file domain.

2

The file is a temporary file, found in the job file domain.

3

The file is an old (permanent or temporary) file. The job file domain is searched first. If the file is not found, the system file domain is searched.

4

The file is created, placed in the permanent file directory, and becomes a permanent file.

Default: 0
5I32Designator:

Passes a value indicating a special file opening. Any of the following special files can be specified with the itemnum=2. For example, a file name of $STDLIST opens the standard list device. The following values are valid:
0

Allows all other options to specify the file.

1

The actual file designator is $STDLIST.

2

The actual file designator is $NEWPASS.

3

The actual file designator is $OLDPASS.

4

The actual file designator is $STDIN.

5

The actual file designator is $STDINX.

6

The actual file designator is $NULL.

Default: 0

For example, passing &MYFILE& in itemnum=2 and using itemnum=5 and item=4 to equate it with $STDIN is equivalent to the file equation FILE MYFILE=$STDIN.This option is not equated with itemnum=2 if both of the following conditions are true:
The itemnum=9 option allows file equations for the file opening.
An explicit or implicit FILE command equating the formal file designator to a different actual file designator occurs in the job or session.
A leading * in a formal file designator passed by itemnum=2 overrides an itemnum=9 option.
6I32Record format:

Passes a value indicating the internal record structure desired for the file. This option is applicable only at file creation.

Only a fixed-length record is allowed for KSAM XL files (0).

Default: 0
9I32Disallow file equation:

Passes a value indicating whether or not MPE/iX file equations are allowed. A leading * in a formal file designator overrides the setting to disallow FILE equations.

The following values are valid:
0

Allow FILE equations to override programmatic or system-defined file specifications.

1

Disallow FILE equations from overriding programmatic or system-defined file specifications.

Default: 0
10I32File type:

Passes a value indicating the internal record structure used to access records in the file. If the file is old, this option is ignored. Specifying an itemnum=5 value other than zero overrides this option. This option is applicable only at file creation.

The following values are valid:
0

Standard (STD) file

1

KSAM/3000 file

2

Relative I/O (RIO) file

3

KSAM XL file

4

Circular (CIR) file

6

Message (MSG) file

7

KSAM64 file

Default: 0
11I32Access type:

Passes a value indicating the type of access intended for the file. This option restricts usage of the file system intrinsics.

The following values are valid:
0

Read access only, if the file's security provisions allow read access. FWRITE, FUPDATE, and FREMOVE intrinsic calls cannot reference this file. The end-of-file (EOF) is not changed. (Default)

1

Write access only, if the file's security provisions allow write access. Any data written in the file prior to the current HPFOPEN request is deleted. FFINDBYKEY, FFINDN, FPOINT, FREAD, FREADBYKEY, FREADC, FREADDIR, FREMOVE, FSPACE, and FUPDATE intrinsic calls cannot reference this file. The EOF is set to zero.

2

Write-save access only, if the file's security provisions allow write access. Previous data in the file is not deleted. FFINDBYKEY, FFINDN, FPOINT, FREAD, FREADBYKEY, FREADC, FREADDIR, FREMOVE, FSPACE, and FUPDATE intrinsic calls cannot reference this file. The EOF is not changed. Therefore, data is overwritten if FWRITE is called. The system changes this value to append for message files.

3

Append access only, if the file's security provisions allow either append or write access. FFINDBYKEY, FFINDN, FPOINT, FREAD, FREADBYKEY, FREADC, FREADDIR, FREMOVE, FSPACE, and FUPDATE intrinsic calls cannot reference this file. The record pointer is set to EOF prior to each FWRITE. For disk files, the EOF is updated after each FWRITE call. Therefore, data cannot be overwritten.

4

Read/write (I/O) access only, if the file's security provisions allow both read and write access. If both read and write access are not allowed, the access type is limited to that specified in the security provisions (either read or write). Any file intrinsic except FUPDATE and FREMOVE can be called for this file. The EOF is not changed. This option is not valid for message files.

5

Update access only, if the file's security provisions allow both read and write access. If both read and write access are not allowed, the access type is limited to that specified in the security provisions (either read or write). All file intrinsics can be called for this file. The EOF is not changed. This option is not valid for message files.

6

Execute access only, if the file's security provisions allow execute access. This allows read/write access to any loaded file. The program must be running in privileged mode to specify execute access. This option is not valid for message files.

7

Execute-read access only, if the file's security provisions allow execute access. This allows only read access to a loaded file. The program must be running in PM to specify execute-read access. This is changed to execute access for KSAM, CIR, and RIO files. Not valid for message files.

12I32Dynamic locking:

Passes a value enabling or disabling file locking for the file. When specified, the FLOCK and FUNLOCK intrinsics can be used to dynamically permit or restrict concurrent access to a disk file by other processes at specified times.

The following values are valid:
0

Disallow dynamic locking/unlocking

1

Allow dynamic locking/unlocking

Default: 0

The process can continue this temporary locking or unlocking until it closes the file. If several accessors are sharing the file, they must all specify, or not specify, this option. For example, if a file is opened with the dynamic locking option enabled, and a subsequent accessor tries to open the file with dynamic locking disabled, that subsequent attempt to open fails.

Dynamic locking and unlocking are possible through the equivalent of a global resource identification number (RIN) assigned to the file and temporarily acquired by HPFOPEN.

Accessors that have opened a file with the dynamic locking option enabled must access the file through the FLOCK and FUNLOCK intrinsics to ensure exclusive use of the file. These accessors are allowed concurrent access even when not using FLOCK and FUNLOCK, but exclusive access is not guaranteed.

Note: The file system does not guarantee exclusive access, even when FLOCK and FUNLOCK are used, unless all programs that access the file cooperate by using locking. A program that opens the file with dynamic locking enabled will still be allowd to modify the file, even if it never calls FLOCK.

Lock access must be at the account, group, and file levels for HPFOPEN to grant this option. (Lock access is available if lock, execute, append, or write access is set at these levels.) This option is ignored for files not residing on disk.
13I32Exclusive:

Passes a value indicating continuous exclusive access to the file, from open to close. Use this option when performing a critical operation (for example, updating the file).

The following values are valid:
0

If itemnum=11 specifies read only access, read-share access takes effect. Otherwise, exclusive access takes effect. Regardless of which access option was selected, FFILEINFO reports zero.

1

Exclusive access. After the file is opened, any additional HPFOPEN/FOPEN requests for this file, whether issued by this process or another process, are prohibited until this process issues the FCLOSE request or terminates. If any process is already accessing this file when an HPFOPEN/FOPEN call is issued with exclusive access specified, an error status is returned to the process. If another HPFOPEN/FOPEN call is issued for this file while exclusive access is in effect, an error code is returned to the process that issued that HPFOPEN/FOPEN call. Request exclusive access only if the lock access mode is allowed by the security provisions for the file. For message files, specifying this value means that there can be only one reader and one writer.

2

Read-share access (semi-exclusive access). After the file is opened, concurrent write access to this file through another HPFOPEN/FOPEN request is prohibited, whether issued by this process or another process, until this process issues the FCLOSE request or terminates. A subsequent request for the read/write or update itemnum=11 obtains read access. However, other types of read access are allowed. If a process already has write access to the file when this HPFOPEN call is issued, an error code is returned to the calling process. If another HPFOPEN/FOPEN call that violates the read-only restriction is issued while read-share access is in effect, that call fails and an error code is returned to the calling process. You can request read-share access only if you are allowed the lock access mode by the security provisions for the file. For message files, specifying this value means that there can be multiple readers, but only one writer.

3

Share access. After the file is opened, this permits concurrent access to this file by any process, in any access mode, subject to other basic MPE/iX security provisions in effect. For message files, specifying this value means that there can be multiple readers and multiple writers.

Default: 0
17I32Copy mode:

Passes a value that determines if any file should be treated as a standard sequential file so it can be copied by logical record or physical block to another file.

The following values are valid:
0

The file is accessed as its own file type (for example, a message file is treated as a message file).

1

The file is to be treated as a standard (STD) file, with variable-length records. For message files, this allows nondestructive reading of an old message file at either the logical record or physical block record level. Only block-level access is permitted if the file is opened with write access. This prevents incorrectly formatted data from being written to the message file while it is unprotected. To access a message file in copy mode, a process must have exclusive access to the file.

Default: 0
18@32Short-mapped:

Returns a short pointer to the beginning of the data area of the file. This option maps the file into short pointer space. A short-mapped file can be 4-megabytes in length. The calling process can have up to 6-megabytes of short mapped files open at a time. Use the pointer as a large array of any type to efficiently access the file.

A file previously opened normally (not mapped) or with the long-mapped option is not accessible with the short-mapped option. If this option is specified with the file already opened into long pointer space, an error results.

A loaded program file or a loaded library file is not accessible with the short-mapped option. A file cannot be loaded that is currently opened with the short-mapped option.

Sharing of short pointer files is provided through normal file system sharing mechanisms, for example, use of the exclusive option. With the short-mapped file, all file system intrinsics, applicable to the file, can be used. FREAD and FWRITE calls can be mixed with the short-mapped access.

Standard (STD) type disk files of fixed or undefined record length can be accessed short-mapped with the access type option set to any value. Standard type disk files of variable record length can be accessed short-mapped only if the access type option is set to read-only access. KSAM files can be accessed short-mapped only if the access type option is set read-only access and the copy mode option is set to 1.

Default: No short pointer returned
19I32Record size:

Passes the size, in bytes, of the logical records in the file. Valid range is dependent upon both storage format (ASCII or binary) and record format. For fixed-length and undefined-length ASCII files, a record size can be specified in the range 1 to 32,767. For variable-length ASCII files, and for fixed-length, variable-length, and undefined-length binary files, a record size can be specified in the range 1 to 32,766.

HPFOPEN rounds up odd values to the next highest even number (equivalent to the nearest halfword boundary) if the file is ASCII with variable-length record format, or binary with fixed-length, variable-length, or undefined-length record format.

For example, if a record size of 105 is specified for a fixed-length binary file, HPFOPEN sets the record size to 106; if a record size of 233 is specified for a fixed-length ASCII file, the record size remains the same as it was when specified.

Default: 256
20CADevice name:

Passes the logical device number, in ASCII form, of a specific device. The file is assumed to be permanent. If the device name option is specified, the nonshareable device should be ready prior to the HPFOPEN call (otherwise, an error results).

Only one of the following options can be in effect when a file is opened:
  • itemnum=20

  • itemnum=22

  • itemnum=23

  • itemnum=42

Default: disk file located on the volume class disc associated with the group in which file resides.

A character placed in the first element designates the delimiter used by HPFOPEN to search for the end of the character array. The delimiter can appear again only following the last valid character of the character array, for example:
  • %devname% (% is the delimiter, devname is the designator)

  • fabcxyzf (f is the delimiter, abcxyz is the designator)

For a KSAM file, the device must be a random access device such as a disk.
22CAVolume class:

Passes a character array representing a volume class name where the file space is to be restricted. This option is applicable only at file creation.

A volume class is a subset of volumes within a volume set. The volume class name must be a valid volume class name residing on the volume set bound to the volume (the volume set is an attribute of the group in which the file resides).

Only one of the following options can be in effect when a file is opened with this option:
  • itemnum=20

  • itemnum=22

  • itemnum=23

  • itemnum=42

Default: A disk file located on the volume class DISC associated with the group in which the file resides.

A character placed in the first element designates the delimiter used by HPFOPEN to search for the end of the character array. The delimiter can appear again only following the last valid character of the character array, for example:
  • %volclass% (% is the delimiter, volclass is the designator)

  • fabcxyzf (f is the delimiter, abcxyz is the designator)

23CAVolume name:

Passes a character array representing a volume name that restricts the file specified to a specific volume. The volume must reside within the volume set of the group where the file resides. This option is applicable only at file creation.

Only one of the following options can be in effect when a file is opened with this option:
  • itemnum=20

  • itemnum=22

  • itemnum=23

  • itemnum=42

Default: A disk file located on the volume class DISC associated with the group in which the file resides.

A character placed in the first element designates the delimiter used by HPFOPEN to search for the end of the character array. The delimiter can appear again only following the last valid character of the character array, for example:
  • %volclass% (% is the delimiter, volclass is the designator)

  • fabcxyzf (f is the delimiter, abcxyz is the designator)

26CARemote environment:

Passes the node name of the remote computer where the file is located. This option is used when referencing a file located on a remote computer.

Default: No node name passed (local file access)

A character placed in the first element designates the delimiter used by HPFOPEN to search for the end of the character array. The delimiter can appear again only following the last valid character of the character array, for example:
  • %envname% (% is the delimiter, envname is the designator)

  • fabcxyzf (f is the delimiter, abcxyz is the designator)

29I32Privileged access:

Passes a value that temporarily restricts access to the file number returned from HPFOPEN to a calling process whose execution level is equal to or less than the value specified in this option. This restriction lasts until the file associated with the restricted file number is closed. Do not specify a value less than the execution level of the calling process.

The following values are valid:
0

Privilege level zero (most privileged level)

1

Privilege level one

2

Privilege level two

3

Privilege level three (least privileged level)

Default: The execution level of the calling process
33I32User labels:

Passes the number, in the range 0 to 254, of user-label records to be created for the file. Applicable for new disk files only.

Default: 0
35I32File size:

Passes the maximum file capacity:
  • For variable-length records, the capacity is expressed in blocks (blockitem#=recordsize * blockfactor).

  • For fixed-length and undefined-length records, the capacity is expressed in logical records.

  • The maximum file size for standard and KSAM XL files is 4-gigabytes.

  • The maximum file size for KSAM64 files is 128 gigabytes

  • The maximum file size of 500-megabytes, for RIO, circular, and message files, is dependent upon both the record size and the number of extents defined for the file:

    • For circular and RIO files, recsize=256 bytes and numextent=32.

    • For message files, recsize=128 bytes and numextent=32.

This option is applicable only at file creation.

Default: 2-gigabytes
36I32Initial allocation:

Passes a positive integer value indicating the number of extents to be allocated to the file initially. This option is applicable only at file creation.

Default: 0
37I32Filecode:

Passes a value that can be used as a file code to identify the type of file. This code is recorded in the file label and is accessible through the FFILEINFO intrinsic. This option is applicable only at file creation (except when opening an old file that has a negative file code).

If the program is running in user mode, specify a file code in the range 0 to 32,767 to indicate the file type being created. Programs running in user mode can access files with positive file codes only.

If the program is running in privileged mode, specify a file code in the range -32,768 to 32,767. Programs running in privileged mode can access files with a file code in the range -32,768 to 32,767. If an old file is opened that has a negative file code in its file label, the file code specified must match the file code in the file label (otherwise, an error results).

Default: 0
38I32File privilege:

Passes a value that determines a permanent privilege level to be associated with a newly created file. This option permanently restricts file access to a process whose execution level is less than or equal to the specified value. A value cannot be specified for less than the execution level of the calling process. This option is applicable only at file creation.

The following values are valid:
0

Privilege level zero (most privileged level)

1

Privilege level one

2

Privilege level two

3

Privilege level three (least privileged level)

Default: 3

A file created with levels 0, 1, or 2 can be opened only with the HPFOPEN intrinsic; the FOPEN intrinsic cannot be used.
41Reserved for MPE/iX.
42CADevice class:

Passes a device class where the file will reside. The file system uses the device class name to select a nonshareable device from a configured list of available devices. The name can have a length of up to eight alphanumeric characters, beginning with a letter (for example, TAPE). If a device class is specified, the file is allocated to any available device in that class.

Only one of the following options can be in effect when a file is opened:
  • itemnum=20

  • itemnum=22

  • itemnum=23

  • itemnum=42

Default: A disk file located on the volume class DISC associated with the group in which the file resides.

A character placed in the first element designates the delimiter used by HPFOPEN to search for the end of the character array. The delimiter can appear again only following the last valid character of the character array, for example:
  • %devclass% (% is the delimiter, devclass is the designator)

  • fabcxyzf (f is the delimiter, abcxyz is the designator)

43recordUFID:

Passes a unique file identifier (UFID) to provide a fast opening of an old disk file. A UFID is a record structure, 20 bytes in length, that uniquely identifies a disk file. Using this option avoids a directory search. Obtain the UFID of an opened file by calling FFILEINFO. The UFID can then be passed to HPFOPEN. The file represented by the UFID must be accessible to the process calling HPFOPEN (all file system security checks are made). New files cannot be opened with this option. If the file to be opened by the UFID contains a lockword, use itemnum=2 to specify the file name with the lockword.

Default: No UFID passed (a directory search is performed)
45CAFill character:

Passes two ASCII characters that determine what padding character to use at the end of blocks or unused pages, and the padding used by itemnum=53. Do not use delimiter characters for this option. The fill character must be a 2-byte array. The first character only is used as the padding character. The second character is reserved for future use. This option is applicable only at file creation.

Default: Null characters for a binary file and ASCII blanks for an ASCII file.
47I32Numextents:

Passes a value in the range 1 to 32 that determines the number of extents for the file. This parameter is kept mainly for compatibility with MPE/V. Its main usefulness is that a file may be created with 1 contiguous extent. If a value of 1 is specified, the file is created as one contiguous extent of disk space. If a value greater than 1 is specified, a variable number of extents (with varying extent sizes) is allocated on a need basis. This option is applicable only at file creation. To get one initially allocated continuous extent, specify both numextent=1 and initialloc=1.

Default: 1
49Reserved for MPE/iX.

50

I32Final disposition:

Passes a value indicating the final disposition of the file at close time (significant only for files on disk and magnetic tape). A corresponding parameter in a FILE command can override this option, unless file equations are disallowed with itemnum=9.

The following values are valid:
0

No change. The disposition remains as it was before the file was opened. If the file is new, it is deleted by FCLOSE; otherwise, the file is assigned to the domain it belonged to previously. An unlabeled tape file is rewound. If the file resides on a labeled tape, the tape is rewound and unloaded.

2

Temporary job file (rewound). The file is retained in your temporary (job or session) file domain and can be requested by any process within your job or session. If the file is a disk file, the uniqueness of the file name is checked. Should a file of the same name already exist in the temporary file domain, an error code is returned at close time and the file remains open. When a file resides on unlabeled magnetic tape, the tape is rewound. However, if the file resides on labeled magnetic tape, the tape is backspaced to the beginning of the presently opened file.

3

Temporary job file (not rewound). This value has the same effect as specifying final disposition option, except that tape files are not rewound. In the case of unlabeled magnetic tape, if the FCLOSE is the last done on the device (with no other FOPEN/HPFOPEN calls outstanding), the tape is rewound and unloaded. If the file resides on a labeled magnetic tape, the tape is positioned to the beginning of the next file on the tape.

4

Released file. The file is deleted from the system.

5

Convert a permanent file to a temporary file. The file is removed from the permanent file directory and placed in the temporary file directory. (Privileged mode capability is required to use this option.)

Default: 0

For more information on file disposition at close time, refer to the description of the FCLOSE intrinsic.
51Pascal XL string:

Passes a formal file designator, following MPE/iX file naming conventions, but using the Pascal/iX STRING type format. This option is identical to itemnum=2 except for the type of item. No delimiters are needed.

Default: No string passed

Only one of the following options can be in effect when a file is opened:
  • itemnum=2

  • itemnum=51

52CAFile equation string:

Passes a character string that matches the MPE/iX file equation specification syntax exactly. This option allows the specification of options available in the FILE command.

The formaldesig parameter and filereference parameter can contain embedded command interpreter variables and expressions. However, there cannot be more than eight characters in each of these components (filename, lockword, groupname, accountname) including the command interpreter variable and expression characters.

Default: No string passed

A character placed in the first element designates the delimiter used by HPFOPEN to search for the end of the character array. The delimiter can appear again only following the last valid character of the character array, for example:
  • %fileequation% (% is the delimiter, fileequation is the designator)

  • fabcxyzf (f is the delimiter, abcxyz is the designator)

53I32ASCII/binary:

Passes a value indicating whether ASCII or binary code is to be used for a new file when it is written to a device that supports both codes. For disk files, this may affect padding that can occur when issuing a direct-write intrinsic call (FWRITEDIR) to a record that lies beyond the current logical end-of-file indicator. The fill character is specified during the file creation. Default for ASCII is blank. Default for binary is binary 0. By default, magnetic tape and files are treated as ASCII files. This option is applicable only at file creation.

The following values are valid:
0

Binary file

1

ASCII file

Default: 0
54RECKSAM parm:

Passes a record that defines the keys for a new KSAM file. The format of the parameter is the same as the FOPEN intrinsic ksamparam field.

Default: No record passed
55Reserved for MPE/iX
56I32Object class:

Passes a user object class number, in the range 0 to 10, that is associated with the file.

Default: Determined by the file code for system and subsystem files, and by the file type and record type for normal user files.
57Reserved for MPE/iX.
58Reserved for MPE/iX.
59Reserved for MPE/iX.
60Reserved for MPE/iX.
61Reserved for MPE/iX.
64ACD.

Table 9-8 FOPEN/HPFOPEN Parameter Equivalents

FOPEN Parameter HPFOPEN Itemnum,Item
filenum (functional return)filenum (parameter)
formaldesig2, formaldesig
foption:

Bits (14:2) Domain
Bit (13:1) ASCII/binary
Bits (10:3) File designator
Bits (8:2) Record format
Bit (7:1) Carriage-control
Bit (6:1) Labeled tape
Bit (5:1) Disallow file equation
Bits (2:3) File type
itemnum/item

3, domain
53, ASCII/binary
5, file designator
6, record format
7, carriage-control
8, labeled tape
9, disallow file equation
10, file type
aoption:

Bits (12:4) Access type
Bit (11:1) Multirecord
Bit (10:1) Dynamic locking
Bits (8:2) Exclusive
Bit (7:1) Inhibit buffering
Bits (5:2) Multiaccess mode
Bit (4:1) Nowait I/O
Bit (3:1) File copy
itemnum/item

11, access type
15, multirecord
12, dynamic locking
13, exclusive
46, inhibit buffering
14, multiaccess mode
16, nowait I/O
17, file copy
recsize19, record size
device 20, device name
22, volume class
23, volume name
24, density
25, printer environment
26, remote environment
42, device class
48, reverse VT
formmsg 8, labeled tape label
28, spooled message
30, labeled tape type
31, labeled tape expiration
32, labeled tape sequence
54, KSAM parms
userlabels33, user labels
blockfactor40, block factor
numbuffers:

Bits (11:5) Numbuffers
Bits (4:7) Spooler copies
Bits (0:4) Output priority
itemnum/item

44, numbuffers
34, spooler copies
27, output priority
filesize35, filesize
numextent47, numextent
initialloc36, initial allocation
filecode37, filecode

Operation Notes


Enables creation of a new file on a shareable device and defines the physical characteristics of that file prior to access. Enables access to existing files. Returns a file number to the calling process that uniquely identifies the file. Use the file number to reference the file in calls to other intrinsics.

The format of the KSAM parameter is shown in Figure 9-7 "HPFOPEN KSAM Parameter Format"

Figure 9-7 HPFOPEN KSAM Parameter Format

[HPFOPEN KSAM Parameter Format]




FWRITELABEL


Appendix A COBOL Intrinsics