Operating System - HP-UX
1828227 Members
2710 Online
109975 Solutions
New Discussion

ftam(FCP) problem during loop!

 
Utpal Krishna
Advisor

ftam(FCP) problem during loop!

Hi,

When I am trying to copy any Ftam file from one remote host to local host it works but if I want to copy with a loop I can not do so . Giving error "The file is a directory which already exists. It cannot be recreated(Log instance 14856, FTAM error_id 3023 = "Create override not possible"


Can anyone tell me the probable reason for it.And also the solution for it . I am attacting the attachment for your reference.
To know the best on HP-UX
4 REPLIES 4
Massimo Bianchi
Honored Contributor

Re: ftam(FCP) problem during loop!

Are you sure in ../test1/ there are only files ?

I think in your script you should test it first.


Massimo
Utpal Krishna
Advisor

Re: ftam(FCP) problem during loop!

Yes I have tested there are only files under
y@datac:/home/y/test1
But the script is not working.
If possible let me know the solution


Thanks
Utpal
To know the best on HP-UX
Massimo Bianchi
Honored Contributor

Re: ftam(FCP) problem during loop!

Hi,

I paste the code, for cleariness.

#ftam datac
while true
do

for i in `fls y@datac:/home/y/test1`

do
if [ $i != "/home/y/test1:" ]
then
filecut = `echo $i | cut -c19-27`
echo "processing" $filecut
fcp y@datac:/home/y/test1/$filecut /home/x/ftambackup/$filecut

fmv y@datac:/home/y/test1/$filecut /home/x/ftam2/$filecut
fi
done

sleep 30
done

###########

I have no ftam on my server, so i simply lloked at the code.

look here:
filecut = `echo $i | cut -c19-27`

i tested this single line, with

echo y@datac:/home/y/test1 | cut -c19-27

and the result is
st1

i think that there is a mis-cut.


Try adding a
set -x

as a second line, so we will see what is going on, and let it a second run with debug enabled.


#ftam datac
set -x
while true
do

for i in `fls y@datac:/home/y/test1`

do
if [ $i != "/home/y/test1:" ]
then
filecut = `echo $i | cut -c19-27`
echo "Value of i: "$i
echo "Value of filecut: "$filecut

echo "processing" $filecut
echo "fcp y@datac:/home/y/test1/$filecut /home/x/ftambackup/$filecut"

fcp y@datac:/home/y/test1/$filecut /home/x/ftambackup/$filecut


echo "fmv y@datac:/home/y/test1/$filecut /home/x/ftam2/$filecut"

fmv y@datac:/home/y/test1/$filecut /home/x/ftam2/$filecut

fi
done

sleep 30
done


I think that the filename is mis-interpreted.

HTH,
Massimo
Utpal Krishna
Advisor

Re: ftam(FCP) problem during loop!

Thanks everybody. I have got the solution . Now I have written a script with that I can Automatized my file transfer using FTAM..

Utpal
To know the best on HP-UX