Solved

FTP pc text file to AS400 document

Posted on 2004-04-06
4
2,359 Views
Last Modified: 2012-05-04
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.


0
Comment
Question by:dustybryn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Expert Comment

by:RQnone
ID: 10768885
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




 
0
 
LVL 27

Expert Comment

by:tliotta
ID: 10771315
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
0
 

Author Comment

by:dustybryn
ID: 10772844
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.
0
 
LVL 3

Accepted Solution

by:
Mind_nl earned 150 total points
ID: 10773739
You probably end up in the QSYS filesystem after you log into FTP. Issue a CD /QDLS you should get back a message "250 "/QDLS" is current directory" from there do a CD BRYNFTP you should get back a message "250 "/QDLS/BRYNFTP" is current directory" now you can use the PUT command...
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popular third-party chat platforms like Slack, Discord, and Telegram are just a few of the many new productivity applications that are being hijacked by cybercriminals to create command-and-control (C&C) communications infrastructures for their malw…
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question