Topic
1 reply Latest Post - ‏2012-11-06T14:54:18Z by SystemAdmin
SystemAdmin
SystemAdmin
926 Posts
ACCEPTED ANSWER

Pinned topic Connect direct script for unix

‏2012-09-14T09:12:15Z |
I want to connect direct a xml file and a excel file each separately from unix system to another unix system.The size of the xml file and excel file may vary each time.

Below is the possible connect direct script to transfer the files.Please check if it is correct?

Also does DCB parameter required ? If required what should be the code for it?

==============

submit
do_copy process snode=CDNODE
step01 copy from (
file=SOURCEFILE
sysopts=":datatype=binary:"
)
to (
file=DESTFILENAME
snode
disp=(new)
)

======================
Updated on 2012-11-06T14:54:18Z at 2012-11-06T14:54:18Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    926 Posts
    ACCEPTED ANSWER

    Re: Connect direct script for unix

    ‏2012-11-06T14:54:18Z  in response to SystemAdmin
    Here is a sample unix shell script (can be faound in ../cdunix/ndm/src directory

    #!/bin/sh
    #
    1. This script invokes the Connect:Direct UNIX CLI
    2. and submits a process inline to copy a file from a remote
    3. node.
    4. $1 is the source file.
    5. $2 is the destination file.
    6. $3 is the name of the remote node.
    #
    set -v
    ndmcli -x << EOJ
    submit proc1 process snode=$3
    step1 copy from (file=$1 snode)
    to (file=$2)
    pend ;
    EOJ
    DCB parameter is not needed !

    Sasha