[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: file not found



Sender: Scott Klement <klemscot@xxxxxxxxxxxx>


Yes, that's exactly what I'm suggesting, too...

On Tue, 21 May 2002, Jim Langston wrote:
>
> Why don't you just FTP GET the file to the AS/400 file?  Why are you
> stopping off in the IFS?
>
> I don't have the FTPAPI programs installed, but I know that normal FTP will
> transfer into an DB2 file with no problem.
>
> Regards,
>
> Jim Langston
>
> -----Original Message-----
> From: Angela Wawrzaszek [mailto:awawrzaszek@xxxxxxxxxxxxxxx]
>
> Sender: "Angela Wawrzaszek" <awawrzaszek@xxxxxxxxxxxxxxx>
>
> I am doing a 2 step transfer.   Our customer drops off a .txt file to our
> FTP server every monday of orders.   I am using FTP to get this file from
> the FTP server to the IFS,  then from there to the as/400 file,  to bring
> the orders into our system.  If I can go straight from the FTP server to the
> as/400 that would be wonderful,  but our FTP server does require a sign in
> and I was not able to get it to go from that system to the as/400 without
> the 2 step.  So I am using the myFTPGET program to get it from the FTP
> server to the IFS,  and then the myFTPPUT to transfer it up to the as/400.
> If you have a better way I am all ears!
>
> -----Original Message-----
> From: Scott Klement [mailto:klemscot@xxxxxxxxxxxx]
>
> Hi,
>
> On Mon, 20 May 2002, Angela Wawrzaszek wrote:
> >
> > 2.  When I said I ran the TESTGET and got host not found - I was running
> > it from a as/400 session, even though I said I ran it from my PC.  I was
> > just saying from the as/400 session it gives me a host not found BUT if
> > I open a dos window and Manually type in the ftp commands for the test
> > server in the TESTGET it works.
> >
>
> What if you manually type those same commands on your AS/400?  FTPAPI
> just uses the system's host lookup API, if anything's wrong with a DNS
> lookup, it seems likely that it's a difference in how your AS/400's
> DNS is set up vs. the way the PC is set up.
>
> >
> > So I did change the root directory to go to the directory I want and I
> > have the MyFTPGET program doing what I want now.  So now I am tackling
> > the TESTPUT.  I changed the program to upload the file from the IFS
> > directory that MyFTPGET program put there.  I am now trying to upload
> > that to the as/400.  I changed the directory to be
> > 'qsys.lib/austeellib.lib/vmifile.file/vmifile.mbr'
> >
> > The program runs and ends with 'File transfer ended successfully'
> > However the file on the as/400 is empty.  I also have to run the
> > MyFTPGET everytime to put the file back in the IFS directory.
> > Otherwise it is empty after running the MyFTPPUT program is that normal?
>
> No, that's not normal.    It kinda sounds like you're doing a GET instead
> of a PUT.  i.e. it's downloading the empty file, and using that to replace
> the full file.
>
> >
> > If I change the PUT and GET programs to just go to the root directory
> > not a folder within it, it does the same thing except the vmialro.txt
> > file on the root directory is NOT blank after running the program but
> > nothing is still transferred to the as/400.
> >
> >  callp     ftp_binary(*on)
> >  if        ftp_put(sess: '/home/vmi/vmialro.txt':
> >             '/qsys.lib/austeellib.lib/' +
> >             'vmifile.file/vmifile.mbr') < 0
> >  eval      Msg = ftp_error
> >  dsply                   Msg
>
>
> Ahhhhh..  I see...   You're doing this from the IFS to QSYS on the SAME
> AS/400?   The problem is, ftp_put() expects the remote (destination) file
> in the first parameter, and the local (source) file as the second parm.
>
> So, the code above is sending from the vmifile.mbr to the vmialro.txt,
> which wipes out vmialro.txt.  The fix should just be to reverse the order
> of the pathnames.  i.e.:
>
>    if        ftp_put(sess: '/qsys.lib/austeellib.lib/' +
>               'vmifile.file/vmifile.mbr':
>               '/home/vmi/vmialro.txt') < 0
>
> Although that should work, I find myself wondering why you're using FTP
> to transfer it from one place to another place on the same machine?
> Why not just download it to the QSYS location in the first place?
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubsribe from the list send mail
> to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
> -----------------------------------------------------------------------
>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------