Copy a File from a UNIX Node to a z/OS Node

In this example, the Process copies a binary file from a local UNIX node to a z/OS node:

copyseq  process      snode=dallas
/* When copying, make sure the datatype is set to binary. */
step01   copy  from  (file=a.out
                      pnode
                      sysopts=":datatype=binary:")
                      ckpt=64k
                      compress extended= (CMP=1
                                          WIN=9
                                          MEM=1)
               to    (file=TESTAOUT
                      snode
                      disp=(rpl))
/*  If step01 succeeds, CD will copy the same file back to UNIX.  */
step02   if  (step01 > 4 ) then
              exit
         eif
/*  Before copying the file back, delete it first.  */
step03   run task
                      pnode
                      sysopts="rm -f a.out"
step04   if  (step03 > 4 ) then
              exit
         eif
/*  Copy the file from OS390 to UNIX.  */
/*  When copying, make sure the datatype is set to binary.  */
step05   copy  from  (file=TESTAOUT
                      snode)
                      ckpt=64k
               to    (file=a.out
                      pnode
                      disp=(rpl)
                      sysopts=":datatype=binary:")
	pend