Using System Intrinsics [ HP RPG/XL Programmer's Guide ] MPE/iX 5.0 Documentation
HP RPG/XL Programmer's Guide
Using System Intrinsics
System intrinsics are operating system routines that perform specific
tasks. For instance, the PAUSE system intrinsic temporarily stops a
program. This intrinsic may be used, for example, to give an operator
time to mount a tape. It is often useful and convenient to use
intrinsics when you need to perform similar functions in your program.
Intrinsics provide a way to gain more control over processing and they
simplify a program. Although you cannot use system intrinsics directly
from an RPG program, you can use external subroutines to access them.
Intrinsics are described thoroughly in the MPE XL Intrinsics Reference
Manual.
Figure 8-4 lists a report menu program. It executes the appropriate
report program selected by the user. The menu program contains two
external subroutines, RUNPGM and COMAND. They are Pascal procedures that
call certain system intrinsics directly.
Figure 8-4. An RPG Menu Program
Figure 8-4. An RPG Menu Program (Continued)
Figure 8-4. An RPG Menu Program (Continued)
Figure 8-4. An RPG Menu Program (Continued)
Comments
1 This line calls an external subroutine, RUNPGM. RUNPGM is a
Pascal procedure that directly calls the operating system
intrinsic RUN. RUN creates a process for the report program
selected.
2 This line calls an external subroutine, COMAND. COMAND is a
Pascal procedure that directly executes the selected operating
system command (for example, FILE).
MPE/iX 5.0 Documentation