REM -- H2XZMA.BAT - 31.2 PGO/JJM(EPC/OQX) INTFC - 2000OCT16PE/2008SEP17VM
@ECHO Off
REM -- COPYRIGHT (C) 2000-2002 H.W.PETER, WUPPERTAL .DE --
REM -- COPYRIGHT (C) 2000-2002 PETER+GEISENDORF GMBH, SPROCKHOEVEL .DE --
REM -- \\UFN=OK, 2002OCT18PE

REM -- EPCSENSE=*=C:\PGIMPORT\MIKEKORB.TXT
REM -- EPCSENSE=*=C:\PROGRA~1\Matthies\Mike\MIKEKORB.TXT
REM -- EPCSENSE=*=C:\PROGRA~2\Matthies\Mike\MIKEKORB.TXT
REM -- EPCSENSE=*=C:\PROGRA~3\Matthies\Mike\MIKEKORB.TXT
REM -- EPCSENSE=!
REM -- note: C:\"Programme"\.. not accepted in W2K.IFEXIST

IF "%1"=="OQX" GOTO OQX
IF "%1"=="FT"  GOTO OQX

ECHO ----------------------------------------------------------
ECHO %0:
ECHO INVALID CONTEXT CALL
ECHO UNGUELTIGER AUFRUF
ECHO ----------------------------------------------------------
ECHO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
PAUSE
GOTO ENDUP

REM 
REM -- H2XZMA.BAT - OQX order queue transfer to JJM server --

:OQX
rem -- %0=H2XZMA %1=OQX/FT *%2=homedisk *%3=homepath %4=OQ*.ZMA --

:OQX1
rem -- neues FMT - 2008AUG28VM --
SET PGOEPCDJ=C:\Programme\Matthies\JMO\Import
IF     EXIST %PGOEPCDJ%\*.* GOTO OQX4

:OQX2
rem -- create valid directory for data export --
SET PGOEPCDJ=C:\Programme\JMO\Import
IF     EXIST C:\Programme\*.* GOTO OQX20
MD           C:\Programme
:OQX20
IF     EXIST C:\Programme\JMO\*.* GOTO OQX22
MD           C:\Programme\JMO
:OQX22
IF     EXIST C:\Programme\JMO\Import\*.* GOTO OQX24
MD           C:\Programme\JMO\Import
:OQX24
CLS

rem -- post file(s) to transfer --
:OQX4
IF     EXIST OQ*.ZMA  GOTO OQX42
ECHO -------------------------------------------------
ECHO -- HINWEIS: 
ECHO -- Es stehen keine NEUEN Order-Bestaende zur
ECHO -- Uebertragung zur Verfuegung.
ECHO --
GOTO OQX46

:OQX42
IF     EXIST %PGOEPCDJ%\Henry.A02    DEL %PGOEPCDJ%\Henry.A02
FOR %%A IN  (OQ*.ZMA)                DO COPY /B %%A %PGOEPCDJ%\Henry.A02   >NUL:
IF     EXIST OQ*.ZMA                 DEL OQ*.ZMA
GOTO OQX46

:OQX46
DIR          %PGOEPCDJ%\Henry.A02
ECHO ----------------------------------------------------
ECHO %0 - ET-Order:
ECHO --
ECHO -- Die zu uebertragende Datei finden Sie
ECHO -- auf diesem Computer
ECHO -- im Verzeichnis   %PGOEPCDJ%
ECHO -- unter dem Namen       Henry.A02 
ECHO -- fuer den elektronischen Versand bereitgestellt
ECHO --                                      ...RETURN
ECHO ----------------------------------------------------
PAUSE >NUL:

REM -- try to call JM ONLINE link procedure --
rem -- W95/98:   C:\WINDOWS\DESKTOP
rem -- W2K/XP:   %ALLUSERSPROFILE%\DESKTOP  oder
rem --           %USERPROFILE%\DESKTOP

IF     EXIST C:\WINDOWS\DESKTOP\JMONLINE.LNK GOTO OQX60
GOTO OQX68
:OQX60
rem -- C:
rem -- CD \
START        C:\WINDOWS\DESKTOP\JMONLINE.LNK
GOTO OQX68
:OQX68
rem -- CD \
GOTO OQXEND

:OQXEND
GOTO ENDUP

REM 
REM -- H2XZMA.BAT - FINAL --

:ENDUP
SET PGOEPCPI=
SET PGOEPCDJ=

REM -- now return to PGO home drive and resume PGO mainline --
rem -- %2
rem -- CD \
rem -- CD %3
SET  PGOEPCPI=PGOBEG
IF "%PGONETID%"=="W95" SET PGOEPCPI=START /R /MAX PGOFFICE.PIF
IF "%PGOEPCEX%"=="END" SET PGOEPCPI=
%PGOEPCPI%
EXIT

