          SUBROUTINE (OID,GEN,LDID,LBL.NO,TOL.QTY,UDATA)
** Version# 11.001[70] - 08/29/2014 - 08:55am - TSMITH - eclipse
*** V11.001 Change - Custom Coding CUSTOM - 08/29/2014 - TSMITH - eclipse
** Copied from CBP BATCH.BUILD.PLUMB Version# 11.0009[12] - 07/31/2014 - 11:54am - TSMITH - eclipse
*** V11.0009 Change - Custom Coding . - 07/31/2014 - TSMITH - eclipse
*** V11.0008 Change - Custom Coding 1-3 - 02/18/2014 - TSMITH - eclipse
*** V11.0007 Change - Custom Coding . - 10/29/2013 - TSMITH - eclipse
** Copied from CBP BATCH.BUILD.MECH Version# 11.0006[1] - 09/18/2013 - 11:26am - TSMITH - eclipse
** Copied from CBP LABEL.BAT.PDF.COPY Version# 11.0005[94] - 09/11/2013 - 10:39pm - TSMITH - eclipse
*** V11.0005 Change - Custom Coding . - 09/11/2013 - TSMITH - eclipse
*** V11.0004 Change - Custom Coding . - 07/16/2013 - TSMITH - eclipse
** BatchBuild Version# 1.0 - TSMITH
** This software is used to build a submittal for the user by assmebling all
** of the spec sheets attached to each product on the order and merging them
** using PDFTK.
*-------------------------------------------------------------------------*
*** 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

          PROG.CHECK=TRANS('LEDGER.GPS',OID,8,'X')
          BR    = LED(2)<1,GEN,1>
          BT.CN = LED(1)<1,GEN,1>
          ST.CN = LED(5)<1,GEN,1>
          NO.PAGES = TRANS('LEDGER.GPS',OID,3,'X')
          GET.CUS BR,BT.CN,ST.CN,QSIGN
          CITY.ST = OCONV(LED(78)<1,GEN,4>,'MCT'):', ':LED(78)<1,GEN,5>
          CUST = TRANS('ENTITY',BT.CN,1,'X')<1,1,1>
          AMPER = COUNT(CUST,'&')
          IF AMPER>0 THEN
          CUST = FIELD(TRANS('ENTITY',BT.CN,1,'X')<1,1,1>,'&',1):'^&':FIELD(TRANS('ENTITY',BT.CN,1,'X')<1,1,1>,'&',2)
          END
          CONVERT "*" TO " " IN CUST




          *CONVERT "&" TO "AND" IN CUST
          ORD.DATE = OCONV(OCONV(LED(4)<1,GEN,1>,'DMA'),'MCT'):' ':FIELD(OCONV(LED(4)<1,GEN,1>,'D4/'),'/',2):', ':OCONV(LED(4)<1,GEN,1>,'DY')


          TB = CHAR(9)
          DESCTB = CHAR(10)
          DATA = ''
          JOB = OCONV(LED(13)<1,GEN,1>,'MCT')
          IF JOB = '' THEN
          JOB = OCONV(TRANS('ENTITY',ST.CN,1,'X')<1,1,1>,'MCT')
          END

          CONVERT "/" TO "-" IN JOB

          JOB = TRIM(JOB,' ','E')

          HEADER = 'cat_header.pdf'

          DIVIDER = 'cat_divider.pdf'


          IF PROG.CHECK # '1' THEN
          DATA<-1> = '@ECHO off'
          END
          DATA<-1> = 'color 72'
          DATA<-1> = 'mkdir c:\pdf >nul 2>&1'
          DATA<-1> = 'mkdir c:\pdf\':'"':JOB:'" >nul 2>&1'
          DATA<-1> = 'cd c:\pdf\':'"':JOB:'" >nul 2>&1'
          DATA<-1> = 'net use x: \\172.22.124.12\products >nul 2>&1'
          DATA<-1> = 'copy x:\bb.jpg c:\pdf\':'"':JOB:'" >nul 2>&1'
          DATA<-1> = 'copy x:\form.pdf c:\pdf\':'"':JOB:'" >nul 2>&1'
