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

RE: Question about error msg "No such path or directory"



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

Hi Daniel,

Must the file I created from my RPG program reside
within the IFS....can I ftp a file from my Libraryname/filename?

Yes and no. I'll explain.


The IFS includes every disk your system has access to. Sure, it includes the PC-like filesystem (called the "root" filesystem) but it also includes a unix-like file system, your CD-Rom or Optical Drive, access to Windows Networking resources, and several other things.

Among the many things you can access through teh IFS interface is the traditional "Library" filesystem.

So if you have a library named ACCTPAY and in that library you have a file named CHECKS you would traditionally reference that file by the name ACCTPAY/CHECKS.

You can access the same file through the IFS interface by specifying it with the name:
/QSYS.LIB/ACCTPAY.LIB/CHECKS.FILE


/QSYS.LIB = the "traditional" library/object area of the system.
ACCTPAY.LIB = the IFS name for the ACCTPAY library
CHECKS.FILE = the IFS name for the CHECKS object, which is a *FILE.

That's why I said "yes and no". Although FTPAPI requires an IFS-style filename, you CAN still access your traditional objects. You just have to use a slightly different naming convention.

In free-format RPG, you might code the following statement:

     rc = FTP_put(sess: '/Program Files/FTP/Public/CHECKS.TXT'
                      : '/QSYS.LIB/ACCTPAY.LIB/CHECKS.FILE/CHECKS.MBR');

This uploads the CHECKS member of the CHECKS file to the
/Program Files/FTP/CHECKS.TXT file on the Windows machine that's acting an an FTP server.


However, you might want to consider running CPYTOIMPF ahead of time anyway, since the Windows system may not undersstand the format of an iSeries member if it's not converted first. It depends on the application and files involved.

Hope that helps...

Hi Scott....bear with me... I am not familiar with FTP or RPGILE....or
IFS for that matter....I have had some success with the ftp_put......so
the question now is;

I did do a CPYTOIMPF to get my file into IFS and was able to FTP_PUT to
a co-workers PC.....Is the CPYTOIMPF an absolutely necessary step to get
FTP done?....It would be great if could just ftp the file from my as400
library...outside of the IFS.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------