Saturday, 6 January 2018

%ERROR Example

      * 
      * Description :·%Error() Example
      *
      * Syntex      :
      *
      * %Error()
      *
      * Output      :·1 - if most recent opcode specified with
      *                   operation extender 'E' ends in error
      *               0 - otherwise
      *=====================================================
      *
     FFile2     UF A E           K Disk

     D Arr1            S              1A   Dim(2)
     D Index           S              1P 0
     D Var1            S              2P 0
     D Error           S              1A

     C                   Delete(E) Rcd1

     C                   If        %Error
     C                   Eval      Error = %Error
     C     Error         Dsply                                                  // 1
     C                   EndIf
     C
     C                   SetOn                                        LR

No comments:

Post a Comment