* *PARMS CRTRPGMOD *PARMS DBGVIEW(*SOURCE) * H datedit(*ymd) indent('| ') option(*nodebugio:*noxref:*srcstmt) * *===================================================================== D ModEntry pr EXTPGM('TRC002') D Reason 10a D PgmLst 600 D PgmCnt 10i 0 D ModEntry pi D Reason 10a D PgmLst 600 D PgmCnt 10i 0 *===================================================================== D/COPY QRPGSRC,TRC010M00 D/COPY QRPGSRC,TRC012M00 D Trc004 pr ExtPgm('TRC004') *===================================================================== D ViewID s 10i 0 *===================================================================== * S01 C Select C01 C when Reason = '*START' 01 * 01 C CallP StartSourceDebug 01 * C01 C when Reason = '*DISPLAY' 01 * 01 * 01 * Store the program name for later.(using a service program 01 * as a go between) 01 C Callp SetPgmName(%subst(PgmLst:01:20)) 01 * 01 C callp MessageBox('Setting up : ' + 01 C %subst(PgmLst:01:20)) 01 * 01 * Get the statement view (-1) 01 C Eval ViewID = RegisterDebugView( 01 C %subst(PgmLst:01:20) : 01 C %subst(PgmLst:21:10) : 01 C %subst(PgmLst:01:20) : 01 C -1 ) 01 * 01 C callp Step(ViewID) 01 * C01 C when Reason = '*STOP' 01 * 01 C CallP EndSourceDebug 01 * 01 * Call the Program-Stop Handler without any parameters 01 * so it will close Itself 01 C CallP TRC004 01 * E01 C EndSl * C eval *inlr = *on * C Return * *=====================================================================