Previous Topic: Default Reference File FunctionsNext Topic: Displaying Functions


New Functions

To add a new function you must first create it, and then define additional aspects of the function.

You may choose to add functions for the HORSE file, such as Select Mares and Select Stallion. These functions would enable you to display a list of mares only or stallions only in response to an inquiry.

You would begin by viewing a list of possible function types and access paths for the HORSE file by typing ? in the Function type column, and typing ? in the Access path column.

Enter the function names, function types, and access paths as shown in the following illustration:

EDIT FUNCTIONS My model

File name. . . : Horse ** 1ST LEVEL **

? Function Function type Access path

Change Horse Change object Update index

Create Horse Create object Update index

Delete Horse Delete object Update index Edit Horse Edit file Retrieval index

Select Horse Select record Retrieval index

Select Mares Select record Mares

Select Stallions Select record Stallions

More...

SEL: Z=Details P=Parms F=Action diagram S=Device D=Delete O=Open

T=Structure A=Access path G/J=Generate function H=Generate HTML ...

F3=Exit F5=Reload F7=File details F9=Add functions F23=More options

F11=Next View F17=Services F21=Copy *Template function

Press Enter and the functions are added.

The two messages "Function ‘Select Mares’ is being created" and "Function ‘Select Stallions’ is being created" will appear briefly at the bottom of the panel. The functions will now be declared to your design model and are available for reference by other functions. At this stage no further definition is required but you will later need to define additional aspects of the new functions before they can be implemented.

Each interactive external function is implemented by:

The implementation language is controlled by the target HLL. You may generate in  RPG, COBOL, UNIX, or Client Server Applications depending on your version of CA 2E.

The default implementation language for new functions is controlled by the YHLLGEN model value.