Function Definition (Program) Screen
The Function Definition (Program) screen is accessed by entering a nonblank character in the appropriate Select field on the Response/Function List screen and pressing [PF5]. The function chosen must be associated with a type of program.
idmscu
The Function Definition (Program) screen is accessed by entering a nonblank character in the appropriate
Select
field on the Response/Function List screen and pressing [PF5]. The function chosen must be associated with a type of program
.The Function Definition (Program) screen is used to:
- Provide a description of the program function
- Identify the associated program name
- Specify record buffers and control blocks passed to a program at runtime.
Information provided on this screen applies only to a current function associated with a user program.
Up to eight records can be specified on one page of the Function Definition (Program) screen.
The application developer can scroll between pages using the control keys associated with paging forward and paging backward. See the table earlier in this section for a listing of the default control key assignments for the application compiler.
When a function associated with a user program is initiated at runtime, CA ADS passes control to the program. Additionally, the runtime system passes the data in the record buffers and control blocks specified on the Function Definition (Program) screen. CA ADS maintains all application record buffers at the level at which control was relinquished.
When a user program finishes execution, control returns to the mapout operation of the function from which the program was initiated or, if the program was initiated by an EXECUTE NEXT FUNCTION command, to the command that follows EXECUTE NEXT FUNCTION. Note that a user program must process its own responses. Valid responses cannot be specified for the function associated with the program.
The Function Definition (Program) screen is similar to the USING clause of the LINK TO PROGRAM control command.
Sample Screen
Function Definition (Program) Application name: TEST1 Version: 1 Function name: PROG01 Drop function (/) _ Associated program . . . . PROG01 Description . . . . . . . UNDEFINED Records passed Drop record (/) 1. ________________________________ _ 2. ________________________________ _ 3. ________________________________ _ 4. ________________________________ _ 5. ________________________________ _ 6. ________________________________ _ 7. ________________________________ _ 8. ________________________________ _ Enter F1=Help F3=Exit F4=Prev F5=Next F7=Bkwd F8=Fwd
Field descriptions
- Application NameSpecifies the name of the current application, as specified on the Main Menu screen. This field is protected.
- VersionSpecifies the version number, in the range 1 through 9999, of the current application.This field is protected.
- Function NameDisplays the name of the current function, as specified on the Response/Function List screen. The function must be associated with a user program.This field can be modified by the user. The first character of the Function name cannot be blank. If modified, the user should insure that the combination of response name, assigned key, and associated function name must be unique within the application.
- Drop FunctionRemoves the function definition from the application.
- Associated ProgramDisplays the name of the user program with which the current function is associated, as specified on the Response/Function List screen.This field is protected.
- DescriptionSpecifies a 1- to 28-byte description of the current function. The function description is displayed with the associated response name on runtime menu and help screens. Note that the specified description is truncated to 12 characters on the short description menu screen.
- Records PassedSpecifies the data passed to the user program. The application developer specifies record names and/or control block names as follows:
- Record namepasses the buffer for the specified record to the user program. The specified record must be known to the issuing function. ADSO-APPLICATION-MENU-RECORD is the only record that can be passed to a user program from a system-defined menu function.
- MAP-CONTROL/MAP_CONTROLpasses the map request block (MRB) of the issuing function to the user program.
- SUBSCHEMA-CONTROL/SUBSCHEMA_CONTROLpasses the subschema control block of the issuing function to the user program.
- Drop RecordRemoves the record from its association with the program function, but does not delete the record definition from the dictionary.