Link to home
Start Free TrialLog in
Avatar of dustybryn
dustybryn

asked on

FTP pc text file to AS400 document

Hi,
   I was wondering if someone could tell me whether it is possible to FTP a PC text file direct to an AS/400 document within an AS/400 folder or is the only way to FTP the file to an AS/400 physical file and then execute a CPYTOPCD command? (If your going to say 'No' that's fine and I will still award the points but please do not do this unless your 100% sure)

Many Thanks,

                 Dust.


Avatar of RQnone
RQnone

Yes, Once connected to the as400 with FTP issue  CD /QDLS/xxxxx/
xxxx being the folder you want the pc document placed this will automaticaly change the naming format to 1

Send the file in ascii mode




 
Yes, it's possible. At least, I can do it on most systems I work with. /QDLS is a file system with extra requirements and significant overhead. It still exists on "modern" iSeries primarily for backwards compatibility.

I can't answer whether _you_ can do it on your system. The major issue would be whether you're registered to use the /QDLS file system at all.

Further, many files cannot be directly FTP'd to /QDLS because they don't have names that follow the old 8.3 naming convention.

For this and other reasons, /QDLS ought to be avoided. Use a different directory off of root, preferably one that you created for receipt of FTP files, and handle the files properly after they've been received. Even then, they should only go into a /QDLS folder if you have a specific need for it such as a 3rd-party application that expects it.

When handling documents outside of /QDLS, don't use CPYTOPCD/CPYFRMPCD; instead use CPYFRMSTMF/CPYTOSTMF or CPYTOIMPF/CPYFRMIMPF or simply use CPY.

Tom
Avatar of dustybryn

ASKER

I'm a little confused. RQNone I tried what you gave me but got a message saying "specified directory does not exist" when i issued the CD command. Let me give you an example of what I'm trying to achieve. I have a pc text file in path "c:\0759.ind" I want to put this in the AS400 folder BRYNFTP. I originally tried the FTP command "put c:\0759.ind brynftp/0759.ind" from a DOS command line but of course the system sees this as me trying to put a physical file (0759.ind) into a library (BRYNFTP) and so fails. My question really is can I use a "put" FTP command to place my file directly into a folder and if so how? I'm also a little confused by the whole 'folder' thing although I have created a folder called 'BRYNFTP' I can't seem to locate it using a wrkobj command (from the as/400 command line), why is this?, where are the folders themselves actually stored?  

Cheers,

        Dust.
ASKER CERTIFIED SOLUTION
Avatar of Mind_nl
Mind_nl

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial