MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Expert Configurator > Programs > Configuration Code Template Master Maintenance - Purpose > Configuration Code Template Master Maintenance - Calculations

Configuration Code Template Master Maintenance - Calculations

EC160E

A.   Housekeeping

1.   Parameter lists and key lists are defined.

2.   Work fields are defined and program constants are initialized.

3.   CPF File Access Status Codes are retrieved from Reference File category 015.

4.   The Date Format is retrieved from Reference File category 049.

B.   Mainline

1.   Display and validate the select screen.

a.   Validate the Maintenance Code field (RCODE) for either 1 - Add, 2 - Change, or 3 - Delete.

b.   If the Maintenance Code is 1 - Add, check the Template Master file (EC160M) for the template.  If it exists send an error message saying template already exists.

c.   Validate the Copy From Template.  It must be a valid Template on the Template Master file (EC160M).

d.   If the Maintenance Code is 2 - Change or 3 - Delete, check the Configuration Code file (EC140M) to see if the template is used by a Configuration Code.  If it is, send and error message saying template is in use.

e.   If the Maintenance Code is 3 - Delete, check the Part Master file (DE100M) for the template.  If it exists send an error message saying template is in use.

f.    If no errors have occurred, lock the template header record on the Template Master file (EC160M).

2.   Display, validate, and process the detail screen.

a.   Validate the Sequence Number (SFSEQ).  This number must be greater than zero and cannot be all blanks.

b.   Validate the From Position (SFFPOS).  This position must be a valid number between 1 and 50.

c.   Validate the To Position (SFTPOS).  This position must be a valid number between 1 and 50 and it must be greater than from position.

d.   Validate the Template Description (SFFDSC).  The description cannot be all blanks and must be smaller than the from position size.

e.   Validate the Value Type (SFVALT).  The type must be either:

L - Literal

O - Option Name

S - Secondary Variable

G - Global Variable

I - Internal Variable

f.    Validate the Value (SFVVAL).  The value must not be blank.

g.   Validate the Reference File category (SFVCAT).  The category must exist on the Reference file (REFERP).

h.   Validate for duplicate and overlapping fields based on From and To Positions.

i.    Update the Template Master file (EC160M) if no errors have occurred.

3.   Return to the function select screen if no errors have occurred.

4.   Reset the lock on the template header record of the Template Master file (EC160M).

EC160E Program Menu