          SUBROUTINE (OID,GEN,LDID,LBL.NO,TOL.QTY,UDATA)
** Version# 11.0004[50] - 06/20/2013 - 12:56pm - TSMITH - eclipse
*** V11.0004 Change - Custom Coding . - 06/20/2013 - TSMITH - eclipse
** Copied from CBP LABEL.MSEXCEL.CUST.COPY Version# 11.0003[71] - 04/11/2013 - 12:05pm - TSMITH - eclipse
*** V11.0003 Change - Custom Coding 19 - 04/11/2013 - TSMITH - eclipse
** Copied from CBP LABEL.MSEXCEL.EXPORT Version# 11.0002[2] - 04/03/2013 - 12:05pm - TSMITH - eclipse
*** V11.0002 Change - Custom Coding . - 04/03/2013 - TSMITH - eclipse
*** V11.0001 Change - Custom Coding . - 02/13/2013 - TSMITH - eclipse

*** Subroutine - LABEL.MSEXCEL.EXPORT
*-------------------------------------------------------------------------*
*** This routine creates an excel spreadsheet from the current generation
*** of an order
*-------------------------------------------------------------------------*
*** OID      - Order ID                                            [IN]
*** GEN      - Generation                                          [IN]
*** LDID     - Not Used
*** LBL.NO   - Not Used
*** TOL.QTY  - Total quantity shipped of last item (not useful)    (OUT)
*** UDATA    - Not Used
*-------------------------------------------------------------------------*
*** LED, LD, and PRD are self-contained in this routine. They do not need
*** to be current
*-------------------------------------------------------------------------*
          MODE = OID[1,1]
          IF MODE # 'S' THEN RETURN
          MATREAD LED FROM LEDFILE,OID ELSE MAT LED = ''
          OE.GET.QSIGN QSIGN,OID,GEN
          BR    = LED(2)<1,GEN,1>
          BT.CN = LED(1)<1,GEN,1>
          ST.CN = LED(5)<1,GEN,1>
          GET.CUS BR,BT.CN,ST.CN,QSIGN

          TB = CHAR(9)
          DESCTB = CHAR(10)
          DATA = ''
          PN      = LD(1)
          CMD = 'SELECT IMG.XREF WITH &INDEX&.XREFS = "':PN:'"'
          EXECUTE CMD CAPTURING MSG
          IMG.ID = MSG

          DATA<-1> = 'mkdir c:\pdf'
          PATH = TRANS('IMG.ARCHIVES',TRANS('IMG.XREF',IMG.ID,7,'X'),2,'X')<1,1,1>;
          TYPE = OCONV(TRANS('IMG.XREF',IMG.ID,2,'X'),'MCL');
          FULL.PATH = 'X:\':(PATH:'/':IMG.ID:'.':TYPE)[17,30]
          CONVERT "/" TO "\" IN FULL.PATH
          *CONVERT '\\172.22.124.12\' TO 'X:\' IN FULL.PATH
          COMMAND = 'copy ':FULL.PATH:' c:\pdf'


          MATBUILD SV.LD FROM LD

          OE.GET.LDID.LIST LDID.LIST,OID,GEN
          LDID.CT = DCOUNT(LDID.LIST,VM)
          FOR LDID.CTR = 1 TO LDID.CT
             LDID = LDID.LIST<1,LDID.CTR>
             LD.GET LDID

             GET.ALL.PRD BR,LD(1),QSIGN,GROUP
             PN      = LD(1)

  TDATA  = COMMAND

          DATA<-1> = TDATA

SKIP.LD:  NEXT LDID

          MATPARSE LD FROM SV.LD

          DCT = DCOUNT(DATA,AM)
          FOR J = 1 TO DCT

          PRINT DATA<J>
          NEXT J

   ***    DDE.MSEXCEL.EXPORT DATA

FINISH:   RETURN
*-------------------------------------------------------------------------*
!TSMITH~06/20/13~12:56
