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
Solved

FTP pc text file to AS400 document

Posted on 2004-04-06
4
2,346 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
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

840 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