There are a few ways to do it, depending on how deep you want to go, and if
you want to write PC or AS/400 programs.  The easiest, IMO, would be to
write a simple .BAT batch file on the PC that would upload any files in the
directory to the AS/400.  Should be simple to do, simple batch file.

Then, on the AS/400, write a CL program that does a RUNRMTCMD on the PC to
call this batch file and then wait for 5 minutes, then RUNRMTCMD again in an
endless loop.  Add this CL to the job scheduler WRKJOBSCDE to start at like
midnight every day, or whenever your system is available in the morning.

So, now when new files are available they will be FTPed up to the AS/400.

The biggest problem with this is FTPing a file to the AS/400 that is still
being written.  The way I handled this is I had the program that created the
files create an empty file called upload.now and when the batch file saw
this file it would FTP up the files.



Jim Langston

From: "Heeter, Kathleen" <KHeeter@bphsc.com>

Good Afternoon;

We are implementing a new software package on our branch pc's.
This software will create text files of orders to be sent to the as/400. One
file will be created per order. Pxxxmmddyyhhmmss is the naming convention of
each individual file. We need to come up with the best way to automatically
get these files to the 400 without user (salesperson) intervention. We need
to confirm to them that we received the file. We need to provide a way for
them to resend the files to us at corporate if they were not received
properly. Is there some job I can create on the PC's to say if P*.* shows up
in c:\directoryname, trigger job to send it to the 400? Then FTP the file?
Is that the best way? If so, do you know of a way to show them we received
the file....
So many questions..... Can you help? Please and thank-you tons!!!!


This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page