Problem solve
Get help with specific problems with your technologies, process and projects.
Get a report of large files and total records in a library
Get a report of large files and the total number of records in a library.
Get a report of large files and the total number of records in a library. I run this below job on the weekends to help manage files that need purging, or test libraries that my programmers forget to clean up.
***** OBJSIZE CLP ********* SOURCE FILE . . . . . . . EM400/QCLSRC MEMBER . . . . . . . . . OBJSIZE SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0 100 PGM 200 300 DCL VAR(&EML_ADR) TYPE(*CHAR) LEN(40) VALUE(' ') 400 DCL VAR(&SUBJECT) TYPE(*CHAR) LEN(50) + 500 VALUE('SIZE OF OBJECTS ON SYSTEM') 600 DCL VAR(&PRE_FIX) TYPE(*CHAR) LEN(3) VALUE('OBJ') 700 DCL VAR(&SIZE) TYPE(*CHAR) LEN(3) VALUE('132') 800 DCL VAR(&FILE_NAME) TYPE(*CHAR) LEN(10) + 900 VALUE('QPQUPRFIL') 1000 DCL VAR(&ARC_DLT) TYPE(*CHAR) LEN(3) VALUE('DLT') 1100 DCL VAR(&EXTRA) TYPE(*CHAR) LEN(512) VALUE(' ') 1200 1300 1400 CHGVAR VAR(%SST(&EXTRA 1 20)) VALUE('OBJSIZE') 1500 CHGVAR VAR(%SST(&EXTRA 21 20)) VALUE('OBJSIZE') 1600 1700 1800 CLRPFM FILE(OISTST/SYSSIZE) 1900 DSPOBJD OBJ(*ALL/*ALL) OBJTYPE(*FILE *JRN *JRNRCV) + 2000 OUTPUT(*OUTFILE) OUTFILE(OISTST/SYSSIZE) 2100 2200 OVRPRTF FILE(QPQUPRFIL) PAGESIZE(66 127) LPI(6) + 2300 CPI(15) FORMTYPE(0088) COPIES(1) 2400 RUNQRY QRY(OISTST/SYSLISTPF) 2500 DLTOVR FILE(*ALL) 2600 2700 ENDPGM ****** SAMPLE REPORT **** Library Object Object Object Text description Type Size TESTLIB ACCMAST PF 3,026,944 Accident Report file ACCMAST715 PF 2,801,664 Accident Report file ACITIES2 PF 7,798,784 City file FOR PHONE C AGTCUSTPF PF 11,120,640 Agent customer file APAGCK PF 130,183,168 A/P Agent Issued Chec APCLAUDPF PF 19,955,712 AP AUDIT file when en ARCUSTWK PF 30,466,048 ARCUST(Ma) - A/R cust BITMST PF 1,187,840 Order Master File for BLWAPSHOW PF 29,130,752 FIRST QUERY TO BE DON BORDR PF 305,520,640 PHY Billing ord BORDRL PF 418,955,264 PHY Billing ord BORDR2 PF 14,573,568 Border file extra fie BRKAUTH PF 10,674,176 BROKERAGE AUTHORIZATI BT2222 PF 1,933,312 Orders created with B TOTAL 3,524,534,272 FINAL TOTALS TOTAL 50,994,868,224 ******* SYSLISTPF Query ***** Query . . . . . . . . . . . . . . . . . SYSLISTPF Library . . . . . . . . . . . . . . . OISTST Query text . . . . . . . . . . . . . . List Large SYS Objects Query CCSID . . . . . . . . . . . . . . 65535 Query language id . . . . . . . . . . . Query country id . . . . . . . . . . . *** . is the decimal separator character for this query *** Collating sequence . . . . . . . . . . Hexadecimal Processing options Use rounding . . . . . . . . . . . . Yes (default) Ignore decimal data errors . . . . . No (default) Ignore substitution warnings . . . . Yes Use collating for all compares . . . No Selected files ID File Library Member Record Format T01 SYSSIZE OISTST *FIRST QLIDOBJD Select record tests AND/OR Field Test Value (Field, Numbers, or 'Characters') ODOBSZ GT 1000000 AND ODOBAT NE 'LF' Ordering of selected fields Field Sort Ascending/ Break Field Name Priority Descending Level Text ODLBNM 1 Library ODOBNM Object ODOBAT Object attribute ODOBSZ Object size ODOBTX Text description ODOBOW Object owner IBM Query/400 1/07/03 10:18:35 Page 2 Report column formatting and summary functions Summary functions: 1-Total, 2-Average, 3-Minimum, 4-Maximum, 5-Count Overrides Field Summary Column Dec Null Dec Numeric Name Functions Spacing Column Headings Len Pos Cap Len Pos Editing ODLBNM 0 Library 10 ODOBNM 2 Object 10 ODOBAT 2 Object 10 Type ODOBSZ 1 0 Object 10 0 Size ODOBTX 2 Text description 50 ODOBOW 2 Object 10 Owner Report breaks Break New Suppress Break Level Page Summaries Text 1 No No Selected output attributes Output type . . . . . . . . . . . . . . Printer Form of output . . . . . . . . . . . . Detail Line wrapping . . . . . . . . . . . . . No Printer Output Printer device . . . . . . . . . . . . *PRINT Report size Length . . . . . . . . . . . . . . . 68 (default) Width . . . . . . . . . . . . . . . . 127 Report start line . . . . . . . . . . . 2 Report end line . . . . . . . . . . . . 66 Report line spacing . . . . . . . . . . Single space Print definition . . . . . . . . . . . No Printer Spooled Output Spool the output . . . . . . . . . . . Yes Form type . . . . . . . . . . . . . . . 0088 Copies . . . . . . . . . . . . . . . . 1 Hold . . . . . . . . . . . . . . . . . (Defaults to value in print file, QPQUPRFIL) IBM Query/400 1/07/03 10:18:35 Page 3 Cover Page Print cover page . . . . . . . . . . . No Cover page title Page headings and footings Print standard page heading . . . . . . Yes Page heading Page footing (oistst/syslist) * * * * * E N D O F Q U E R Y P R I N T * * * * *
Start the conversation
0 comments