10 Define Option and Function Exits

This chapter contains these topics:

10.1 Defining Option and Function Exits

To add function exits (function key exits) and subfile selection options to your interactive program, use Define Option and Function Key Exits. The program generator automatically adds the standard function exits to your program, such as Prompt for valid field values (F1), Display Error Message (F7), and Exit (F3). You can highlight the function exits you want to display on line 24 of the program screen using Screen Design Aid (SDA) or Vocabulary Overrides. The program generator creates a list of function exits and selection options for the program. This allows the user to choose Display Options (F24) on any screen to display the list of all function exits and use Prompt for valid field values (F1) in the Option field to display the list of options.

The system stores information for CASE in the Program Exit Parameters file (F93104).

The system creates or updates the Function Key Translation Detail (F9611) and Generic Function Key Master (F96012) tables for the specific screen.

Each set of fields on the Option & Function Key Exits screen pertains to the Function Key or Selection Option you are defining. There is a correlation between the values you enter in the Field field and the Key field. The value in the Field field is the internal data name for the program and the system compares this value to the value in the Key field. The system uses the value in the Program ID field for the name of the program or routine the system executes. The Parm fields are the parameters the system needs for the program or routine.

To define Option and Function Exits

  1. On Define Generator Specification, enter 1 in the following field to define option and function exits:

    • Option

    Figure 10-1 Define Generator Specification (Option) screen

    Description of Figure 10-1 follows
    Description of "Figure 10-1 Define Generator Specification (Option) screen"

  2. On Option & Function Key Exits, complete the following fields:

    • Field

    • Program ID

    • Key

    • Parm (Parameter) 1 through 8

    • Purpose of Exit

    • Returned Key Fld

    • Returned Desc Fld

Figure 10-2 Option & Function Key Exits screen

Description of Figure 10-2 follows
Description of "Figure 10-2 Option & Function Key Exits screen"

Field Explanation
Field The RPG field name (6 bytes) to be passed as a parameter on function key exits or subfile options.

Screen-specific information

The internal field name the system assigns to each option and function exit in the program you are generating.

Correlation exists between this field and the Function exit Definitions repository.

Maintained in the soft coding server data structure (I00SC).

  • This is a required field

  • Use #S01 - #S16 for options

  • Use #F01 - #F15 for function exits

Program Id The identification, such as program number, table number, and report number, this is assigned to an element of software.

Screen-specific information

The name of the program that the system executes when you choose the function exit or enter a selection option value.

By prefixing the name with an asterisk (*) you may designate the name of a logic module. A logic module's name that you use for this purpose must begin with an X followed by any eight characters. The name cannot be longer than nine characters in order to allow for entry of the asterisk prefix. This function allows the programmer to create logic other than the standard execution of an external program when a user chooses a function exit or enters a selection option.

Key This field is used to specify the function key or subfile option number for a particular exit in the program being generated. Along with function key or option number, you must enter the program ID and any parameters that should be passed to the external program.

Screen-specific information

You can only define function exits for #F01 through #F15 and subfile options for #S01 through #S16.

Parm 1 The RPG field name (6 bytes) to be passed as a parameter on function exits or subfile options.
Parm 2 The RPG field name (6 bytes) to be passed as a parameter on function exits or subfile options.
Parm 3 The RPG field name (6 bytes) to be passed as a parameter on function exits or subfile options.
Parm 4 The RPG field name (6 bytes) to be passed as a parameter on function exits or subfile options.
Parm 5 The RPG field name (6 bytes) to be passed as a parameter on function exits or subfile options.
Parm 6 The RPG field name (6 bytes) to be passed as a parameter on function exits or subfile options.
Parm 7 The RPG field name (6 bytes) to be passed as a parameter on function exits or subfile options.
Parm 8 The RPG field name (6 bytes) to be passed as a parameter on function exits or subfile options.
Purpose of Exit A name or remark that describes an element in the JD Edwards World systems.

Screen-specific information

Special Use: For the CASE system, this field is used for program exit remarks and AAI remarks. It also allows you to enter a data dictionary key when prefixed with an * (asterisk). This lets you use standard explanations and provide more extensive explanations for each exit or AAI when viewed with the help instructions.

Returned Key Fld This field is used to specify the name of the data field to be updated by a returned key when exiting to an inquiry program that allows passing the selected record's key back to the initiating program.

Screen-specific information

Causes logic generation to let a returned key pass through the local data area and loads the value in the specified key field. Only valid with the CL program J98LDAKY

Returned Desc Fld This field is used to specify the name of the data field to be updated by a returned description when exiting to an inquiry program that allows passing the selected record's description back to the initiating program.

Screen-specific information

Causes logic generation to let a returned description pass through the local data area and loads the value to the designated description field.

  • Only valid with the CL program J98LDAKY

  • For more information on using the Returned Key and Returned Desc Fld, see the program level Helps for P93104


10.2 Function Exit

Search (F9)

Choose Search (F9) to access the Software Search facility. On Software Search, enter a program name to view all programs that meet or are greater than the search criteria. You can also enter Generic* to view the names of all program in the SVR.

10.2.1 What You Should Know About

Topic Description
Values in the Parameter fields Use caution when using an internal program data name in the Parm fields. Using screen (VD prefix) or subfile (SF prefix) fields might cause issues because the program the system retrieves can change the data in the field.

To avoid transferring screen or subfile fields values, alternative options for VDxxxx or SFxxxx include:

  • Transfer PSxxxx This requires a manual source change to the program in order to properly load the PSxxxx field with the screen or subfile field, or load the field using Program Design Language.

  • Transfer SHxxx You can define the SHxxxx fields as hidden fields on their screen and then load them with the proper information using the Detailed Programming facility.