     H*** DFTACTGRP(*NO) ACTGRP('SOAP')
     H DFTACTGRP(*NO) ACTGRP('SOAP') PGMINFO(*PCML:*MODULE)
     H BNDDIR('QC2LE')

      *  To see the PCML, remove the PGMINFO above
      *   and do this:
      *   CRTSQLRPGI GETCUST SRCFILE(SKWEBSRV/QRPGLESRC) DBGVIEW(*SOURCE) -
      *              COMPILEOPT('PGMINFO(*PCML) INFOSTMF(''getcust.pcml'')')

     FCUSTFILE  IF   E           K DISK    PREFIX('CUST.') USROPN
     D CUST          E DS                  qualified
     D                                     extname(CUSTFILE)

     D GETCUST         PR                  ExtPgm('GETCUST')
     D   CustNo                            like(Cust.Custno)
     D   Name                              like(Cust.Name)
     D   Street                            like(Cust.Street)
     D   City                              like(Cust.City)
     D   State                             like(Cust.State)
     D   Postal                            like(Cust.Postal)
     D GETCUST         PI
     D   CustNo                            like(Cust.Custno)
     D   Name                              like(Cust.Name)
     D   Street                            like(Cust.Street)
     D   City                              like(Cust.City)
     D   State                             like(Cust.State)
     D   Postal                            like(Cust.Postal)

     D QMHSNDPM        PR                  ExtPgm('QMHSNDPM')
     D   MessageID                    7A   Const
     D   QualMsgF                    20A   Const
     D   MsgData                  32767A   Const options(*varsize)
     D   MsgDtaLen                   10I 0 Const
     D   MsgType                     10A   Const
     D   CallStkEnt                  10A   Const
     D   CallStkCnt                  10I 0 Const
     D   MessageKey                   4A
     D   ErrorCode                 8192A   options(*varsize)

     D system          PR            10I 0 ExtProc('system')
     D   command                       *   value options(*string)

     D err             ds                  qualified
     D   bytesProv                   10i 0 inz(0)
     D   bytesAvail                  10i 0 inz(0)

     D MsgDta          s           1000a   varying
     d MsgKey          s              4a

     D x               s             10i 0
      /free
         if not %open(CUSTFILE);
            monitor;
              open CUSTFILE;
            on-error;
              system('DSPJOBLOG OUTPUT(*PRINT)');
            endmon;
         endif;

         chain CustNo CUSTFILE;
         if not %found;
            msgdta = 'Customer not found.';
            QMHSNDPM( 'CPF9897'
                    : 'QCPFMSG   *LIBL'
                    : msgdta
                    : %len(msgdta)
                    : '*ESCAPE'
                    : '*PGMBDY'
                    : 1
                    : MsgKey
                    : err );
         else;
            Custno = Cust.Custno;
            Name   = Cust.name;
            Street = Cust.Street;
            City   = Cust.City;
            State  = Cust.State;
            Postal = Cust.Postal;
         endif;
         *inlr = *on;
      /end-free
