Previous Topic: Submitting the Function for GenerationNext Topic: Report Functions


Exercises

Do the following exercises:

  1. Submit the request for generation and compilation for the Races and Entries SPN access path and the Edit Races and Entries function. You do this by selecting the Submit model create request (YSBMMDLCRT) option from the Display Services Menu (F17). For a program to compile successfully, all files and access paths used by the program must have been generated and compiled first.

    Note: Be sure to write down the implementation name for the Edit Races and Entries function. You will need this name for testing the program using the CALL command.

  2. Call the Edit Races and Entries function and add a few races to the database and some entries for each race. When you call the program, remember to specify the null or blank parameter for the return code. For example,

    call myaretr ‘’

    Try pressing F4 on fields like Horse code and Jockey code to view a selection list of available entries.

    Note: CA 2E automatically provides this prompting capability for file-to-file relations, such as, RACE ENTRY Refers to HORSE. When the end user types a ? or user prompt (F4) for a key or foreign key field, by default CA 2E calls the related Select record function, such as, Select Horse. A function used in this way is known as a prompt function.

  3. Call the Edit Horse program and test the link you defined between the Edit Horse program and the Display Racing Results program. You should be able to select a horse and display its racing history.

    For example, the steps required to call Display Racing results for Faithful Dobbin are:

    1. Type / in Subfile selector for Faithful Dobbin.
    2. Press F10 to access the action bar.
    3. Type S to access the Selector Choice menu.
    4. Type 1 beside the Display Racing Results action.
    5. Press Enter.

Press F3 to return to the Edit Horse function.