News
Abstract
Converting a Collection Services File for New Metrics
Content
You are in: IBM i Technology Updates > Performance Tools > Performance Data Collectors > Documentation and Tips > Converting a Collection Services File for New Metrics
When new fields are added to a Collection Services database file in a PTF, the cover letter will contain special instructions to convert existing Collection Services file-based collections to the new database file format.
The instructions provided below are generic instructions for upgrading existing Collection Services file-based collections to the latest database file formats. See the PTF cover letter for the exact instructions related to the PTF being applied.
The Collection Services database files can be converted to the latest file formats in any library. If the management collection objects (*MGTCOL) still exist for file-based collections in an existing library, an alternative option is to run Create Performance Data (CRTPFRDTA) for each *MGTCOL into a new library. Collection Services will create the database files in the new library using the latest file formats that include the new metrics. The Collection Services database files in the active configured collection library can be upgraded similarly.
Restarting Collection Services in a new collection library
For the active configured collection library, it may be easiest to simply restart Collection Services data collection into a newly created library. Collection Services will create the database files in the new library using the latest file formats that include the new metrics. To do this, follow the instructions below.
- End Collection Services:
ENDPFRCOL FRCCOLEND(*YES)
- Rename the existing configured collection library:
RNMOBJ OBJ(QPFRDATA) OBJTYPE(*LIB) NEWOBJ(xxxxxxxx)
Note: Your active configured library may not be QPFRDATA. If you prompt on command CFGPFRCOL, the Collection library (LIB) parameter specifies the configured collection library. - Create a new configured collection library:
CRTLIB LIB(QPFRDATA)
- Start Collection Services:
STRPFRCOL
Converting database files in an existing library to new file formats
The Collection Services database files can be converted to the latest file formats in any library. The instructions provided below are generic instructions for upgrading existing Collection Services file-based collections to the latest database file formats. See the PTF cover letter for the exact instructions related to the PTF being applied.
- If the library being upgraded is the active configured collection library, Collection Services must be ended:
ENDPFRCOL FRCCOLEND(*YES)
- For each physical file that you want to update to the latest file format, determine if there are any dependent objects by examining the output of the following command:
DSPDBR FILE(your-lib/physical-file)
- For each physical file that you want to update to the latest file format, move it from the existing library to a backup library:
MOVOBJ OBJ(col-lib/physical-file) OBJTYPE(*FILE) TOLIB(your-backup)
- For each dependent object identified in step 2, move it from the existing library to a backup library:
MOVOBJ OBJ(col-lib/dependent-obj) OBJTYPE(obj-type) TOLIB(your-backup)
- For each physical file you moved in step 3, create a copy of the physical file with the latest file format in QSYS to the existing library:
CRTDUPOBJ OBJ(physical-file) FROMLIB(QSYS) OBJTYPE(*FILE) TOLIB(col-lib)
- For each physical file you moved in step 3, grant users in the QPMCCDATA authorization list access to the new file in the existing library:
GRTOBJAUT OBJ(col-lib/physical-file) OBJTYPE(*FILE) AUTL(QPMCCDATA)
- For each physical file you moved in step 3, copy all members from the physical file in the backup library to the new file in the existing library:
CPYF FROMFILE(your-backup/physical-file) TOFILE(col-lib/physical-file) FROMMBR(*ALL) TOMBR(*FROMMBR) MBROPT(*REPLACE) FMTOPT(*MAP *DROP)
-
For each dependent object you moved in step 4, create a copy from the backup library to the existing library:
CRTDUPOBJ OBJ(dependent-obj) FROMLIB(your-backup) OBJTYPE(obj-type) TOLIB(col-lib) DATA(*YES)
- For each dependent object you moved in step 4, delete it from the backup library:
DLTOBJ OBJ(your-backup/dependent-obj) OBJTYPE(obj-typ)
- Restart Collection Services performance data collection if you ended it in step 1:
STRPFRCOL
Was this topic helpful?
Document Information
Modified date:
24 January 2020
UID
ibm11172182