× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Transfer of File from PC to AS400
  • From: Jim Langston <jlangston@xxxxxxxxxxxxxxxx>
  • Date: Tue, 04 Jan 2000 13:43:56 -0800
  • Organization: Conex Global Logistics Services, Inc.

Have you considered using FTP?  One of the reasons I
use FTP a lot is because we don't have client access
in use here, so don't use all those PC functions.  You can
run FTP from the command line, in batch, in programs,
etc...

You would create two files, an input (to the FTP client on
the AS/400) and an output (FTP server's responses). If you
don't have access to an FTP server you can run a type of
FTP server on a PC.  There are a number of them out there
on the internet, some better than others,  I would just not
consider most of the "smaller" ones real safe to have access
to the internet, not sure how many security holes may, or
may not, be in them.

But, say you wanted to grab a file from a PC called myfile.txt
to the AS/400.  You would create a file on the AS/400 called
something like FTPINPUT and add the lines (PDM works well):

myuser mypass
get /somedir/myfile.txt mylib/myfile.mymember
close

(You could even programmatically change this file to change file
names, or prompt for their name and password, etc...)

Create another file called something like FTPOUTPUT

then do
OVRDBF INPUT /mylib/FTPINPUT
OVRDBF OUTPUT /mylib/FTPOUTPUT
FTP <ip of pc with FTP client in single quotes such as '127.0.0.3'>

Then the file will get transferred as requested in FTPINPUT,
with the output being sent to FTPOUTPUT.  It would be
possible to programmically read FTPOUTPUT for errors,
as, once you are connected, the first 3 characters of any
response is the message type.  331 is Password required for <user name>,
530 is user <user name> can not log in, 550 is file not found,
00 is PORT command successful, etc...

Regards,

Jim Langston

"Rae, Chris" wrote:

>                 Please, could anybody tell me if it is possible to transfer
> data from a PC file from within an RPG ILE.
>                 The intention is for it to be seamless for user (ie, not
> using the Transfer from PC function of Client Access), and preferably
> straight from a network drive, not an AS400 folder.
>
>                 Bearing in mind the "RTM" epithet, suggestions of where to
> look would be greatly appreciated, not necessarily hand holding.
>
>                 Thanks in advance
>
>                 Chris

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.