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

# GENACDOC.PUB

GENACDOC.PUB is a public program that allows the user to enter in user defined documents for a given master file. Use this program if you have set up a separate file that holds documents for any master file you have.

`0055 ENTER FILE[ALL],USER_ACDOC$,XXUD$,OSGUI$,PROMPT_NUM`

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

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

This chart breaks down the USER_ACDOC$ template:

Field | Description
DOC:N(2) | FILE[x] array element on which xxUD file is opened.
TITLE:C(70) | Title the add/change screen displays.
LABEL[x]:C(20) | Label that appears for each prompt.
ID[x]:C(20) | Data that appears for each prompt.
DESCR[x]:C(35) | Description that appears for each prompt.
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.

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

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

`5905 SET_TEMPLATE:`
`5907 SETERR GENERROR`
`5910 ENTER USER_ACDOC$,PROMPT_NUM`

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