You are here: Development Standards > Routines > General Routines > GENACEML.PUB

# GENACEML.PUB

GENACEML.PUB is a public program that allows the user to enter in e-mail addresses for a given master file. Use this program if you have set up a separate file that holds e-mail addresses for any master file you have.

EMAIL_ENTRY:

This entry point will allow the user to enter and view e-mail address for a given master file.

`0050 EMAIL_ENTRY:`
`0055 ENTER FILE[ALL],USER_EMAIL$,XXEM$,OSGUI$,PROMPT_NUM`

Variable | Description
FILE[ALL] | Standard file array.
USER_EMAIL$ | Template containing setup information for this function.
XXEM$ | The template for the base application's xxEM file.
OSGUI$ | GUI Template (see GENGURES.PUB for more information).
PROMPT_NUM | Number of screen prompts for key fields.

Exit Points | Explanation
EXIT | GENACEML.PUB does not return any errors.

This chart breaks down the USER_EMAIL$ template:

Field | Description
MAINT:C(1*) | Set to "Y" for maintennace mode, or any other value for inquiry mode.
FILE:N(2*) | FILE[x] array element on which xxEM file is opened.
TITLE:C(70*) | Title the add/change screen displays.
TASK:C(1*) | Passes back Y$ to the calling program.
TYPE:C(1) | "N" to have screen with Next/Previous Screen prompts, or "D" to have screen with Done prompt.
MASTER[x]:N(2*) | Channel master file associated with field in TMP2$ is opened on
TEMPLATE[x]:C(8*) | Name of string template to retrieve for master file verification
ID[x]:C(20*) | Master ID passed in from calling program
IDNAME[x]:C(20*) | Field name in master template to verify (ex: "CUST")
NAME[x]:C(20*) | Field name in master template that holds name
WINDID[x]:C(9*) | Window ID to use for F2 in inquiry mode
SELVAL[x]:C(20*) | SELVAL associated with Window ID to use for F2 in inquiry mode
LABEL[x]:C(20) | Label that appears for each prompt.
TMP[x]:C(20) | Expression used to build name field; if populated, this expression is evaluated instead of using NAME$ field
TMP2[x]:C(20) | Expression used to build ID field; if populated, this expression is evaluated instead of using ID$ field

Note: The number passed in PROMPT_NUM determines how many prompt fields appear on the screen, and is used to prepare the USER_EMAIL$ template.

SET_TEMPLATE

When setting up to use this program, you can call GENACEML.PUB to have the USER_EMAIL$ template set up for you. The template USER_EMAIL$ has its arrays dimensioned to the number you pass in PROMPT_NUM.

`5905 SET_TEMPLATE:`
`5910 SETERR GENERROR`
`5915 ENTER USER_EMAIL$,PROMPT_NUM`

Variable | Description
USER_EMAIL$ | Template containing setup information for this function.
PROMPT_NUM | Number of screen prompts for key fields.