FTP to an Iseries 400 automated from within Microsoft Access

0 pts.
Tags:
AS/400
Desktop management applications
Development
Programming Languages
I have users who will be creating .csv file form Micorsoft Access, they currently use EXTRA Personnel Client to access the AS400 instead of Client Access. I need to have a script/module/macro that I can incorporate into Microsoft Access to auto ftp the created .csv file to a PF on the AS400, for processing. I have done this before but the process executed the Client access AS400.dtt setup, and I don't have that ability now. Any suggestions... Thanks
ASKED: March 9, 2005  4:38 PM
UPDATED: October 20, 2010  7:09 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I am not an Access person, but the iSeries handles FTP easily. I’ve created a number of scripts to put files from Windows PCs to the iSeries.
Example of a text file I use as a script:

userid
password
lcd
lcd clientssontagpgms
cd /qsys.lib/test.lib
bin
put shlib.savf code.file
quit

Some notes:
The user and password are embedded in the script (note this is not ideal from a security perspective, but in this case it’s to my personal AS400). The cd statement changes the directory on the 400 (I am using NAMEFMT 1 as the default) to my target library. BIN indicates I want to transfer the data in a binary format.

I’m sure some Access expert can tell you how to incorporate your script in a macro/function or whatever you call it in Access.

Hope this helps.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TennPgmr
    If I am not mistaken, in order to use FTP from the AS400 you will need to have an FTP server running on the PC you are remotely connecting to...
    0 pointsBadges:
    report
  • Youngrpgnerd
    I'm not an Access expert but my suggestion would be to build a batch file on the PC that executes the ftp function. Then have VB for apps execute the batch file. That should do the trick for you.
    0 pointsBadges:
    report
  • Fanbot
    In addition to the previous answers. The userid and password can be inserted at run time (The ACCESS user can supply this information at runtime and the execution scirpt be updated. The user id (I-series)can be setup in such a manner that the user only has access to a library of portion of the IFS thus reducing exposure. Any PC connected to your network and if you have a valid DNS name or IP address of the I-Series can FTP to that system. There are a number of alternatives for importing the .csv data (CPYFRMIMPF) i.e. running this as a remote command embedded in the FTP script. QUOTE RCMD CPYFRMIMPF (include the rest of the parameters) For more info http://www-912.ibm.com/s_dir/slkbase.NSF/0/9baf2dae2470df5286256d2f0050d88e?OpenDocument
    0 pointsBadges:
    report
  • TomLiotta
    Why would you FTP a .CSV from a PC into a PF on the AS/400? That doesn't make sense. Why not just put it into a .CSV in the AS/400 in the first place? If Access generates a .CSV, just have Access store it in a directory shared from the AS/400. FTP shouldn't even be involved, nor should a PF. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following