Documentation >
MAC-PAC Technical Library >
Distribution >
Job Control >
Programs >
Job Setup and Maintenance - Purpose >
Job Setup and Maintenance - Calculations
Job Setup and Maintenance - Calculations
JC100E
A. Housekeeping
1. Parameters, key lists, and fields are set up.
2. Data is retrieved from the System Control and Reference files.
3. Work fields are defined and initialized.
B. Mainline
1. Program processing is controlled by the program status (PGMSTS) and previous status (PRVSTS) fields. This will determine the screen displayed along with the option selected at the select screen.
a. The select screen is displayed if the previous status was 1-Housekeeping, 2-Detail Screen 1, or 3-Detail Screen 2.
b. If the previous status was select and there were no errors, the first detail screen will be displayed if the option is 1 or 3. The second detail screen will be displayed for option 2 if no errors were detected.
2. If the select screen is called the following takes place:
a. The error subfile display is executed and the record format is written or read.
b. If the program is returning from Help, the record format is read to retrieve any changed screen data.
c. The job number is blanked out if automatic job number assignment is on and an error has occurred on the select screen.
d. Error subfile and indicators are cleared.
e. Data that is entered is validated. If the option selected (CZOPT) equals option 1 (OPT1), the job number is validated if automatic job number assignment is not on. If automatic job number assignment is on, a job number is assigned. If the job number is valid, it is checked to see that it is not an existing job group number. The job status cannot be closed or final cost closed. If option 2 is selected (CZOPT=OPT2), the job number cannot be entered. If option 3 is selected (CZOPT = OPT3), the job number must be valid, and must not be an existing job group number. The job status must not be equal to costing closed.
f. The release number, if entered, is converted from an alphabetic sales order release field to a numeric field. This is necessary to read out to the sales order detail file.
g. The sales order header is checked for the customer name and the configured order flag is checked. If the configured order flag is Y, then at the time the master file is updated, the job number will also be updated to the Manufacturing Order file, the Component Issue file, and the Labor Requirements file if they already exist. If manufacturing orders do not exist for a configured sales order, then the job number is assigned to the sales order, and it will carry through to the manufacturing order, component requirement, and labor requirement when they are created. At the manufacturing order level, the job number is only assigned if the associated part is job controlled. If the sales order number is valid and the job number exists on the Job Master file, the program checks that the job has the same customer, company, and location as the sales order.
h. If option 1 is selected, the sales order line file is checked. The order must have at least one open line and the part on the line must be job-controlled. If any line has been previously assigned a job number, the sales order is invalid.
i. Record locks on the sales order are checked before the job number is assigned. If there are none, then the job controlled record lock is set, and processing continues. At the manufacturing order level for configured parts, a check is made for a manufacturing order lock. If no manufacturing order lock exists, then a lock is set and processing continues.
j. If the detail screen for options 1 or 3 is called, the following occurs:
(1) If the job does not exist, fields are initialized. If the job exists, fields are formatted from the Job Master file and descriptions are decoded.
(2) The group and manager are validated for a new job. If no errors exist, the Job Master file (options 1 and 3) and the Sales Order Detail file (option 1 only) are updated.
(3) If the job status is changed (option 3 only), the job status cannot be changed to costing closed if there is activity. The manufacturing orders, purchasing orders, sales orders, shipping (the asynchronous trigger file), and inventory are all checked for activity.
k. Audit trails are written with the date and time stamped.
l. If the Detail Screen for option 2 was selected, the screen is initialized and the detail subfile (JC100S03) is displayed.
(1) Those line items that have already been assigned job numbers are protected on the subfile.
(2) When a selection is made, the record selected is displayed on the maintenance line (JC100S04) at the bottom of the screen. Only the job number is enterable at this point, all other fields are protected.
(3) If automatic job number assignment is active (Reference File category D49), the job number is formatted with the sales order and line number; this may be overwritten by the user. If automatic job number assignment is not active, the job number field is blank.
(4) If a job number is entered that does not exist on the Job Master file or on any previous subfile records, the Job Number field is protected and the Description, Group Number, and Project Manager fields are unprotected. If a job number is entered that exists on the Job Master file, the Job Master file data is written to the subfile and the screen is redisplayed without the maintenance line. If a job number that has been previously entered on the subfile has been entered, the fields on that record are written to work fields. These work fields are then written to the fields of the subfile record being processed. The screen is redisplayed without the maintenance line.
(5) Once those fields are validated, the information on the maintenance line is written to the subfile and the entire screen is redisplayed.
(6) Once all selections have been processed, a warning message prompts the user to press Enter to post the changes to the master files.
(7) Hidden fields on the subfile indicate if an update to the Job Master file and/or an update to the Sales Order Line file should occur.
(8) The program then returns to the select screen processing.