Documentation >
MAC-PAC Technical Library >
Distribution >
Synchro >
Programs >
Synchro Files Reorganization (RPG) - Purpose >
Synchro Files Reorganization (RPG) - Calculations
Synchro Files Reorganization (RPG) - Calculations
GA010E
A. Mainline
1. DPPURG reads the delivery request saving period (field RG19DR) from category G19.
2. DPPURG reads all delivery request headers from GA210M1. For each header the subroutine RRPURG is called. If no release is found, the header and all comments are deleted by calling RHPURG.
a. RRPURG deletes the delivery request release from the Delivery Request Detail file (GA210M2), if the period end date (RRPEDT) of the delivery request release is less than or equal to the minimum date given as an input parameter (PARDAT) and the actual date minus the period specified in RG19DR (the time that the user wants to keep the request in the system after they have become invalid):
RRPEDT <= min {PARDAT; today - RG19DR}
RRPURG writes the detail record to the Reorganization (GA024PF1) and calls subroutine RCPURG to delete the attached comments from the Comment file (GA210M3).
b. RHPURG writes the header record to the Reorganization (GA024PF1) and deletes it from the Delivery Request Header file (GA210M1). Subroutine RCPURG is called to delete the attached comments from the Comment file (GA210M3).