|
Loyd, Do what your heart desires in the first place. Have the client initiate the job on the 400. We have customers who ftp us a file, then use the ftp subcommand RCMD to initiate a job on the 400. Here is a sample PC batch file: ftpit.bat ftp -n -s:plord.txt ** end of program Contents of plord.txt open myas400 user USERID PASSWORD cd plsup dir put plord quote rcmd success operation(upload) cd plsdown dir quote rcmd ftpplshp get plshp quote rcmd ftpplskd get plskd quote rcmd success operation(download) quit ** end of plord.txt Description: open myas400 -> Opens connection to the 400. Put your 400 name here. user USERID PASSWORD -> Logs on, put your userid and password here. cd plsup -> Changes to the library PLSUP. dir -> Display contents of library PLSUP. I would discard this line. put plord -> Copies the file from current directory on the PC to the current library on the 400, PLSUP. quote rcmd success operation(upload) -> Execute the command success in library PLSUP passing the parameter OPERATION(UPLOAD). Caution: Setup your own library list within the program called by success. Because ftp will not be using the library list associated with the user profile USERID. cd plsdown -> Change to the library PLSDOWN. dir -> Display contents of library PLSDOWN. I would discard this line. quote rcmd ftpplshp -> Execute the command FTPPLSHP in library PLSDOWN. get plshp -> Copy the file PLSHP from library PLSDOWN into the current directory on the PC. quote rcmd ftpplskd -> Execute the command FTPPLSKD in library PLSDOWN. get plskd -> Copy the file PLSKD from library PLSDOWN into the current directory on the PC. quote rcmd success operation(download) -> Execute the command SUCCESS in library PLSDOWN passing it the parameter OPERATION(DOWNLOAD). quit -> log off the ftp session and return control to the PC batch file. Summary description: Customer gives us their orders. Customer posts their orders. Customer runs a command to create file of shipments. Customer downloads shipments. Customer runs a command to create file of scheduled shipments. Customer downloads schedule. We could create a fancy website to do this, and we may in the future. But right now the customer doesn't need to hire more people to click on icons and manually handle data. They are happy with the automated solution. The only change we made was we had to break this script file up into a few separate log on sessions. It was timing out waiting for the commands to execute. Rob Berendt ================== Remember the Cole! "Goodbar, Loyd (AFS-Water Valley)" To: "'midrange-l@midrange.com'" <midrange-l@midrange.com> <LGoodbar@afs.bwaut cc: o.com> Subject: IFS object attributes Sent by: owner-midrange-l@mi drange.com 02/07/01 05:00 PM Please respond to MIDRANGE-L Is there a way I can get the attributes (date/time created/modified, file size) for an IFS object in a CL or RPG/IV program? I have a batch file running on an NT server that extracts some data from another server (Novell) to a directory on the AS/400. On the AS/400 side, I want to ensure I have a file created "today" before I try to process it. It would also be nice if I could kick off an AS/400 job from the same batch file when it completes. Running version V4R3. Thanks! Loyd -- Loyd Goodbar Programmer/Analyst BorgWarner Incorporated Air/Fluid Systems, Water Valley, MS +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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 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.