You are on page 1of 3

#!/usr/bin/ksh CD_DATA=/path_to_file_to _be_transferred snode=NDM.

samplesite /path/to/cdunix/ndm/bin/ndmcli -x << EOJ SUBMIT SENDDATA PROCESS snode=$snode STEP1 COPY FROM ( pnode DSN=$CD_DATA ) ckpt=0k compress xlate=yes TO ( snode DSN=File.test.1 ) pend; EOJ; ////////////////// ndmcli -e 4 -r > $6 2>&1 << EOJ submit maxdelay=$MAX_DELAY $PNAME process snode=$1 $SNODEID step1 copy from ( file=$4 $FROM_NODE ) to ( file=$5 $TO_NODE disp=rpl ) pend; EOJ ///////////////////////////////////// emote_host=remote_node_name source_file=/opt/test/testfile.dat dest_file=newfile.dat ndmcli -x <<-EOJ submit maxdelay=unlimited procname123 process pacct="C:D test" snode=$remote_host step01 copy from (file = $source_file) compress = extended to (file = $dest_file snode disp = new) pend; EOJ ///////////////////////////////////// Lproc=MyProcess DestinationNode=CD.NODE email@removed /soft/cdunix/ndm/bin/ndmclitest -x

pnode) to (dsn disp=rpl ) step2 if (step1 > 4) then exit eif pend ; EOJ ///////////////////////////////////// submitSend.sh -------------------CLI_BASE=/sysp/cdunix NDMAPICFG=$CLI_BASE/ndm/cfg/cliapi/ndmapi.cfg export NDMAPICFG if [[ -z $1 ]] then echo Please specify the Process file name echo Syntax: test3.sh [Process file] return 0 fi $CLI_BASE/ndm/bin/direct << EOJ submit file=test3.sh; EOJ test3.sh ---------#!/usr/bin/ksh CSHN01 process snode=CD.AS400.TST snodeid=(username,pwd) copystep copy from (file=/source/folder/sftptest.txt pnode to (file=/destination/folder sysopts="TYPE(MBR)" disp=(rpl) snode) if (copystep==0) then taskstep run task pnode sysopts="echo file send to remote host" else run task pnode sysopts="echo file cannot send to remote host" eif pend /////////////////////////////////////////////////////////////////////////// /*BEGIN_REQUESTER_COMMENTS $PNODE$="W01SMGUACD1" $PNODE_OS$="Windows" $SNODE$="NDMB2" $SNODE_OS$="OS/390" $OPTIONS$="WDOS" END_REQUESTER_COMMENTS*/ SendRecv PROCESS SNODE=NDMB2 COPY FROM ( FILE="D:\test\bank notes test file.txt" ) TO ( FILE=NGST.NGST.INTF.B4GL.TTS

DISP=NEW ) /////////////////////////////////////////////////////////////////////////////

You might also like