*-------------------------------------------------------------------------*
          *** Generate HTML Page for viewing while Customer Catalog works
       *   DATA<-1> = 'echo ^<html^>^<head^>^<title^>Customer Catalog Builder^</title^>^</head^> > index.htm'
       *   DATA<-1> = 'echo ^<body^>^<center^>^<img src="bb.jpg" border="0"^>^<br>^<br^> >> index.htm'
       *   DATA<-1> = 'echo ^<font face="Tahoma" color="#000000" size="2"^>Your Customer Catalog is being put together by BatchBuild. >> index.htm'
       *   DATA<-1> = 'echo When finished it will open automatically.^<br^>The PDF it generates will be >> index.htm'
       *   DATA<-1> = 'echo available in the "c:\pdf\':JOB:'\" folder or by clicking the link below.^<br^>^<br^> >> index.htm'
       *   DATA<-1> = 'echo ^<a href="file:///c:\pdf\':JOB:'"^>':JOB:'^</a^>^<br^>^<br^>^<br^>^</font^> >> index.htm'
       *   DATA<-1> = 'echo ^<audio controls autoplay^>^<source src="http://172.22.124.11/man_and_a_woman.mp3" type="audio/mpeg"^>^<source src="http://172.22.124.11/man_and_a_woman.ogg" type="audio/ogg"^> >> index.htm'
       *   DATA<-1> = 'echo ^<embed height="50" width="100" src="http://172.22.124.11/man_and_a_woman.mp3"^>^</audio^> >> index.htm'
       *   DATA<-1> = 'echo ^</body^>^</html^> >> index.htm'
       *   DATA<-1> = 'start index.htm'
*-------------------------------------------------------------------------*


          DATA<-1> = 'ECHO Your customer catalog is being generated. Please wait...'
          DATA<-1> = 'ECHO When finished your customer catalog will open automatically. The submittal will be'
          DATA<-1> = 'ECHO available in the c:\pdf\':JOB:'\ folder.'
          DATA<-1> = 'copy x:\libiconv2.dll c:\pdf >nul 2>&1'
          DATA<-1> = 'copy x:\pdftk.exe c:\pdf >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'copy x:\':HEADER:' c:\pdf\':'"':JOB:'" >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'copy x:\batesmaster.exe c:\pdf >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'copy x:\cat_toc.pdf c:\pdf\':'"':JOB:'"\cat_toc.pdf >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'copy x:\cat_divider.pdf c:\pdf\':'"':JOB:'"\cat_divider.pdf >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'cd c:\pdf\':'"':JOB:'" >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'echo ^<?xml version="1.0" encoding="UTF-8"?^>^<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"^>^<f href="cat_toc.pdf"/^>^<fields^> > index.xfdf'




*-------------------------------------------------------------------------*
          *** Submittal.xfdf
          DATA<-1> = 'echo ^<?xml version="1.0" encoding="UTF-8"?^>^<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"^>^<f href="':HEADER:'"/^> > submittal.xfdf'
          DATA<-1> = 'echo ^<fields^> >> submittal.xfdf'
          DATA<-1> = 'echo ^<field name="<job name>"^>^<value^>':JOB:'^</value^>^</field^> >> submittal.xfdf'
          DATA<-1> = 'echo ^<field name="<location>"^>^<value^>':CITY.ST:'^</value^>^</field^> >> submittal.xfdf'
          DATA<-1> = 'echo ^<field name="<plumbing contractor>"^>^<value^>':OCONV(CUST,'MCT'):'^</value^>^</field^> >> submittal.xfdf'
          DATA<-1> = 'echo ^<field name="<ord date>"^>^<value^>':ORD.DATE:'^</value^>^</field^> >> submittal.xfdf'
          DATA<-1> = 'echo ^</fields^> >> submittal.xfdf'
          DATA<-1> = 'echo ^<ids original="C8F9D11373F34543A0AE407C553380A6" modified="15A8D3F781E9E24F99EFEA724A3A4659"/^> >> submittal.xfdf'
          DATA<-1> = 'echo ^</xfdf^> >> submittal.xfdf'


          DATA<-1> = 'cd ..\'

          MATBUILD SV.LD FROM LD

