Connect direct

Disponível somente no TrabalhosFeitos
  • Páginas : 4 (759 palavras )
  • Download(s) : 0
  • Publicado : 30 de agosto de 2012
Ler documento completo
Amostra do texto
CONNECT:DIRECT WINDOWS EXAMPLES





• from WINDOWS to WINDOWS



 This process copies a file from Windows to Windows then executes a run task on pnode to delete a file:



TEST1PROCESS
SNODE=Windows

STEP1 COPY
FROM (
FILE=c:\temp\testwin.txt
)
TO (
FILE=c:\temp\deleteme.txt
DISP=RPL
)

IF1 IF (STEP1 EQ 0) THENRUN1 RUN TASK PNODE (PGM=WindowsNT/95)
SYSOPTS="cmd(del c:\temp\testwin.txt)"

EIF

PEND



 This process executes a run task on Windows to copy a file:TEST2 PROCESS
SNODE=Windows

RUN1 RUN TASK PNODE (PGM=WindowsNT/95)
SYSOPTS="cmd(copy c:\temp\testwin.txt c:\temp\testout.txt)"

PEND


This process executes a run task on Windows to submit a .bat file passing some parameters:

TEST3 PROCESS
SNODE=Windows

RUN1 RUN TASK SNODE (PGM=WindowsNT/95)
SYSOPTS="pgm(c:\temp\testwin.bat)args(parameters)
desktop(yes)"

PEND


 This process checks for the existence of a file, Modal logic can then be used to execute additional steps:


TEST4 PROCESSSNODE=Windows
&FILE="c:\temp\testwin.txt"

/*NOTE:
if &FILE does not exist, the following
RUN TASK will fail with CC=1,
because "error" is an undefined label*/

EXISTSRUN TASK PNODE (PGM=WindowsNT)
SYSOPTS="cmd(if not exist &FILE goto error)"

IF (EXISTS EQ 0) THEN

OK RUN TASK PNODE (PGM=WindowsNT)
SYSOPTS="pgm(c:\winnt\notepad.exe) desktop(yes)"

ELSEFAIL RUN TASK PNODE (PGM=WindowsNT)
SYSOPTS="pgm(c:\winnt\notepad.exe) desktop(yes)"

EIF

PEND







• from WINDOWS to UNIX



 This process copies a file from Windows toUnix in binary mode:


TEST1 PROCESS
SNODE=Unix

STEP1 COPY
FROM (
FILE=c:\temp\testwin.bin
sysopts="datatype(binary) "
)
TO (...
tracking img