MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Purchasing > Programs > P.O. Audit Trail Print - Purpose > P.O. Audit Trail Print - Calculations

P.O. Audit Trail Print - Calculations

PO500E

A.   Housekeeping

1.   See Common Processing Routines - Housekeeping of this manual for a general discussion of the Housekeeping subroutine.  Processing specific to this program is described below.

2.   A parameter list is set up.

3.   Workfields are defined and program constants are initialized.

4.   The date format record (category 049) is retrieved from the Reference file (REFERP).  If this record is not found, the date format defaults to MMDDYY.

5.   A priming read is performed on the logical Purchasing Audit Trail file (PO500AL).  If no records are found, or the Audit Trail Print Flag (ATPRNT) of every record equals 1 (already printed), the report headings are printed, an error message is printed, and the program ends.

B.   Mainline

1.   The logical sorted Purchasing Audit Trail file (PO500AL) is read sequentially.  The transactions processed by this program are as follows:

Code

 

Type of Maintenance

 

Physical File

 

Subroutine

Q05

Add an Item/Vendor Relationship

PO140BP1

PRTIVR

Q10

Change an Item/Vendor Relationship

PO140BP1

PRTIVR

Q15

Delete an Item/Vendor Relationship

PO140BP1

PRTIVR

Q20

Reactivate an Item/Vendor Relationship

PO140BP1

PRTIVR

Q22

Add an Item/Vendor Relationship Comment

PO140BP2

PRTIVC

Q25

Change an Item/Vendor Relationship Comment

PO140BP2

PRTIVC

Q27

Delete an Item/Vendor Relationship Comment

PO140BP2

PRTIVC

Q30

Add a Quotation

PO150BP1

PRTQTN

Q35

Change a Quotation

PO150BP1

PRTQTN

Q40

Delete a Quotation

PO150BP1

PRTQTN

Q45

Mass Delete Quotations

PO150BP1

PRTQTN

Q50

Add a Quotation Comment

PO150BP2

PRTQTC

Q55

Change a Quotation Comment

PO150BP2

PRTQTC

Q60

Delete a Quotation Comment

PO150BP2

PRTQTC

Q65

Add a Requisition

PO160BP1

PRTRQS

Q70

Change a Requisition

PO160BP1

PRTRQS

Q85

Add a Requisition Comment

PO160BP2

PRTRQC

Q90

Change a Requisition Comment

PO160BP2

PRTRQC

Q95

Delete a Requisition Comment

PO160BP2

PRTRQC

R05

Add a Purchase Order

PO180BP1

PRTPOH

R10

Change a Purchase Order

PO180BP1

PRTPOH

R15

Close a Purchase Order

PO180BP1

PRTPOH

R20

Reactivate a Purchase Order

PO180BP1

PRTPOH

R25

Add a Purchase Order Line

PO180BP2

PRTPOL

R30

Change a Purchase Order Line

PO180BP2

PRTPOL

R35

Close a Purchase Order Line

PO180BP2

PRTPOL

R40

Reactivate a Purchase Order Line

PO180BP2

PRTPOL

R45

Add a Release

PO180BP3

PRTPOR

R50

Change a Release

PO180BP3

PRTPOR

R55

Add a Purchase Order Comment

PO180BP4

PRTPOC

R60

Change a Purchase Order Comment

PO180BP4

PRTPOC

R65

Delete a Purchase Order Comment

PO180BP4

PRTPOC

R70

Add a Receipt

PO210BP1

PRTRCH

R72

Change a Receipt

PO210BP1

PRTRCH

R74

Close a Receipt

PO210BP1

PRTRCH

R76

Add a Receipt Line

PO210BP2

PRTRCL

R78

Change a Receipt Line

PO210BP2

PRTRCL

R80

Close a Receipt Line

PO210BP2

PRTRCL

R88

Add a Receipt Comment

PO210BP4

PRTRCC

R90

Change a Receipt Comment

PO210BP4

PRTRCC

R92

Delete a Receipt Comment

PO210BP4

PRTRCC

2.   As each transaction is read, the Audit Trail Print Flag (ATPRNT) is checked.  If it equals 0 (not yet printed), processing is directed to the proper subroutine, according to the record's transaction code.  The processing is the same for every transaction.

a.   Page headings and subheadings are determined.

(1)  The overflow indicator is checked.  If it is on, or if the previous page's print line is greater than the last print line for that page, new page headings are printed.

(2)  If the detail line to be printed requires a subheading different than the previous detail line, or if a new page is being printed, new subheadings are printed.

b.   The detail line is printed.

c.   The Audit Trail Print Flag (ATPRNT) is changed to 1 (printed) and updated on the Audit Trail file.

3.   Counters are incremented throughout processing.  After the last transaction is read and the last detail line printed, totals are printed and the "END OF REPORT" line is printed.

4.   The Purchasing control record (POCTL1) on the System Control file (CT100M) is updated with the date and time of this audit trail run.

PO500E Program Menu