          SUBROUTINE (VAL)
** Version# 2.0003[13] - 05/04/2017 - 04:01pm - TSMITH - eclipse
*** V2.0003 Change - Custom Coding . - 05/04/2017 - TSMITH - eclipse
** Copied from CBP DICT.AR.ITEM.CNT.GPS Version# 2.0002[15] - 05/04/2017 - 03:10pm - TSMITH - eclipse
*** V2.0002 Change - Custom Coding . - 05/04/2017 - TSMITH - eclipse
** Copied from BP DICT.AR.ITEM.CNT Version# 2 - 08/28/1997 - 01:35pm - STEELI - develop
          VAL  = ''

          OID  = FIELD(@ID,'.',1)
          INVN = FIELD(@ID,'.',2)+0

          MATREAD LED FROM LEDFILE,OID ELSE MAT LED = ''
          LOCATE INVN IN LED(8)<1> SETTING GEN ELSE RETURN

          LDIDS = LED(48)<1,GEN>
          LD.CT = DCOUNT(LDIDS,SVM)

          FOR J = 1 TO LD.CT
          LD.GET LDIDS<1,1,J>
          UM = LD(23)
          SQTY = (LD(5)<1,GEN>+LD(6)<1,GEN>)*-1

          IF OCONV(UM,'MCU')='FT' OR SQTY < 0 THEN GOTO SKIP.LD
          IF NUM(LD(1)) AND SUM(LD(5)<1,GEN>)+SUM(LD(6)<1,GEN>) THEN
             VAL += 1
             END

          SKIP.LD: NEXT J

          RETURN
!TSMITH~05/04/17~16:01
