HPMYPROGRAM [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation
MPE/iX Intrinsics Reference Manual
HPMYPROGRAM
NM callable only.
Returns the file name of the program being executed by the calling
process.
Syntax
____________________________________________________
| |
| CA I32 I32 |
| HPMYPROGRAM(formaldesig,status,length |
| |
| CA I32 I32 |
| myprogram,myprogram_length,myprogram_syntax);|
____________________________________________________
Parameters
formaldesig character array (required)
Returns the fully qualified MPE syntax name of the
program being executed by the calling process.
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)
HPMYPROGRAM returns a NM Loader error 128 when the
program name is not represented using the syntax
that the user specifies.
Returns the status of the HPMYPROGRAM intrinsic
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 (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 HPMYPROGRAM is 104.
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.
myprogram character array (optional)
Returns the absolute pathname or fully qualified
MPE syntax name of the program being executed by
the calling process.
The myprogram parameter contains the name with
delimiters. The first and last characters of the
returned value are blanks that act as delimiters.
myprogram_length 32-bit signed integer by reference (optional)
On input, the myprogram_length parameter specifies
the maximum myprogram length in bytes. On output,
myprogram_length returns the actual length of
myprogram, including the surrounding delimiters.
If myprogram_length is not correct upon input,
variables allocated near myprogram can be
overwritten, or an error could occur. If the
myprogram_length parameter is not specified,
HPMYPROGRAM determines if the myprogram parameter
is long enough to hold HPMYPROGRAM to be returned.
Note that a value is not returned in
myprogram_length if you do not specify the
myprogram parameter.
myprogram_syntax 32-bit signed integer by reference (optional)
On input, the myprogram_syntax parameter specifies
the syntax that is used when HPMYPROGRAM returns
the name in myprogram. On output, the actual
syntax is returned in myprogram_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
myprogram parameter is not specified, no value is
returned in myprogram_syntax.
Operation Notes
The HPMYPROGRAM intrinsic returns the fully qualified file name of the
program being executed by this process. You can pass this name to the
HPGETPROCPLABEL intrinsic in the firstfile parameter. HPGETPROCPLABEL
searches the files in the binding sequence for a procedure, beginning
with the program file. The program file is the first file in the binding
sequence of the calling process.
Related Information
Intrinsics None
Commands None
Manuals Resource Management Programmer's Guide
(32650-90024)
MPE/iX 5.0 Documentation