How to Run Performance Explorer (Profile) Performance Explorer will generate a histogram, showing what percentage of time is spent executing which statements. This is invaluable information when optimizing algorithms. Using MineSweeper5250 (v.93) as an example: ADDPEXDFN DFN(CP1010R) TYPE(*PROFILE) PGM((CP1010R)) INTERVAL(1) // create definition STRPEX SSNID(SESSION1) DFN(CP1010R) // start performance explorer call cp1010r // call program ENDPEX SSNID(SESSION1) DTALIB(CPANDO) RPLDTA(*YES) // end performance explorer (see note) PRTPEXRPT MBR(SESSION1) LIB(CPANDO) TYPE(*PROFILE) PROFILEOPT(*SAMPLECOUNT *STATEMENT) // print performance data The following histogram is generated: ============================================================================================================================== Performance Explorer Report 2/23/06 15:19:02 Profile Information Page - 1 Library . . : CPANDO Member. . . : SESSION1 Description : BLANK Histogram Hit Hit Cum Start Map Stmt Name Cnt % % Addr Flag Nbr ************ 32 33.3 33.3 0A024F1E7B00686C MP 570 CP1010R/COUNT_CELL **** 11 11.5 44.8 0A024F1E7B009EA4 MP 734 CP1010R/CURSORVALID *** 9 9.4 54.2 0A024F1E7B007750 MP 625 CP1010R/CVTXY ** 6 6.2 60.4 0A024F1E7B009D4C MP 728 CP1010R/CURSORVALID * 5 5.2 65.6 0A024F1E7B0075C0 MP 0 CP1010R/CVTXY * 5 5.2 70.8 0A024F1E7B007650 MP 623 CP1010R/CVTXY * 5 5.2 76.0 0A024F1E7B006C34 MP 571 CP1010R/COUNT_CELL * 5 5.2 81.2 0A024F1E7B009CC0 MP 0 CP1010R/CURSORVALID * 3 3.1 84.4 0A024F1E7B00631C MP 542 CP1010R/COUNT_@ARR 2 2.1 86.5 0A024F1E7B0067DC MP 569 CP1010R/COUNT_CELL 2 2.1 88.5 0A024F1E7B006768 MP 568 CP1010R/COUNT_CELL ============================================================================================================================== The Statement Number corresponds to the statement number in the compile listing, and not the source member. If I were to want to optimize the above program, I've got a very good idea about where to start (the procedure COUNT_CELL). note: The data library defaults to QPEXDATA. I prefer to put the data in one of my test libraries (e.g. CPANDO) Note: The data library defaults to QPEXDATA. I prefer to put the data in one of my development libraries (e.g. CPANDO)