HPMYFILE [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation
MPE/iX Intrinsics Reference Manual
HPMYFILE
NM callable only. Returns the file name of the native mode program or
executable library (XL) that called the HPMYFILE intrinsic.
Syntax
________________________________________________
| |
| CA I32 I32 CA |
| HPMYFILE(formaldesig,status,length,myfile|
| |
| I32 I32 |
| myfile_length, myfile_syntax); |
________________________________________________
Parameters
formaldesig character array (required)
Returns the fully qualified MPE syntax file name of
the program or XL that called HPMYFILE.
The formaldesig parameter must be at least 28 bytes
in length in order to contain the longest possible
MPE syntax file name with delimiters. The lockword
is not returned. The first and last characters of
the returned value are blanks that act as
delimiters.
status 32-bit signed integer by reference (optional)
HPMYFILE returns a NM Loader 128 error when the
first library name is not represented using the
syntax that the user requires. 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 (0:16) comprise status.info. A negative value
indicates an error condition, and a positive value
indicates a warning condition. Refer to the MPE/iX
Error Message Manual Volumes 1, 2 and 3
(32650-90066, 32650-90152, and 32650-90368) for a
description of its value.
Bits (16:16) comprise status.subsys. The value
represented by these bits defines the subsystem
that set the status information. The subsystem
identifier for HPMYFILE is 104.
NOTE Since HPMYFILE can return information on the success of its
execution in the status parameter, it is good programming practice
to specify this parameter and check its values after the intrinsic
call. If an error or warning condition is encountered and you did
not specify the status parameter, HPMYFILE causes the calling
process to abort.
length 32-bit signed integer by reference (optional)
Returns the length (in bytes) of the file name
returned in the formaldesig parameter (including
the two blanks that act as delimiters). A zero
returned indicates that no file name is returned.
myfile character array (optional)
Returns the absolute pathname or fully qualified
MPE syntax name of the program or XL that called
HPMYFILE.
The myfile parameter contains the name with
delimiters. The first and last characters of the
returned value are blanks that act as delimiters.
myfile_length 32-bit signed integer by reference (optional)
On input, the myfile_length parameter specifies the
maximum myfile length in bytes. On output,
myfile_length returns the actual length of myfile,
including the surrounding delimiters.
If myfile_length is not correct upon input,
variables allocated near myfile can be overwritten,
or an error could occur. If the myfile_length
parameter is not specified, HPMYFILE determines if
the myfile parameter is long enough to hold
HPMYFILE to be returned.
Note that a value is not returned in myfile_length
if you do not specify the myfile parameter.
myfile_syntax 32-bit signed integer by reference (optional)
On input, the myfile_syntax parameter specifies the
syntax that is used when HPMYFILE returns name in
myfile.
On output, the actual syntax is returned in
myfile_syntax. This is only useful when
MPE-escaped syntax is used. The name can be either
a MPE syntax name or a HFS syntax name.
The possible syntaxes are:
0 MPE-escaped syntax
1 MPE-only syntax
2 HFS syntax
The default is MPE-only syntax. Note that if the
myfile parameter is not specified, no value is
returned in myfile_syntax.
Operation Notes
You can pass this file name to the HPGETPROCPLABEL intrinsic in the
firstfile parameter. HPGETPROCPLABEL searches the files in the binding
sequence of its calling process for a procedure, beginning with the file
returned by HPMYFILE.
Related Information
Intrinsics None
Commands None
Manuals Resource Management Programmer's Guide
(32650-90024).
MPE/iX 5.0 Documentation