Documentation >
MAC-PAC Technical Library >
Manufacturing >
Design Engineering >
Programs >
Revision Level Generation - Purpose >
Revision Level Generation - Calculations
Revision Level Generation - Calculations
DE190E
A. Housekeeping
1. See the Common Processing Routines Section for a general discussion of this subroutine. Processing specific to this program is described below.
2. Parameter lists and key lists needed by the program are defined. Work fields and constants are defined and initialized.
3. The following information is retrieved from the System Control file (CT100M) and the Reference file (REFERP).
a. The operating system's file status codes (category 015) are retrieved to check file status on I/O routines. If the category is not found the program terminates.
b. The date format (category 049) is retrieved. If this record is not found, a message is sent to the system operator, the date format defaults to MMDDYY, and processing continues.
c. The COMNAM record of the System Control file is retrieved to determine the company name. If this record is not found, the company defaults to blanks.
d. The Design Engineering control record on the System Control file is retrieved for the Revision Level Generation Flag (SUBRVG). If the program was called from the DE module and this flag is Y, the program continues. If this flag is N or if this record is not found, an error message is generated and the program terminates.
B. Mainline
1. The first record is retrieved from the Part Master file (DE100L18). If there are no records on the file, the Changed Revision Level report (DE190A) is printed with an error message and the program is ended.
2. The following processing occurs for each part number on the Part Master file.
a. The product structure records are read from the Product Structure file (DE120M). For each product structure record on file for a given part, the following processing occurs.
(1) If the ECO in-date (PEFW) is greater than the current effectivity date for the current revision level (PMREFF) on the Part Master file, it is loaded into an array.
(2) If the ECO out-date (PEFOUT) is greater than the current revision level effectivity date (PMREFF) on the Part Master file, the following working day is loaded into the array (i.e., the new revision level will come into effect the day after the ECO goes out of effect). The Shop Calendar file (CT140M) is used to determine the next valid shop date in this case.
b. Once the data array has been loaded with all ECO in- and out-dates for a part, the Revision Level file (DE170M) is processed to finish loading the date array. All the revision levels for a part are read, and when a user-added revision is found (RVUSRA = 'Y'), the date for that revision is added to the array (if the date is not already in the array). If the user-added revision is not numeric, it is deleted from the Revision Level file.
c. If, at any point during the loading, the array is filled and there are more dates to load, an error message is written, no revision levels are generated for that part, and processing continues with the next part.
d. After the array has been loaded with dates, it is sorted in ascending order. Revision levels are then generated for each date in the array. Revision levels are assigned sequentially starting from the current revision level on the Part Master record.
(1) If the revision level does not already exist on the Revision Level file (DE170M), a new record is added to the file. The following fields default to the value specified.
|
|
|
RVHFLG
|
Revision History Flag
|
N
|
RVDESC
|
Revision Description
|
*BLANKS
|
RVUSRA
|
User-Added Flag
|
N
|
RVUPDT
|
Update Counter
|
0
|
RVVER
|
Version Number
|
0
|
(2) If the revision level does already exist on the Revision Level file, the record is updated with the new revision level data. That is, the revision level effectivity date is replaced by the new effectivity date from the array.
(3) If the date being processed from the array corresponds to a user-added revision level, subsequent processing depends on the current revision level being generated and the already existent revision level of the user-added revision.
(i.) If the current revision level being generated is less than the revision level already assigned to the user-added revision, the user-added revision will retain the latter revision level. If there are
revision levels between the last revision level generated and the user-added revision level,
they are deleted.
(ii.) On the other hand, if the current revision level being generated is greater than the revision
level already assigned to the user-added revision, the revision level of the user-added
revision will be changed to the current revision level. In this case, a report will be written
to inform the user that the revision level has been changed. If the current revision level being generated already exists on the Revision Level file, it is updated with the data from the user
added revision. If the current revision level does not already exist, a new record is added
containing this data.
c. Once revision levels have been generated for all dates in the array, any revisions on the Revision Level file that are greater than the last revision just generated are deleted.
3. The next part master record is read and processing starts again at step 1 above. If there are no more records in the file to be processed, END is moved to the program status field and windup processing is performed.
4. In windup processing, the printer file is closed and the DE Revision Level Generation Flag (SUBRVG) on the DECTL1 record of the System Control file is updated with blanks.