I typically let the IBM do the driving, so, I have commands like the
following. I don't know much about Windows scripts, but perhaps the
following command could run a script to ftp "get" from the IBM machine.
Alternatively, if you want Windows to do the driving, it could kick off a
program to generate the data through the FTP method you're already doing,
and then the IBM machine would call a process on the Windows machine to go
get it once batch processing completes. This RUNRMTCMD thing requires that
Client Access be installed on the Windows server, and there has to be some
process running and configured, whose process name always escapes my
memory.
callp(e) QCMDEXC('RUNRMTCMD CMD(' + apos
+ 'c:\PROCESS.exe -K ENGINE32.EXE'
+ apos + ')'
+ ' RMTLOCNAME('+apos+ServerName+apos+' *IP)'
:1024);
From: Alan Cassidy <ACassidy@xxxxxxxxxxxxxx>
To: "RPG programming on the IBM i (AS/400 and iSeries)
(rpg400-l@xxxxxxxxxxxx)" <rpg400-l@xxxxxxxxxxxx>
Date: 01/13/2015 04:53 PM
Subject: Run remote process from FTP client and wait until it's finished
to download output
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>
Good afternoon folks,
I have spent much too long looking for this specific issue out there, but I
figure in this list somebody has done it before...
I need to use a Windows-7 script on a Windows server that runs FTP script
(s) to
(1) run a process on the "IBM I" that generates a file, and then
(2) download that file.
The remote program is run using the FTP command:
quote rcmd CALL PGMLIB/PROGRAM
It appears that the script runs the next line without waiting for the
program to finish.
Is there a way to make it wait?
I have the remote call running now in one FTP script, which the windows
batch file runs, and then it runs the download FTP download script in the
next line.
Thanks
Alan
Alan Cassidy
Software Engineer
Hospital Physician Partners
954-981-6383 ext. 3433 - Direct phone
786-380-9236 - Mobile phone
acassidy@xxxxxxxxxxxxxx<mailto:acassidy@xxxxxxxxxxxxxx>
www.hppartners.com<
http://www.hppartners.com/>
[HPP Logo FINAL with name-tag-logo-TM]
--------------------------------------------------------------------------------
Confidentiality Notice: This email may contain confidential information or
information covered under the Privacy Act, 5 USC 552(a), and/or the Health
Insurance Portability and Accountability Act (PL 104-191) and its various
implementing regulations and must be protected in accordance with those
provisions. It contains information that is legally privileged,
confidential or otherwise protected from use or disclosure. This e-mail
message, including any attachments, is for the sole use of the intended
recipient(s). Any unauthorized review, use, disclosure or distribution is
prohibited. You, the recipient, are obligated to maintain it in a safe,
secure and confidential manner. If you are not the intended recipient,
please contact the sender by reply e-mail and destroy all copies of the
original message. Thank you.
--------------------------------------------------------------------------------
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.