*-------------------------------------------------------------------------*
          *** Comment Code
          OE.GET.LDID.COMM OID,GEN,,PRD.LIST
          SEC.HEADER = PRD.LIST


*-------------------------------------------------------------------------*

          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)
          CUS.PN   =  LD(3)
          SECTION  =  RAISE(RAISE(LD(3)<1,1,1>))
          SECTION2 =  RAISE(RAISE(LD(3)<1,1,2>))
          SECTION3 =  RAISE(RAISE(LD(3)<1,1,3>))
          *IF SECTION3[1,1]#'.' THEN
          *SECTION  = SECTION
          *SECTION := ' ':SECTION2
          *SECTION := ' ':SECTION3
          *END

          IF SECTION2[1,1]#'.' THEN
          SECTION  = SECTION
          SECTION := ' ':SECTION2
          END



          CONVERT "/" TO "-" IN SECTION
          CONVERT ":" TO "-" IN SECTION
          CONVERT "&" TO "_" IN SECTION

          IF TRANS('PRODUCT',PN,66,'X') THEN
          DESC    = TRANS('PRODUCT',PN,66,'X')
          END ELSE
          DESC    = TRANS('PRODUCT',PN,1,'X')<1,1,1>
          END
          CONVERT "/" TO "-" IN DESC
          CONVERT '"' TO 'IN' IN DESC
          CONVERT '.' to "_" IN DESC
          CONVERT "&" TO "_" IN DESC




          IF NUM(PN) THEN
          IF SUM(LD(5)<1,GEN>)+SUM(LD(6)<1,GEN>) = 0 THEN GOTO SKIP.LD
          END ELSE
          END


          SPEC.LIST=''
          UT.OPEN.FILE 'IMG.XREF',IMGFILE
          ROOT = 'P~':PN
          IMAGE.FLAG = NO
          BSCAN REC.ID,REC.VAL FROM IMGFILE,ROOT USING '&INDEX&.XREFS' ELSE NULL
          IF REC.ID = ROOT OR PN ='S' OR PN = 'C' THEN
          IMAGE.FLAG = YES
          END
          IF IMAGE.FLAG = NO THEN GOTO SKIP.LD
          REC.VAL = REC.VAL<1,1>
          PATH = TRANS('IMG.ARCHIVES',TRANS('IMG.XREF',REC.VAL,7,'X'),2,'X')<1,1,1>;
          TYPE = 'pdf'
          POSITION=LDID.CTR


          IF POSITION < 10 THEN
          POSITION = "00":POSITION
          END ELSE
          IF POSITION > 9 AND POSITION < 100 THEN
          POSITION = "0":POSITION
          END ELSE
          POSITION = POSITION
          END
          END





          FULL.PATH = 'X:\':(PATH:'/':REC.VAL:'.':TYPE)
          CHARACTERS = COUNT(FULL.PATH,'')-17
          FULL.PATH = 'X:\':(PATH:'/':REC.VAL:'.':TYPE)[17,CHARACTERS]
          CONVERT "/" TO "\" IN FULL.PATH

          IF PN = 'C' THEN
          COMMENT  = RAISE(LD(3)<1,GEN,2>)
          DATA<-1> = 'copy X:\':DIVIDER:' c:\pdf\':'"':JOB:'"\':POSITION:'_':DIVIDER:' >nul 2>&1'
          DATA<-1> = 'ren c:\pdf\':'"':JOB:'"\':POSITION:'_':DIVIDER:' "':POSITION:'_':FIELD(DIVIDER,'.',1):'_XXX.pdf" >nul 2>&1'
          END ELSE
          DATA<-1> = 'copy ':FULL.PATH:' c:\pdf\':'"':JOB:'" >nul 2>&1'
          DATA<-1> = 'ren c:\pdf\':'"':JOB:'"\':REC.VAL:'.':TYPE:' "':POSITION:'_':DESC:'_XXX.':TYPE:'" >nul 2>&1'
          DATA<-1> = 'cd c:\pdf\':'"':JOB:'" >nul 2>&1'
          DATA<-1> = 'echo ^<?xml version="1.0" encoding="UTF-8"?^>^<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"^>^<f href="form.pdf"/^>^<fields^> > "':PN:'".xfdf'
          DATA<-1> = 'echo ^<field name="cust_pn"^>^<value^>':CUS.PN:'^</value^>^</field^> >> "':PN:'".xfdf'
          DATA<-1> = 'echo ^</fields^> >> "':PN:'".xfdf'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'echo ^<ids original="874AC8ECA3AF2B488DBCFE7F5078A474" modified="32614416FEE07D4C980BCB5D7E0352FF"/^> >> "':PN:'".xfdf'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'echo ^</xfdf^> >> "':PN:'".xfdf'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'c:\pdf\pdftk form.pdf fill_form ':PN:'.xfdf output ':PN:'.pdf'
          DATA<-1> = 'del ':PN:'.xfdf'
          DATA<-1> = 'c:\pdf\pdftk ':PN:'.pdf output ':PN:'_flat.pdf flatten >nul 2>&1'
          DATA<-1> = 'del ':PN:'.pdf >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'c:\pdf\pdftk "':POSITION:'_':DESC:'_XXX".':TYPE:' multistamp ':PN:'_flat.pdf output "':POSITION:'_':DESC:'_ZZZ".':TYPE:' >nul 2>&1'
          DATA<-1> = 'del *_XXX.pdf *_flat.pdf ':PN:'.xfdf ':PN:'.pdf >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK



          END

          SECTION = TRIM(SECTION)
          DATA<-1>  = 'cd c:\pdf\':'"':JOB:'"'
          IF PN = 'C' THEN
          DATA<-1> = 'echo ^<?xml version="1.0" encoding="UTF-8"?^>^<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"^>^<f href="':POSITION:'_':'cat_divider.pdf"/^>^<fields^> > "':SECTION:'".xfdf'
          DATA<-1> = 'echo ^<field name="Section"^>^<value^>':SECTION:'^</value^>^</field^> >> "':SECTION:'".xfdf'
          DATA<-1> = 'echo ^</fields^> >> "':SECTION:'".xfdf'
          DATA<-1> = 'echo ^<ids original="CF587911C7450E00A02C8BB710D46272" modified="47054116BB59244F8E45155E8C6FF837"/^> >> "':SECTION:'".xfdf'
          DATA<-1> = 'echo ^</xfdf^> >> "':SECTION:'".xfdf'
          DATA<-1> = 'c:\pdf\pdftk ':POSITION:'_':FIELD(DIVIDER,'.',1):'_XXX.pdf fill_form ':'"':SECTION:'"':'.xfdf output ':POSITION:'_cat_divider.pdf'
          DATA<-1> = 'del ':POSITION:'_':FIELD(DIVIDER,'.',1):'_XXX.pdf'

          END

