HP RPG/XL Programmer's Guide (30318-90001)

8- 14
Portions of the program, RMENU (see Figure 8-9), that set User Switches
are shown in Figure 8-10. RMENU prompts the user for report selections
and saves the selections in the System-Defined JCW.
Figure 8-10. Using the System-Defined JCW
Comments
1 This line specifies where the values for the user indicators
originate.
Column 16 contains J to specify that user indicator values come
from the System-Defined JCW.
2 This line turns on user indicator U1 when indicator 01 is turned
on. (Indicator 01 is turned on when the user requests the DAILY
report.)
3 This line turns on user indicator U2 when indicator 02 is turned
on. (Indicator 02 is turned on when the user requests the MONTH
report.)
4 This line turns on user indicator U3 when indicator 03 is turned
on. (Indicator 03 is turned on when the user requests the YEAR
report.)
Communicating File Information
This section explains how to use a User-Defined Job Control Word (JCW) to
pass file information between RPG programs. For example, you may need to
exchange the maximum record count for a file with other programs, so that
they will not write beyond the file's limits. You can use a User-Defined
JCW to exchange any information, not just file information.
A User-Defined JCW is a 16-bit logical word located within the operating
system. You can create and use as many User-Defined JCWs as necessary.
When you create them, you assign identifying names to them (the first
character in each name must be a letter). User-Defined JCWs are used
exclusively by application programs. The operating system software does
not use them. Because of this, you may prefer to use them instead of
System-Defined JCWs (see the section "Using a System-Defined Job Control
Word (JCW)" in this chapter). User-Defined JCWs are discussed in detail
in your
MPE XL Intrinsics Reference Manual
.