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

RE: Several questions



Sender: "Tom Carriere" <carriere@xxxxxxx>

My printer could not print the doc so that it is readable.
I do not have software to electronic sign.
I am sending it to another printer that works ok and I will fax in 5 minutes


------------------------------------
Tom Carriere
carriere@xxxxxxx
-------------------------------------


-----Original Message-----
From: owner-ftpapi@xxxxxxxxxxxxx [mailto:owner-ftpapi@xxxxxxxxxxxxx] On
Behalf Of Scott Klement
Sent: Friday, October 14, 2005 4:02 PM
To: ftpapi@xxxxxxxxxxxxx
Subject: Re: Several questions

Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


> It was decided that we are going to transfer files with the web server 
> via FTP. This is what the company hosting our web site requested. Can 
> anyone tell me if this is a good idea? I know there are security issues 
> to be aware of, but is there anything else I should be aware of? I know 
> there are alternatives, but I don't know enough to build a strong case 
> for changing the proposed method of transferring files. Time is of the 
> essence with this project.

What sort of issues, other than security, are you interested in hearing 
about?  I'm not sure how to respond to the question.  If it works, and 
security's not a concern, what else is there?

> Here's how I envision things. The web server will send a file containing
> Customer/Order information to a designated file on our iSeries. The file
> will have a trigger that will run the necessary programs and ultimately
> send a file back.

Seems awfully convoluted.  Why not just use HTTP?  That way, you web 
server will (more or less) call an RPG (or your prefered language) program 
on the server, and it'll kick out the result straight to the web server's 
program.

> As a result I downloaded the FTPAPI. I'm having a little trouble getting 
> the the TESTPUT program to work.
> Using regular batch FTP I can get the following to work:

>
> user pass
> cd Private
> put remotei/spgitm.spgitm spgitm
> FTP RMTSYS('xxx.xxx.x.xxx')
>
> c                   callp     ftp_binaryMode(sess: *on)

You didn't swtich to binary mode in your example that used the IBM FTP 
client, why use binary here?


> c                   if        ftp_put(sess: '/Private/FTPTESTW':
> C                                               'TESTLIB/FTPTESTW')<0

FTPAPI only understands what IBM calls "NAMEFMT 1".  Consequently, any 
local pathnames have to be in that name format.

Try /QSYS.LIB/TESTLIB.LIB/FTPTESTW.FILE/FTPTESTW.MBR  (assuming that 
FTPTESTW is the name of a file)

> I get the message DSPLY  No such path or directory when the ftp_put
> procedure is executed. Does this message indicate the remote, local, or
> both are incorrect

It means that the local filename isn't correct.

>
> I've tried just about every combination I can think of. Do I need to run
> something comparable to the cd Private ftp command before I put the
> file?

You don't have to (with batch FTP *or* FTPAPI) you can specify the 
directory on the PUT command.  If you do want to change directories, you 
can... but you don't have to.

In the sample code you provided, switching directories isn't necessary, 
since you specified the directory on the FTP_put() call.


> Does the file have to be in the IFS?

Everything resides in the IFS. (Or, nothing does, depending on how you 
look at it.)  IFS is an interface to all of your computer's different 
filesystems.  It can access the "root" filesystem that contains 
windows-like files and names, or it can access the /QSYS.LIB filesystem 
that contains the standard OS/400 libraries and objects.

It can even access other computers on your network.

So -- every file your iSeries has access to is in the IFS.

Since everything is available through the IFS, I decided to make FTPAPI 
use IFS-style pathnames instead of the older more traditional 
library/object type naming convention.

That way, you can access everything without me having to write separate 
code to handle two different types of filenames.
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------