Issue with Connect direct ndmcli

Hi..

We are using connect direct to transfer the files between servers. The CD scripts run on HP UX.

Below is the code using ndmcli.

ndmcli -x << EOJ   
submit  maxdelay=0 proc1  process  snode=$3                                                                          
        step1  copy     from (file=$2                                                                                
####sysopts=":datatype=binary:"                                                                                      
####pnode)                                                                                                           
               to (file=$4  snode                                                                                    
####sysopts="datatype(binary)"                                                                                       
####disp=rpl)                                                                                                        
        pend;                                                                                                        
EOJ          

The script sometimes hangs in the very frst line(ndmcli) for unknown reason when trying to connect to connect direct. Below log shows the same:

	******************************************************
	*                                                    *
	*             CONNECT:Direct for UNIX                *
	*                                                    *
	*----------------------------------------------------*
	*  Copyright (c) 1992, 2002  Sterling Commerce, Inc. *
	*                   Version 3.5.00                   *
	*                Fix level: 29JAN2004                *
	******************************************************

Direct> ---------------------< Date: 08/12 09:55:13 EDT >----------------------
---------------------< Date: 08/12 10:55:15 EDT >----------------------
---------------------< Date: 08/12 11:55:15 EDT >----------------------
---------------------< Date: 08/12 12:55:12 EDT >----------------------
---------------------< Date: 08/12 13:55:13 EDT >----------------------
---------------------< Date: 08/12 14:55:13 EDT >----------------------
---------------------< Date: 08/12 15:55:12 EDT >----------------------
---------------------< Date: 08/12 16:55:11 EDT >----------------------
---------------------< Date: 08/12 17:55:14 EDT >----------------------
---------------------< Date: 08/12 18:55:13 EDT >----------------------
---------------------< Date: 08/12 19:55:13 EDT >----------------------
---------------------< Date: 08/12 20:56:13 EDT >----------------------
---------------------< Date: 08/12 21:55:22 EDT >----------------------
---------------------< Date: 08/12 22:55:21 EDT >----------------------

If it successfully gets connected, the log will look like:

	******************************************************
	*                                                    *
	*             CONNECT:Direct for UNIX                *
	*                                                    *
	*----------------------------------------------------*
	*  Copyright (c) 1992, 2002  Sterling Commerce, Inc. *
	*                   Version 3.5.00                   *
	*                Fix level: 29JAN2004                *
	******************************************************

Direct> ---------------------< Date: 08/11 14:55:11 EDT >----------------------
Enter a ';' at the end of a command to submit it. Type 'quit;' to exit CLI.

submit  maxdelay=0 proc1  process  snode=svr1
         step1  copy     from (file=XYZ.pdf 
 				sysopts=":datatype=binary:"
 				pnode)       
                to (file=XYZ.pdf  snode 
 				sysopts="datatype(binary)"
 				disp=rpl)
  
         pend;

Could someone let me know if there is a way to capture an exception when the script hangs other than checking if cdpmgr is running in the background?

Your help on this would be much appreciated.

Thanks..!

I haven't used CONNECT: Direct - which is a file transfer software with support for a wide range of platforms, not only UNIX but also VMS, IBM mainframes, ... - for a long time, but i remember there was a tool ndmclitest one could use to test the connection. You probably find more details in the documentation of the CONNECT: Direct product, which is pretty exhaustive, AFAIR.

I hope this helps.

bakunin