View Full Version : Executing PC commands from AS/400
01-01-1995, 02:00 AM
I want to execute a PC command to display an image. On each PC you can specify the program used to "open" each file type (.BMP .JPG .GIF etc.....). I can code the command to get the PC to display an image if I know the PC application and hardcode it into my AS/400 CLP. My question is, does anyone know how I can issue a commad to the PC not know the particular application assigned to a file type ahead of time? I will assume that I know the file type before trying to get the PC to open the file. Thanx, gb
02-03-2000, 09:50 AM
If you're using Windows, try "START filename". This should open the file with whatever application it's associated with. --Mark
02-03-2000, 01:22 PM
There are two basic methods for executing PC line commands from the AS/400. Use the STRPCO command followed by the STRPCCMD command. Use the RUNRMTCMD command. Dave
02-03-2000, 02:19 PM
If your are running TCP/IP you can also use the QUOTE RCMD to execute a command from the AS/400 on a PC.
02-04-2000, 04:51 AM
Can you explain that one further? Thanks
02-04-2000, 06:44 AM
Greg, <font color=blue>Can you explain that one further? </font> I think Alan was refering to the other way around, submitting a command from the PC to run on the AS/400. The QUOTE RCMD can be used by a FTP client (ie PC) to tell the AS/400 FTP server to run a command. If you run a FTP server on the PC, then it *may* have a similar capability although the syntax will likely be different than the 400's FTP server implementation. But most of use don't run a FTP server on the PC, so the two main choices are RUNRMTCMD or STRPCO/STRPCCMD. You could write your own socket services instead, but for just running commands one of these should do the job just fine. Doug
02-04-2000, 07:47 AM
USE RUNRMTCMD; in the command parm put START /WAIT "what ever you would put in the C:> prompt if you were running the thing from the PC"
02-04-2000, 11:11 AM
I saw an article about using sockets in ILE using API's, I have found examples using C but I don't have the C compiler on this box. Where can I find examples of using sockets with ILE? I am currently using sockets to pass data to/from our web server but again, the interface was written in C. Thanks
02-04-2000, 11:34 AM
Greg, <font color=blue>Where can I find examples of using sockets with ILE? </font> Check out the excellent new redbook, "Who knew you could do that with RPG IV?", (SG24-5402), available in PDF format at <a > href="http://www.redbooks.ibm.com/SG245402/sg245402.pdf">this link</a>. But if all you want is to run a command on the PC, why not use RUNRMTCMD? Doug
02-11-2000, 08:57 PM
Hello Gary, RUNRMTCMD will work if you want to configure CA/400 to accomplish this task. Also, we are BETA testing an add-in to our FTP/400 software which allows you to run remote commands on any PC. You can simply launch a program, launch a document, launch a program and wait, open a web site or do FTP file transfers to/from the remote PC. The process automatically determines which workstation you're on from your 5250 session. We've written our own FTP command daemon for the PC that functions as a regular FTP Server, but also allows for the selected commands to be run on the PC. This is a great way to schedule PC jobs to run from your AS/400 job streams and have the AS/400 wait to continue processing until they're completed. The uses for this are endless. If you're interested in testing the BETA version of this software, please send me your details via email. I think you'll like what you see and you'll also like the ease of use. Regards, Richard Schoen RJS Software Systems "The AS/400 Report Distribution Experts" Email: firstname.lastname@example.org Web Site: http://www.rjssoft.com
02-16-2000, 06:40 AM
There is a shareware FTP Server named Serv-U available from www.cat-soft.com which will allow you to run PC commands, issued from the AS/400. If you use this, you don't need Client Access/400. You can try it out for 45 days for free and if you decide to keep it, the license fee is only $39.00. I've used it extensively and have found it to be more than worth it.
08-14-2000, 12:30 PM
If you are using the following terminal emulator, you've probably got a simple solution: IBM Client Access PC5250 -- The "Hotspot Setup" under the "Assist" menu allows you to trigger hotspots with URL identifiers (i.e., http:// and file://). (The Hotspot Setup window look varies between Client Access and Client Access Express.) But if you select the right options, you should be able to click anywhere within the full URL (as long as the path or file name has no spaces) to bring-up a web page or document. Test your setup by trying to access something like -- file://c:/windows/circles.bmp (having specfied this file in a long enough string field on the AS/400).
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.