Solved

DDM for CL

Posted on 2006-06-22
7
1,571 Views
Last Modified: 2012-05-05
I have a CL on AS400 A (CL_on_A) which should activate a CL on AS400 B (CL_on_B) as soon a CL_on_A is done executing. In other words, before CL_on_A reaches ENDPGM it should activate CL_on_B.

AS400 A and AS400 B are two different AS/400

Any suggestion is highly appreciated
0
Comment
Question by:Errol Farro
  • 3
  • 2
  • 2
7 Comments
 
LVL 13

Expert Comment

by:_b_h
ID: 16962003
Check out the Run Remote Command (RUNRMTCMD) command:
RUNRMTCMD CMD('call mylib/mypgm')  RMTLOCNAME('172.22.22.22' *IP)
which will call program mypgm in library mylib on remote system at 172.22.22.22.

There is some security configuration that you might have to do, but check out the command as a start.

Post back any questions!

Barry
0
 
LVL 13

Expert Comment

by:_b_h
ID: 16962124
Additional note: You need the REXEC server running, which is started using:
STRTCPSVR *REXEC
0
 
LVL 27

Expert Comment

by:tliotta
ID: 16963046
ecfarro:

Barry's suggestion of RUNRMTCMD is the option that's becoming more popular. If there is a DDM connection defined (and active) between the two systems, you can use the SBMRMTCMD command to do a similar function.

In order to use DDM, security factors must be considered. (Also true with RUNRMTCMD, but security info for REXEC is commonly available all over.)

The OS/400 DDM client does not do password-checking when DDM runs over TCP/IP. To implement passwords, AS400 A _must_ have a server authentication entry for the job's current user. Use the ADDSVRAUTE command to add an authentication entry using 'QDDMSERVER' as the server name. It _must_ be upper-case. This entry will be used by AS400 A whenever it connects to any other AS/400 via DDM over TCP/IP. The QRETSVRAUT system value _must_ be set to '1' in order to keep the authentication entry.

If AS400 B doesn't require passwords and allows DDM over TCP/IP, then _any_ computer that can get a route to AS400 B (from the internet even) can access AS400 B. This is no different from any "remote command" function that has security turned off; however, many AS/400s previously ran DDM in SNA networks and haven't caught on to what happens when TCP/IP is used instead. Sites have activated DDM over TCP/IP without making appropriate security changes.

Tom
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:Errol Farro
ID: 16963730
I am trying above mentioned command but the system A gives the message "

A remote host did not respond within the timeout period.    
Command did not complete successfully.                      

Is there any place I can look to get the steps in setting up DDM ?
0
 
LVL 27

Accepted Solution

by:
tliotta earned 500 total points
ID: 16964848
Which above-mentioned command? RUNRMTCMD or SBMRMTCMD?

AS400 B needs to have an REXEC server active if it's going to accept commands from other systems. Barry noted that [STRTCPSVR *REXEC] is the command. REXEC needs to be running on the target system.

If no service is listening and you tried RUNRMTCMD RMTLOCNAME(host *IP), you would get CPE3425 -- A remote host refused an attempted connect operation. But you got a timeout message instead.

First guess... I'd start looking for router/firewall restrictions. It looks like maybe the route is blocked in one direction or the other for port 512.

Tom
0
 

Author Comment

by:Errol Farro
ID: 16991913
I started *REXEC and the command SEEMS to be running to completeion on AS400 A. However, nothing happens on AS/400 B. Is there a queue that might need to be started.

For testing, I am doing the following command but no report is printed on AS400 B

RUNRMTCMD CMD('WRKSYSVAL OUTPUT(*PRINT)') RMTLOCNAME('aa.bbb.cc.dd' *IP)
RMTUSER(MYNAME)                                                          
0
 
LVL 27

Expert Comment

by:tliotta
ID: 16996494
ecfarro:

Heh. This might be a bit of a surprise, but look for the report on AS400 A instead of AS400 B. Look in the spooled files for the job that ran the command on AS400 A.

Note that this is only possible when specifying *IP. RUNRMTCMD over *SNA is not able to return the spooled output.

I have run commands this way and then used the Spooled File APIs to extract info such as serial number from remote systems when there is no installed programs on the remote.

Tom
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question