TechTalk: Submitting Remote Commands

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

In an AS/400 APPC or APPN network, it is often necessary or desirable to run a job on another system in the network. There are a couple of ways to do this. First you can sign on the remote system with a STRPASTHR command and run the job, either interactively or batch. But you can also take advantage of a SBMRMTCMD command on your system to drive the job on the other system. This is much more efficient than passing through.

To use the SBMRMTCMD command, you first have to create a DDM file in a library. This is done as follows:

 CRTDDMF FILE(xxx/REMOTESYS) + RMTFILE(xxx/RMTJOB) + RMTLOCNAME(STLOUIS) + TEXT('DDM file for SBMRMTCMD') 

The DDM file (local) is used as a pathway to the remote system and the file declared as RMTFILE (remote) does not really have to exist. Neither the local system nor the remote system is actually looking for this file.

Now the SBMRMTCMD command takes on the form as shown below:

 SBMRMTCMD CMD('CALL RMTLIB/JOB01') + DDMFILE(xxx/REMOTESYS) 

This will call program JOB01 on the remote system. Notice the reference to a DDM file is the same one created in the first step. The job to be run is JOB01 and is a user-written program which must exist in library RMTLIB. Any job can be run at the remote system, including IBM-supplied commands, CL programs, etc. The SBMRMTCMD command could be placed on a menu or created as a command, thus freeing the user from passing through to the other system. If the remote job creates printer output, it will of course print on the remote system; however, the remote job can direct it to an output queue and then use SNDNETSPLF command to send it back to the requester.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: