H DEBUG(*YES) *T: Test ReadSource() in PRCSRC1S *O: CRTBNDRPG DBGVIEW(*ALL) OPTION(*NODEBUGIO) DFTACTGRP(*NO) *O: ACTGRP(*CALLER) BNDDIR(UTILITY) *===================================================================== D ThisProgram C 'TESTPRCSRC' *--------------------------------------------------------------------- *‚Copybooks *--------------------------------------------------------------------- D/COPY QRPGLECPY,PRCSRC_P ‚ReadSource() procedure prototype *--------------------------------------------------------------------- *‚Internal procedure prototypes *--------------------------------------------------------------------- * *‚Simple procedure to display first 52 characterrs of each statement *‚using the DSPLY op-code. Note that this procedure has the same *‚interface as the ReadProc() procedure in the PRCSRC_P copybook. * D Display PR 10I 0 D Data 32702A Const Varying * *--------------------------------------------------------------------- *‚Global variables *--------------------------------------------------------------------- * D qSrcFile DS Inz D SrcFile 10A Overlay(qSrcFile) D SrcLib 10A Overlay(qSrcFile:*Next) D SrcMbr S 10A Inz * *===================================================================== *‚Main procedure interface *===================================================================== D main PR Extpgm(ThisProgram) D main PI *===================================================================== *‚MAINLINE *===================================================================== /free SrcFile = 'QCLSRC'; SrcLib = 'QGPL'; SrcMbr = '*FIRST'; if ReadSource( qSrcFile : SrcMbr : %paddr( Display ) ) <> 0; exsr *pssr; endif; return; begsr *pssr; return; endsr; /end-free *===================================================================== P Display B D PI 10I 0 D Data 32702A Const Varying *--------------------------------------------------------------------- D DsplyData S 52A *--------------------------------------------------------------------- /free DsplyData = Data; dsply DsplyData; return 0; begsr *pssr; return -1; endsr; /end-free P E