* *PARMS CRTRPGMOD *PARMS DBGVIEW(*SOURCE) * H datedit(*ymd) indent('| ') option(*nodebugio:*noxref:*srcstmt) * FTraceIt o e Disk * *===================================================================== D ModEntry pr EXTPGM('TRC004') D PgmQlfy 20a const D PgmType 10a const D MdlName 10a const D StopInf 10a const D RcvrDta 4096 D RcvrEnt 10i 0 const D Message 4096 const D ModEntry pi D PgmQlfy 20a const D PgmType 10a const D MdlName 10a const D StopInf 10a const D RcvrDta 4096 D RcvrEnt 10i 0 const D Message 4096 const *===================================================================== D/COPY QRPGSRC,TRC010M00 D/COPY QRPGSRC,TRC012M00 *===================================================================== * D ViewId1 s 10i 0 D ViewId2 s 10i 0 D LineId2 s 10i 0 * D SrcText s 1024 * D Ptr001 s * D RcvVarHdr1 ds based(Ptr001) D LineId1 10i 0 * *===================================================================== * B01 C if %parms = *zeros 01 C Eval *inLr = *on 01 C Return E01 C EndIf * S01 C Select 01 * C01 C When %subst(StopInf: 3 : 1 ) = '1' 01 * 01 C Eval Ptr001 = %addr(RcvrDta) 01 * 01 * Register the statement view (-1) 01 C Eval ViewId1 = RegisterDebugView( 01 C PgmQlfy : 01 C PgmType : 01 C MdlName : 01 C -1 ) 01 * 01 * Selected for debug ? B02 C if SelectedForDebug(PgmQlfy) 02 * 02 * Get the 'ILE RPG Source View' 02 C Eval ViewId2 = GetViewInfo( 02 C PgmQlfy : 02 C PgmType : 02 C MdlName : 02 C 'ILE RPG Source View' ) 02 * 02 * Register the 'ILE RPG Source View' 02 C Eval ViewId2 = RegisterDebugView( 02 C PgmQlfy : 02 C PgmType : 02 C MdlName : 02 C ViewId2 ) 02 * 02 * Maps positions from one view to another 02 C Eval LineId2 = MapViewPosition( 02 C ViewId1 : 02 C LineId1 : 02 C ViewId2 ) 02 * 02 * Retrieve source text from a specified view. 02 C Eval SrcText = RetrieveViewText( 02 C ViewId2 : 02 C LineId2 ) 02 * 02 C Eval SrcSeq = %subst(SrcText:17:06) 02 C Eval SrcDta = %subst(SrcText:29) 02 * 02 C Time TheTime 02 * 02 C Write TraceItR 02 * E02 C EndIf 01 * 01 C callp Step(ViewID1) 01 * O01 C Other 01 * 01 C Eval *inLr = *on 01 * E01 C EndSl * C Return * *=====================================================================