|
Using the FTP command - of course after having it started on the AS/400 - Here is an example of what we do - The C/L: PGM PARM(&INFILE) DCL VAR(&INFILE) TYPE(*CHAR) LEN(10) OVRDBF FILE(INPUT) TOFILE(MWSRCLIB/QRPGLESRC) + MBR(&INFILE) OVRDBF FILE(OUTPUT) TOFILE(MWSRCLIB/QRPGLESRC) + MBR(FTPLOG) FTP RMTSYS(NTSERVER) DLTOVR FILE(INPUT OUTPUT) ENDPGM Passing a parm of a source member from qrpglesrc (type TXT) of say the following example: ** close open server_you_are_connecting_to user user_id your_password CD /kyhost/plymouth/target/fromcsd put data400/CMEDI870P@xxxxxxxxxx CMEDI870P.txt ren CMEDI870P.txt A05051700 close quit We also have a text file in qrpglesrc called FTPLOG where all the ftp log information goes (if you care to read through it to verify your transfer) - this too can be specified for say a certain application - create a log file for one transfer so you only have a small file to read through for validation. Then in a C/L we just do the following: call ftp parm('MOVEFILE') Where movefile is a text member in qrpglesrc.... Of course if you do not need the flexability of this solution - you could just create the text file, the log file and in your schedualed C/L, do all that I've shown in the above c/l. There could be other ways to skin this cat, but this way does work. HTH Mark -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Adam Lang Sent: Tuesday, May 06, 2003 8:57 AM To: midrange-l@xxxxxxxxxxxx Subject: Automating an FTP transfer How would we automate the AS/400 ftping a file to an OS/390 once a month? They both have all the appropriate software installed. We figured make a CL program and stick it in the scheduler. Not sure what to put in the CL though. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.