69 Purge Data

This chapter contains these topics:

When data becomes obsolete or you need more disk space, you can use purge programs to remove data from files.

69.1 Overview

Purging data consists of:

  • Specifying the information to delete

  • Running the purge program

  • Running the file reorganization program to rebuild the file structure

Caution:

You must know the proper procedures and consequences of purging data to avoid serious damage to your system and data. Purging data is typically performed by a system administrator or operations personnel. It is important that only those employees who understand the purge process and its results are allowed access to this procedure.

General purges are versions of the JD Edwards World general purge program (P00PURGE) that remove data from a specific file. You generally run the purge program when you want to remove a large amount of data.

JD Edwards World provides special purges for removing data from files where the selection criteria needs to be more specific. Special purges are programs that have predefined criteria that the system checks before removing any data so you avoid removing associated data located in other files.

69.1.1 Before You Begin

  • Back up the files that will be affected

  • Determine the data you want to purge

  • Verify that no users are working with the data that you want to purge and reorganize

69.1.2 What You Should Know About

Topic Description
Customizing a purge You can create a customized purge by changing the data selection to fit your needs. For example, you could use a range of fiscal years rather than all dates.
Processing options You can set processing options that save files in a special library and allow you to reorganize the purged files. These options are very similar in all purge programs.

All of the DREAM Writer versions (DWVs) of P00PURGE and many of the special purge programs have these two processing options:

SAVE PURGED RECORDS: 1. Enter a '1' to save the purged records to a special purge library. (Default of blanks will NOT save any purged records.)

REORGANIZE FILE: 2. Enter a '1' to reorganize the purged file. (Default of blanks will NOT reorganize the file.)

It is strongly recommended that you always set processing option 1 to 1. This will allow you to restore the purged records if you inadvertently purge records that you intended to retain.

Technical considerations The following technical considerations apply to both general and special purges:
  • If File Output Type on the DREAM Writer Additional Parameters form for the DREAM Writer version you are using is set to 1 (for OPNQRYF), you must also set the Open for Delete (Y/N) field to Y. Also, you must specify at least one field in Data Sequencing.

  • If File Output Type on the DREAM Writer Additional Parameters form for the DREAM Writer version you are using is set to 2 (for logical file), the purge will reorganize the purged file based on the logical file that the system builds. This might increase the time that the system takes to perform the file reorganization.


69.2 Running General Purges for the Procurement System

Navigation

From Stock Based Procurement (G43A), enter 27

From Procurement Advanced and Technical Ops (G43A31), choose Data File Purges

General purges for the Procurement system include:

  • Purchase Order Detail purge

  • Purchase Order Receiver Detail purge

  • Purchase Order Ledger purge

General purges are versions of the JD Edwards World general purge program (P00PURGE) that remove data from a specific file. You generally run general purges when you want to remove a large amount of data.

You can create versions of the general purge program to purge data from any JD Edwards World file. However, JD Edwards World recommends that you do not use general purges for files that have their own special purge programs. General purges are not designed for files that have associated data in other files. Running a general purge for such files could cause you to lose data.

The general purges remove records with a next status of 999, or closed, from the specified file.

69.2.1 Processing Options

See Section 83.2, "Batch File Purge (P00PURGE)."

69.3 Running Special Purges for the Procurement System

Navigation

From Stock Based Procurement (G43A), enter 27

From Procurement Advanced and Technical Ops (G43A31), choose Data File Purges

JD Edwards World provides special purges for removing data from files where the selection criteria needs to be more specific. Special purges are programs that have predefined criteria that the system checks before removing any data so that you avoid removing associated data that is located in other files.

Running special purges involves:

  • Running the Purchase Order Header purge

  • Running the Extended Text purge

  • Running the Purchase Order Text Lines purge

69.3.1 What You Should Know About

Topic Description
Saving purged records You can save purged records to a special purge library if needed. The name of the purge library will be JD Edwards World followed by the current date (for example, JDE121498 for purged records saved on December 14, 1998). If you purge more records on the same date and save them, those records will be added to the current purge library.

69.3.2 Running the Purchase Order Header Purge

Use the Purchase Order Header purge (P4301P) to purge purchase order header records from the Purchase Order Header table (F4301). Records are purged from the Purchase Order Header table only if no records associated with the purchase order exist in the Purchase Order Detail file (F4311). Also, if records exist in the Purchase Order Receiver file (F43121), then all purchase order lines must be closed for the records to purge in the Purchase Order Header table.

69.3.4 Running the Extended Text Purge

You use the Extended Text purge (P4314P) to delete associated text from the Text Line file (F4314).

This purge checks the Purchase Order Detail file (F4311) for open detail lines with matching order type and order number combinations. One of the following occurs:

  • If the system does not find matching records, it deletes the extended text from the Text Line file.

  • If the system finds matching records, it deletes the Extended Text from the Text Line file only if the matching detail lines have a status of 999.

69.3.6 Running the Purchase Order Text Lines Purge

Run the Purchase Order Text Lines purge to update all text lines associated with a purchase order line when the line is no longer open. The system updates the Next Status field for the text line to a status of 999 (closed) when the open amounts become zero for a purchase order line.

A text line is a line on a purchase order for which the line type is usually a T.