× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I came across an article on Search400,  regarding opening up a windows
app from an as/400 CL program.   It uses the runrmtcmd.
I have attached the article.
 
I have started the runrmtcmd on my PC under local user.  I went into my
user account,  and changed my password to make sure it matched the one I
am using on the runrmtcmd.   I retrieved my IP address by using the
ipconfig command.     However when I run the remote command I am getting
required password missing or invalid.
 
 
We do this in one other place where I run a remote command on another
server that runs an executable in batch mode on that PC.   I tried
changing the command to run a word app on that pc.  I do not get an
error but my job just hangs.   This article makes it sound like you can
start up for example a word document from an as/400 session and actually
do changes/ creations on it.
 
Has anyone done this?   Am I missing something?
 
 
Angela Wawrzaszek 
Programmer/Analyst 
Nucor Steel Auburn 
wawrzaszek@xxxxxxxxxxxxxxx 
(315) 258-4205 
 
Tips & Newsletters-Search400.com, the source for news and tips on IBM iSeries, 
AS/400 and OS/400 servers
            Explore the TechTarget Network at SearchTechTarget.com.You're 
logged 
            in as: Angela Wawrzaszek Edit your Profile | Log-out





                  Search this site and the Web















       
            Home > Tips > Administrator > Tip for launchi... EMAIL THIS 
                  PAGE TO A FRIEND



            iSeries 400 Tips & Newsletters:

                   TIPS & NEWSLETTERS TOPICS  SUBMIT A TIP  HALL OF FAME 

                  Search for:  in   All tip & newsletter categories IT 
                    Insights Security Administrator Programmer WebSphere 
                    Strategies The Information Architect Customer Facing 
                    Technology Storage Innovators IT Career Expert: Systems 
a... 
                    Career iSeries Books  Full TargetSearch with Google


            ADMINISTRATOR
            Tip for launching a Windows app from the AS/400
            Ron Turull
            15 Sep 1999
            Rating: -4.15- (out of 5)









                  Tip for launching a Windows app from the AS/400
                  provided by Ron Turull and published in the August issue of 
                  Inside Version 4.
                  Remember when you could launch a DOS program from an AS/400. 
                  You can still do it if you're running DOS-based PC Support. 
                  With IBM's final acceptance of Windows, however, most of us 
                  have moved far beyond those days and, for better or for worse 
                  (I'm never quite sure which one it is), are firmly entrenched 
                  in Windows-land. So we may now find ourselves with a need to 
                  launch Windows programs from an AS/400.
                  For example, on a customer record screen on the AS/400, you 
                  may want to provide a function key to allow the user to write 
                  a letter to the customer. Since PC word processors are far 
                  superior to anything found on the AS/400, you would probably 
                  want to launch Word or some other PC word processor using the 
                  following steps: 
                    Copy the customer's name and address to a DLS (document 
                    library system) document, 
                    Launch Word for Windows, automatically opening a form 
                    template, and 
                    Automatically running a Word macro to open the DLO document 
                    and copy the customer information into the proper places on 
                    the form. 
                  It can be done. And, it is a whole lot easier than launching 
                  DOS programs. The solution is the fairly simple RUNRMTCMD 
(Run 
                  Remote Command), not to be confused with the SBMRMTCMD which 
                  allows you to submit a CL command to another AS/400.
                  Don't try it yet!
                  Before you race to your nearest PC to try out the Run Remote 
                  Command command, be aware that you have to launch a daemon 
                  program on the PC first. The name of the program is 
CWBRXD.EXE 
                  and, once executed, it sits in the background and waits for 
                  incoming commands. When it gets one, it executes it. On a 
