midrange.com code scratchpad
Name:
reThrow
Scriptlanguage:
Plain Text
Tabwidth:
0
Date:
10/21/2009 11:32:41 am
IP:
Logged
Description:
send escape message furher up in the call stack
Code:
  1.      p reThrow         b                   export
  2.      d                 pi
  3.  
  4.      d moveProgramMsg...
  5.      d                 pr                  extPgm('QMHMOVPM')
  6.      d msgKey                         4a   const
  7.      d msgTypes                      10a   const dim(4) options(*varsize)
  8.      d numMsgTypes                   10i 0 const
  9.      d toStack                       10a   const
  10.      d toStackCounter                10i 0 const
  11.      d errorCode                    256a   options(*varsize)
  12.  
  13.      d resendEscapeMsg...
  14.      d                 pr                  extPgm('QMHRSNEM')
  15.      d msgKey                         4a   const
  16.      d errorCode                    256a   options(*varsize)
  17.      d toCallStackEntry...
  18.      d                             4000a   const options(*varsize:*nopass)
  19.      d toCallStackEntryLen...
  20.      d                               10i 0 const options(*nopass)
  21.      d toCallStackEntryFmt...
  22.      d                                8a   const options(*nopass)
  23.      d fromCallStackEntryAddress...
  24.      d                                 *   const options(*nopass)
  25.      d fromCallStackCounter...
  26.      d                               10i 0 const options(*nopass)
  27.  
  28.      d errorNull       ds                  qualified
  29.      d bytesProv                     10i 0 inz(0)
  30.      d bytesAvail                    10i 0 inz(0)
  31.  
  32.      dformat_RSNM0100  ds                  qualified
  33.      d toCallStackCounter...
  34.      d                               10i 0 inz(2)
  35.      d toCallStackEntryQual...
  36.      d                               20a   inz('*NONE     *NONE     ')
  37.      d callStackEntryIdentifierLen...
  38.      d                               10i 0 inz(1)
  39.      d callStackEntryIdentifier...
  40.      d                               10a   inz('*')
  41.       /free
  42.  
  43.        //moveProgramMsg('':'*ESCAPE   *DIAG':2:'*PGMBDY':2:ErrorNull);
  44.        moveProgramMsg('':'*ESCAPE   *DIAG':2:'*':2:ErrorNull);
  45.  
  46.        resendEscapeMsg( ''
  47.                       : errorNull
  48.                       : format_RSNM0100
  49.                       : %len(format_RSNM0100)
  50.                       : 'RSNM0100'
  51.                       : *null
  52.                       : 1
  53.                       );
  54.  
  55.       /end-free
  56.      p                 e   
© 2004-2019 by midrange.com generated in 0.004s valid xhtml & css