Operating System - HP-UX
1758636 Members
2120 Online
108874 Solutions
New Discussion юеВ

passing variable to connect direct

 
SOLVED
Go to solution
Deepak Extross
Honored Contributor

Re: passing variable to connect direct

Hmm...looks like it's having a problem with the keyword "submit file".
Are you sure it's "submit file"? Should it be, perhaps, "submitfile" or "submit_file"?
steven Burgess_2
Honored Contributor

Re: passing variable to connect direct

Deepak

nah man

The command is used with connect direct shell

heres what it looks like when you enter direct from the from prompt



******************************************************
* *
* CONNECT:DirectUNIX *
* *
*----------------------------------------------------*
* Copyright (c) 1983, 2000 Sterling Commerce, Inc. *
* Version 3.3.03 *
******************************************************

Enter a ';' at the end of a command to submit it. Type 'quit;' to exit CLI.

Direct>

I use the submit command for each file that requires sending.

I'm off home now 06:00 in the UK and not back till Friday , I'm determined to get to the bottom of this. I will check for any replies When I get up this afternoon

Thanks very much for your help

Steve
take your time and think things through
Deepak Extross
Honored Contributor
Solution

Re: passing variable to connect direct

Steven,

If you want to use the interactive CLI interface, maybe the best way to go about it would be to use "expect".

http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.31/
steven Burgess_2
Honored Contributor

Re: passing variable to connect direct

Hi

I'm not back in the office till Friday to test this further, but was wondering if anyone had any further input regarding this question

Regards

Steve
take your time and think things through
SHABU KHAN
Trusted Contributor

Re: passing variable to connect direct

Steven,

I am not familiar with connect direct but just a thought, did you try running in debug mode and see what value is being passed when you do a submit

1) ksh -x scriptname
2) Also try putting double quotes around /tmp/"$file"

Let us know after you get back ...

Thanks,
Shabu



steven Burgess_2
Honored Contributor

Re: passing variable to connect direct

Hi

I removed the export $file from the script, it now looks like

#!/usr/bin/sh

clear
if [ $LOGNAME != dssadmin ]
then
echo "\n\tYou must be dssadmin user to run this script!!!!"
sleep 5
exit
fi

> $XELOGD/connectd/records.log

cd $XELOGD/connectd
ls xeSnd* > $XELOGD/connectd/sendem.log
sendit=$XELOGD/connectd/sendem.log
for file in $(cat $sendit)
do
ls $file >> $XELOGD/connectd/cubes.log
done
CUBES=$XELOGD/connectd/cubes.log
for files in $(cat $CUBES)
do
echo "submit file=/tmp/$files;" | direct -x >> $XELOGD/connectd/processid.log 2>
> $XELOGD/connectd/errors.log
done
clear


Thanks for your help

Steve
take your time and think things through