 REM -- H2XMSA.BAT - 31.8 PGO/MSA INTFC - ..................... 2009NOV04VM
 REM                                               /2004NOV22PE/2008DEC02PE
@ECHO Off
 REM -- COPYRIGHT (C) 1997-2009 H.W.PETER, WUPPERTAL .DE --
 REM -- COPYRIGHT (C) 1997-2009 PETER+GEISENDORF GMBH, SPROCKHOEVEL .DE --
 REM -- \\UFN=OK, 2002OCT18PE

REM -- EPCSENSE=!

 REM 6789.123456789.123456789.123456789.123456789.123456789.123456789.12345
 REM ----------------------------------------------------------------------

 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 -- H2XMSA.BAT - OQX order queue transfer to MSA --

:OQX
rem -- %0=H2XMSA %1=OQX/FT *%2=homedisk *%3=homepath --
rem -- %4=OQ*.MSA file id --

:OQX2
rem -- create valid directory entry for data export --
IF     EXIST C:\PGEXPORT\*.*      GOTO OQX20
IF     EXIST C:\PGEXPORT\NUL:     GOTO OQX20
IF     EXIST C:\PGEXPORT\NUL      GOTO OQX20
MD           C:\PGEXPORT
:OQX20
CLS

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

:OQX42
IF     EXIST C:\PGEXPORT\ORDMSA.TXT  DEL C:\PGEXPORT\ORDMSA.TXT
REM                                   >  C:\PGEXPORT\ORDMSA.TXT
FOR %%A IN  (OQ*.MSA)     DO TYPE %%A >> C:\PGEXPORT\ORDMSA.TXT
DEL          OQ*.MSA
GOTO OQX46

:OQX46
DIR          C:\PGEXPORT\ORDMSA.TXT
ECHO -------------------------------------------------
ECHO %0 - ET-Order:
ECHO -- Die zu uebertragende Datei finden Sie
ECHO -- auf diesem Computer im Verzeichnis C:\PGEXPORT
ECHO -- unter dem Namen  ORDMSA.TXT (s.o.)
ECHO -- fuer den elektronischen Versand bereitgestellt
ECHO --                                      ...RETURN
ECHO -------------------------------------------------
PAUSE >NUL:

:OQXEND
GOTO ENDUP

REM 
REM -- H2XMSA.BAT - FINAL --

:ENDUP
SET PGOEPCPI=

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