Submit a Process from UNIX to Run a Program on Microsoft Windows

This Process copies a binary file from a Microsoft Windows node to a UNIX node. If the copy is successful, a run task statement is performed on the Microsoft Windows node (snode) that will delete the source (from) file on the Microsoft Windows node. To delete the file, the keyword cmd is specified in the sysopts followed by the del command.

proc1  process      snode=CD.WIN
                    &file1="d:\data\out\reprts01.dat"
                    &file2="/data/in/reprts01.dat"
copy1  copy  from  (file=&file1
                    sysopts="datatype(binary)"
                    snode)
             to    (file=&file2
                    pnode)
       if (copy1 eq 0) then
run1   run task     snode
                    sysopts="cmd(del &file1)desktop(no)"
       eif
 pend

In the previous example, rather than coding the specific file names in the process, symbolic variables are used in both the copy and run task statements. Since no user input is required for the delete command, the desktop parameter is set to NO and no console window is created on the Microsoft Windows desktop.