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

RE: Basic FTPAPI Question



Sender: "Calabro, Buck" <Buck.Calabro@xxxxxxxxxxxx>

Hi Brian,

> I am a little unsure as to how to use 
> file fields when invoking some of the 
> APIs.  Here is a specific example: 
>
> * Connect to an FTP server.                                         
> *                                                                   
>C                   eval      ftp = ftp_conn('ftp2.freebsd.org':     
>C                                            'anonymous':           
>C                                            'anon.e.mouse@xxxxxxx') 
>
> What I want to do is use fields from a 
> file to pass in to open the connection, 
> but I am not sure if they just need 
> separated by : or what how exactly to 
> format the string in to the API. 


This is traditional RPG IV syntax.  The colons separate parameters from each other.  To use a variable instead of a literal, just put the variable in the statement instead!

eval      ftp = ftp_conn(ftpURL:     
                         ftpUser:
                         ftpPass)


The RPG reference is at http://www.iseries.ibm.com/infocenter and has the full explanation for sub-procedures and such.  Also have a go at the RPG User's guide and the ILE Concepts.  The RPG IV Redbook has a bunch of interesting worked examples of some sub-procedures.

There are several mailing lists where you may be able to get some specific advice with RPG IV.  One is at http://www.midrange.com and the other is at http://groups.yahoo.com/group/RPGIV/  Be sure to try to work through the issues before posting, and remember that the more specific your question, the better the answer will be.
  --buck


The information contained in this electronic mail transmission is intended by Communications Software Consultants, Inc. for the use of the named individual or entity to which it is directed
and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please notify the sender immediately and delete this
message from your system without copying or forwarding it.

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