SKIP.LD:  NEXT LDID

          MATPARSE LD FROM SV.LD
          *DATA<-1>  = 'cd c:\pdf\':'"':JOB:'"'


          DATA<-1> = 'echo ^<field name="Section"^>^<field name="0"^>^<value^>':FIELD(SEC.HEADER,"~",1):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="1"^>^<value^>':FIELD(SEC.HEADER,"~",2):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="2"^>^<value^>':FIELD(SEC.HEADER,"~",3):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="3"^>^<value^>':FIELD(SEC.HEADER,"~",4):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="4"^>^<value^>':FIELD(SEC.HEADER,"~",5):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="5"^>^<value^>':FIELD(SEC.HEADER,"~",6):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="6"^>^<value^>':FIELD(SEC.HEADER,"~",7):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="7"^>^<value^>':FIELD(SEC.HEADER,"~",8):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="8"^>^<value^>':FIELD(SEC.HEADER,"~",9):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="9"^>^<value^>':FIELD(SEC.HEADER,"~",10):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="10"^>^<value^>':FIELD(SEC.HEADER,"~",11):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="11"^>^<value^>':FIELD(SEC.HEADER,"~",12):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="12"^>^<value^>':FIELD(SEC.HEADER,"~",13):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="13"^>^<value^>':FIELD(SEC.HEADER,"~",14):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="14"^>^<value^>':FIELD(SEC.HEADER,"~",15):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="15"^>^<value^>':FIELD(SEC.HEADER,"~",16):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="16"^>^<value^>':FIELD(SEC.HEADER,"~",17):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="17"^>^<value^>':FIELD(SEC.HEADER,"~",18):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="18"^>^<value^>':FIELD(SEC.HEADER,"~",19):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^<field name="19"^>^<value^>':FIELD(SEC.HEADER,"~",20):'^</value^>^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^</field^> >> index.xfdf'
          DATA<-1> = 'echo ^</fields^> >> index.xfdf'
          DATA<-1> = 'echo ^<ids original="0600CF25A82DC9348DF89F5BBDEA4236" modified="C81A900B7C296640A85E76DD78672390"/^> >> index.xfdf'
          DATA<-1> = 'echo ^</xfdf^> >> index.xfdf'
          DATA<-1> = 'c:\pdf\pdftk cat_toc.pdf fill_form index.xfdf output 000a_toc.pdf'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'c:\pdf\pdftk ':HEADER:' fill_form submittal.xfdf output 000_header_XXX.pdf'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'del ':HEADER
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'ren 000_header_XXX.pdf 000_header_XXX.old'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'ren 000a_toc.pdf 000a_toc.old'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'del cat_divider.pdf toc.pdf form.pdf'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'c:\pdf\pdftk.exe *.pdf cat output "':OCONV(CUST,'MCT'):'_':JOB:'_incomplete.pdf" >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'del *ZZZ.pdf'



          IF NO.PAGES = '1' THEN
          GOSUB PAGE.NO
          END ELSE
          DATA<-1> = 'c:\pdf\batesmaster --inpdf "':OCONV(CUST,'MCT'):'_':JOB:'_incomplete.pdf" --pdfout "':OCONV(CUST,'MCT'):'_':JOB:'_final.pdf" --format="%%d" --origin 4 -xoffset=-30 -yoffset=-775 --seed=3 >nul 2>&1'
          END
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK

          DATA<-1> = 'ren 000_header_XXX.old 000_header_XXX.pdf'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'ren 000a_toc.old 000a_toc.pdf'

          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'c:\pdf\pdftk.exe 000_header_XXX.pdf 000a_toc.pdf "':OCONV(CUST,'MCT'):'_':JOB:'_final.pdf" cat output "':OCONV(CUST,'MCT'):'_':JOB:'_final2.pdf"'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'del submittal.xfdf >nul 2>&1'
          FILENAME = OCONV(CUST,'MCT'):'_':JOB:'.pdf'
          CONVERT " " TO "_" IN FILENAME
          CONVERT "^" TO "" IN FILENAME
          CONVERT "&" TO "" IN FILENAME
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'c:\pdf\pdftk "':OCONV(CUST,'MCT'):'_':JOB:'_final2.pdf" output "':FILENAME:'" flatten >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'del *_incomplete.pdf *final.pdf *final2.pdf *toc.pdf 002_smart_solar.pdf toc.pdf *.xfdf *divider*.pdf >nul 2>&1'
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'del 000_header_XXX.pdf bb.jpg index.htm >nul 2>&1'
          DATA<-1> = 'start ':FILENAME
          IF PROG.CHECK = '1' THEN GOSUB PRG.CHK
          DATA<-1> = 'exit'


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

          PRINT DATA<J>
          NEXT J

FINISH:   RETURN
*-------------------------------------------------------------------------*
PAGE.NO:  DATA<-1> = 'ren "':OCONV(CUST,'MCT'):'_':JOB:'_incomplete.pdf" "':OCONV(CUST,'MCT'):'_':JOB:'_final.pdf" >nul 2>&1'

          RETURN
*-------------------------------------------------------------------------*
PRG.CHK:  DATA<-1> = 'pause'

          RETURN
*-------------------------------------------------------------------------*
!TSMITH~08/29/14~08:55
