|
We run the simple CL program (see below) every Sunday. It takes just under three hours, on our AS/400 model 720, to reorganize every file on our system. We have over 700 libraries and thousands of files. The exception to this is that query SFPLIB/DLTRCDSQ does not "Select Records" (see below) for the Inventory Transaction file (INP95) or the AFI Transaction file (FIP45). We have several million records in each of these files with several logicals over them. We have System 21 distribution, financials, and manufacturing on our system and various other applications. The field MBNDTR in the query selection criteria below contains the number of deleted record in the file. Please feel free to contact me if you have any questions. Steve ____________________________________________________________________ Query Select Records statements in query SFPLIB/DLTRCDSQ: MBFTYP EQ 'P' Physical file AND MBDTAT EQ 'D' Data File AND MBNDTR NE 0 Deleted Records AND MBFILE NLIST 'INP95' 'FIP45' _________________________________________________________________________ PGM DCLF FILE(SFPLIB/DLTRCDS1) DSPFD FILE(*ALLUSR/*ALL) TYPE(*MBR) + OUTPUT(*OUTFILE) OUTFILE(SFPLIB/DLTRCDS) /* QRY BELOW CREATES FILE SPFLIB/DLTRCDS1 FROM THE FILE SFPLIB/DLTRCDS */ /* CREATED ABOVE IN DSPFD. SFPLIB/DLTRCDS1 WILL CONTAIN ONLY */ /* FILES THAT HAVE DELETED RECORDS WHICH AND USED IN THE RGZPFM BELOW */ RUNQRY QRY(SFPLIB/DLTRCDSQ) /* REORG FILES FROM ABOVE */ READ: RCVF /* Read a record */ MONMSG MSGID(CPF0864) EXEC(GOTO EOF) /* EOF */ /* Organize all files with deleted records except system files */ /* (Q libraries) and INP95 (this is redundant because INP95 is */ /* not selected in the query above but shown here for example only */ IF COND((%SST(&MBLIB 1 1) *NE 'Q') *AND (&MBFILE + *NE INP95)) THEN(DO) RGZPFM FILE(&MBLIB/&MBFILE) KEYFILE(*FILE) MONMSG CPF2981 ENDDO GOTO CMDLBL(READ) EOF: CLRPFM FILE(SFPLIB/DLTRCDS) ENDPGM -----Original Message----- From: DAhKow@xxxxxxxxxxxxx [mailto:DAhKow@xxxxxxxxxxxxx] Sent: Monday, December 15, 2003 3:04 AM To: System 21 Users Subject: [SYSTEM21] Re-Use deleted Records Hi everybody, as part of a regular routine, we do reorganise the physical files in our OSL libraries to purge deleted records, since some of these files have grown to quite large figures and for some of them, the number of deleted records is quite a high percentage of the total number of records. RGZPFM takes quite some time to complete, especially when there are many logicals that have to be re-indexed. We would like to know if would be safe to change the 'RE-USE DELETED RECORDS' attributes of such files to *YES. Anybody has done that already without any problem? Rgds _______________________________________________ This is the System 21 Users (SYSTEM21) mailing list To post a message email: SYSTEM21@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/system21 or email: SYSTEM21-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/system21.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.