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

# GENCMNT.PUB

GENCMNT.PUB is a public program that is used for both comment entry and comment inquiry. Currently customers, vendors, and jobs support comments. The comment file structures for these three are identical with the exception of the jobs comment file, because both jobs and their phases may have comments. The program contains two entry points.

COMMENT

This entry point will prompt for comment entry and provide inquiry function for comments as well.

`0050 COMMENT:`
`0060 ENTER FILE[ALL],MASTER$,COMMENT$,OSGUI$`

Variable | Description
FILE[ALL] | Standard file array
MASTER$ | Template containing the master file record for the selected customer, vendor, or job
COMMENT$ | Template containing the information for comment entry
OSGUI$ | GUI template (see GENGURES.PUB for more information)

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

This chart breaks down the COMMENT$ template:

Field | Description
CMNT:N(2*) | FILE[X] index on which the comment file is open
MASTER:N(2*) | FILE[X] index on which the master file (customer, vendor, or job file) is open
TYPE:C(6*) | Used for displaying the type of comment (“Customer”, “Vendor”, or “Job”)
FULL:C(1*) | Set to Y for full-screen display, or to N for a short screen. Full screens are used in maintenance functions, short screens are used in inquiry functions.
MAINT:C(1*) | Set to Y to allow for editing of comments, or to N to prohibit editing
INQUIRY:C(1*) | Set to Y to allow inquiry on comments, or N to prohibit inquiry
STARTROW_N(1*) | Starting row where comment box will be displayed (used only if COMMENT.FULL$ is set to N)
ID:C(6*) | The master file’s ID calling program is working with. This will be the customer, vendor, or Job ID.
IDNAME:C(6*) | The template field name within MASTER$ where the ID can be found
NAME:C(6*) | The name associated with the comment ID (for example, customer name, vendor name, or job name)
WINDID:C(9*) | Window ID used for main ID (customer, vendor, or job)
SELVAL:C(10*) | Used in conjunction with WINDID$
TMP:C(50*) | An expression used to determine the field that prints by the ID field. If this is blank, COMMENT.NAME$ is used.
TASK:C(1*) | Returns a keypress or Y$ value to the calling program. This determines what the user did while in this routine to exit the function.

SET_TEMPLATE

This entry point will set the template COMMENT$.

`5905 SET_TEMPLATE:`
`5910 ENTER COMMENT$`