You are here: LANSA for i User Guide > 4. Processes and Functions > 4.14 Create a New Function > 4.14.1 Specify Details of the New Function

4.14.1 Specify Details of the New Function

When the option to create a new function is chosen from the process definition menu a screen similar to the example following will result:

 

 DC@P301001                 Define New Function                        

                                                                       

 Process : XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX       

                                                                       

 New function name . . . . . _______                                   

 Description . . . . . . . . __________________________________

                                                                       

 New function type . . . . 1. Generate from an Application Template    

                           2. Copy existing Process ____Function ___

                           3. Manually define function                

                                                                       

 Initial public access . . . . NORMAL                                  

                                                                       

                                                                       

                                                                       

 Fnn=Help  Fnn=Exit  Fnn=Cancel  Fnn=Messages                          

 

 

As soon as the details on this screen have been specified and the enter key pressed the function is created.

What happens next depends upon whether the function is to be "AUTOMATICALLY" defined by an Application Template (function type 1) or "MANUALLY" defined by copying an existing function (function type 2) or by manually inputting the RDML commands (function type 3).

If a "manually" defined function is requested then RDML command editor will be invoked next. This facility allows RDML commands to edited and is described in much more detail in following sections.

If an "automatically" defined function is chosen then "Application Template" facility will be invoked next. This allows you to choose a "template", which will probably ask you questions, and using your answers, automatically generate the RDML commands your require for your function. This facility is described in more detail later.

Input Options

The following input options apply when creating a new function within a process:

New Function Name

Specify the name that is to be assigned to the new function. The maximum length allowed for a function name is 7 characters. The name must also be a valid name as specified in Valid Names on the IBM i in Common Input Options. The name specified must also be unique within the process.

Certain function names are "reserved" for use by LANSA and cannot be specified as a valid function name. These are:

Name

Reserved Meaning / Description

MENU

Display process main menu

EXIT

Exit from LANSA

HELP

Display process HELP text

SELECT

Select next function from list of allowable function

EOJ

End all batch processing

ERROR

Abort process with an error

RETRN

Return control to calling process or function

*ANY

Any function name

 

For more details of why these names are "reserved" refer to 4.18 Function Control Table.

Description

Specify the description that is to be associated with the function. The entry made here is the description that is displayed on the process main menu. Mandatory field. Function descriptions can be changed by altering the process control table. Refer to later sections in this chapter for details of the process control table.

Since this value will appear on the process menu it is recommended that upper and lower case characters are used. There is no need to centre the description. This is done automatically.

New Function Type

Select the way that the RDML commands associated with this new function are to be defined by entering the number corresponding to:

1

Generate from an Application Template.

2

Copy existing Process_Function_.

3

Manually define function

Initial Public Access

Specifies what access other system users are to be given to the function initially. Access to the function can be changed at any time later using the option available on the housekeeping menu Mandatory (if displayed). Pre-filled to NORMAL. Allowable values are:

NORMAL

Other users can use (execute) this function but they cannot modify its definition in any way.

ALL

Other users can use this function and can modify or even delete its definition.

NONE

Other users cannot use this function, nor can they modify its definition in any way.

Note: this option will only appear on the screen if the LANSA system being used has a flag set in the system definition data area DC@A01 to indicate that function level security should be implemented. Refer to the System Definition Data Areas DC@A01 for more details.