4.5.1 Procedural Add an Employee Function

Consider a very common data entry function such as the type of function created by the FRADD01 template.

FUNCTION 

OPTIONS(*DIRECT)

GROUP_BY 

NAME(#PANEL) FIELDS(#EMPNO #SURNAME ....)

MESSAGE 

MSGID(DCU0010) MSGF(DC@M01) MSGDTA('employee')

BEGIN_LOOP

 

REQUEST

FIELDS(#PANEL) DESIGN(*DOWN) IDENTIFY(*DESC) MENU_KEY(*YES)

INSERT

FIELDS(#PANEL) TO_FILE(PSLMST)

MESSAGE

MSGID(DCU0011) MSGF(DC@M01) MSGDTA('employee')

CHANGE

FIELD(#PANEL) TO(*NULL)

END_LOOP

 

In this example, you have a single function, which must be converted to follow the rules of the WEBEVENT function. The behavior of the function should be as follows:

Refer to 4.5.2 Changes Required to Restructure for WEBEVENT.