side 
                  note, ironically, the CWBRXD.EXE program is a DOS program 
                  (don't ask me why).
                  Also, you have to configure Client Access to accept incoming 
                  commands. To do this, press the Start button and select 
                  Programs. Then, open the Client Access 400 folder and select 
                  Client Access Properties. On the properties page select the 
                  Remote Command tab. Here you can add which users can submit 
                  commands to the PC.
                  To add a user, press the Add button. To allow all users to 
                  submit commands to the PC, specify an asterisk (*) for both 
                  the System and User ID fields (leave the password fields 
                  blank). Otherwise, add only the users who you want to submit 
                  commands to the PC.
                  If you check the "Automatically start incoming remote 
command" 
                  checkbox, the CWBRXD.EXE daemon program will be started 
                  automatically when you open a connection to an AS/400. 
                  Alternatively, you can stick a shortcut to the CWBRXD.EXE 
                  program in your Startup folder.
                  2 protocols supported by the RUNRMTCMD command
                  The RUNRMTCMD command supports two communications protocols, 
                  SNA and TCP/IP. You must to know which one the PC you'll be 
                  submitting commands to is running. To determine which one a 
PC 
                  is running, open the Client Access 400 folder again (as 
                  described above) and select AS400 Connections.
                  On the resulting screen, in the right-hand panel, right-click 
                  the connection configuration the PC is using. Select 
                  Properties on the pop-up menu. The Connection type field on 
                  the AS/400 Connection tab will show you the protocol the PC 
is 
                  using. Make a note of it because you will need it on the 
                  RUNRMTCMD command.
                  How to use the Run Remote Command command
                  Now that you have your PC configured, sign on to an AS/400 
                  (you don't necessarily need to use the PC running the 
                  CWBRXD.EXE daemon program - in fact, you can use a dumb 
                  terminal). On a command line, type in "RUNRMTCMD" and prompt 
                  it with F4.
                  On the Command parameter, enter the PC command you want to 
                  run. For example, on my PC, to launch Microsoft Word, I use 
                  the command 
                    C:MSOfficeWinwordWINWORD.EXE.
                  The Remote location parameter is in two parts, the "name or 
                  address" of the target PC, and the communication "type" 
(i.e., 
                  protocol) the PC is using. If the PC is using SNA, specify 
its 
                  remote location name for the "name or address" field. You may 
                  have to prefix the name with the network ID of the PC if it 
                  differs from the AS/400's local network ID (use the DSPNETA 
                  command to determine the AS/400's local network ID). Then, 
                  obviously, specify *SNA for the Type field.
                  On the other hand, if the PC is running TCP/IP, specify the 
                  PC's IP address for the "name or address" field. 
                  Alternatively, if the PC has an entry in the AS/400 host name 
                  table, you can specify its host name (see the CFTTCP command 
                  for more information on the host name table). Either way, 
                  you'll need to specify *IP for the "type" field.
                  For the Remote user ID parameter and the Remote password 
                  parameter, you'll need to specify the user ID and password 
                  configured on the PC. If you configured the PC to accept 
                  commands from any user, then leave the defaults for these 
                  parameters, *NONE.
                  Here is an example of the RUNRMTCMD command: 
                    RUNRMTCMD
                    CMD('C:MSOfficeWinwordWINWORD.EXE') 
                    RMTLOCNAME('192.168.10.7' *IP)
                  The IP address problem
                  Don't get too excited yet! One of the common uses of the 
                  RUNRMTCMD command is to launch a Windows application from an 
                  AS/400 program on the PC the user is using. The last clause 
in 
                  the previous sentence is the operative one. When using 
TCP/IP, 
                  how do you determine the IP address of the PC the user is 
                  using?
                  The answer is there really is no way of doing so, at least 
not 
                  that I have found. There is a workaround, but it takes 
                  commitment, diligence, and time. The first thing you need to 
                  do it get your users on a telnet client that supports device 
                  naming. Client Access's PC5250 works fine.
                  The trick is this: Give each user's telnet configuration a 
                  unique device name. When they start a session and sign-on to 
                  the AS/400, their interactive job will have the same name as 
                  the device name. Part two: Add all the device names that you 
                  assigned to the AS/400's host name table. Use the ADDTCPHTE 
                  command to add the names. On the Internet address parameter, 
                  specify the IP address of the PC and on the Host names 
                  parameter, specify the device name. Warning: Doing this 
                  creates a conflict that prohibits the use of DHCP.
                  Once this is done for each user, you can use the RTVJOBA 
                  command to retrieve the name of the job. If you properly 
                  configured the host table, the job name will be the same as 
                  the host name. Then you can specify the job name for the 
                  Remote location parameter on the RUNRMTCMD command.
                  No addressing problem for SNA
                  SNA doesn't suffer from the "addressing" problem because you 
                  can easy determine the remote location name from the device 
                  description (which, again, has the same name as the job 
name). 
                  Just use the Retrieve Device Description API (QDCRDEVD) and 
                  format DEVD0200 to get the remote location name and, then, 
                  plug it into the Remote location parameter.
                  RUNRMTCMD does DOS programs, too
                  You can also launch DOS commands and programs using the 
                  RUNRMTCMD command. However, if they have any output, it is 
                  written to an AS/400 spool file. Therefore, interactive DOS 
                  programs aren't an option. For example, you can't launch your 
                  old DOS version of Word - not that you would want to anyway. 
                  DISCLAIMER: Our Tips Exchange is a forum for you to share 
                  technical advice and expertise with your peers and to learn 
                  from other enterprise IT professionals. TechTarget provides 
                  the infrastructure to facilitate this sharing of information. 
                  However, we cannot guarantee the accuracy or validity of the 
                  material submitted. You agree that your use of the Ask The 
                  Expert services and your reliance on any questions, answers, 
                  information or other materials received through this Web site 
                  is at your own risk. 

                        Do you like this tip? Email your opinion or rate the 
                        tip: 

                                 
                                Rate this Tip:(bad)(excellent)
                                12345



                        Submit a Tip 
                         
                        Free tips via email 

                          




                              LATEST TIPS & NEWSLETTERS



                              >> Commands, APIs and op-codes to control 
                              activation groups

                              >> Reorganize physical files -- code free

                              >> Who's using all the CPU? 

                              >> Retrieving QDLS information 

                              >> Understanding the ins and outs of activation 
                              groups -- Part II




                                  WHAT'S NEW

                                 on search400

                                 1. Free chapter:Database Programming w/J2EE
                                 2. Look here for e-Commerce solutions 
                                 3. iSeries white papers
                                 4. Read this hall of fame winning tip











                          




                        The Quick Guide to Windows Server 2003. Get the latest 
                        information on installation, new features and training. 
                        Click here!  

                        Try a free session of the new Microsoft Visual Studio 
                        .NET 2003--no download required. 
                        http://msdn.microsoft.com/vstudio  



                         GET YOUR PRODUCT OR SERVICE LISTED HERE 







            About Us  |  Contact Us  |  For Advertisers  |  For Business 
                  PartnersSEARCH 






                  APPLICATIONS
                  SearchCRM.com
                  SearchSAP.com

                  DEVELOPMENT
                  SearchVB.com

                  ENTERPRISE IT MANAGEMENT
                  SearchCIO.com
                  CORE TECHNOLOGIES
                  SearchDatabase.com
                  SearchMobileComputing.com
                  SearchNetworking.com
                  SearchOracle.com
                  SearchSecurity.com
                  SearchStorage.com
                  SearchWebServices.com
                  WhatIs.com
                  PLATFORMS
                  Search390.com
                  Search400.com
                  SearchDomino.com
                  SearchEnterpriseLinux.com
                  SearchWin2000.com
                  SearchWindowsManageability.com


                  TechTarget Enterprise IT Conferences  |  TechTarget Corporate 
                  Web Site  |  Media Kit



                  Explore SearchTechTarget.com, the guide to the TechTarget 
                  network of industry-specific IT Web sites.



            All Rights Reserved, Copyright 1999 - 2003, TechTargetRead our 
            Privacy Statement



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.