Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS/400 program

Status
Not open for further replies.

timcarr

Programmer
Jan 10, 2001
23
0
0
ZA
Does anyone know if there is a way to call an AS/400 program in a Perl script?
 
yes -- three ways, would you believe..... (one's a cheat)

1 -- there is actually a version of perl for the AS/400, so I'm told anyway. There's no point in looking for it as I would *never* be allowed to install it!

2 -- Perl::ODBC -- By using the Perl ODBC module you could connect to the AS/400 and use SQL to manipulate data.

3 -- (the cheat) connect using ftp and issue the commands through that.

Any of those help? Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
I am already connecting to the 400 with ftp so that would be the way to go. But how can I tell a program to run once I'm connected?
 
An ftp command, 'exec' as I remember. You might have to get your AS/400 admin to allow you to run commands from FTP. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
I know the command to call the program from a dos prompt:
rmtcmd call(library/program) //systemname /z

Is there a way I could just call a batch file from the perl script? (I'm not having any luck finding out how to properly put this command in the script itself)

Thanks,
Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top