Connect direct
• from WINDOWS to WINDOWS
This process copies a file from Windows to Windows then executes a run task on pnode to delete a file:
TEST1 PROCESS SNODE=Windows
STEP1 COPY FROM ( FILE=c:\temp\testwin.txt ) TO ( FILE=c:\temp\deleteme.txt DISP=RPL )
IF1 IF (STEP1 EQ 0) THEN
RUN1 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 PROCESS SNODE=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*/
EXISTS RUN 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)"
ELSE
FAIL 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 to Unix in binary mode:
TEST1 PROCESS SNODE=Unix
STEP1 COPY FROM ( FILE=c:\temp\testwin.bin sysopts="datatype(binary) " ) TO (