• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1651
  • Last Modified:

DDM for CL

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
Errol Farro
Asked:
Errol Farro
  • 3
  • 2
  • 2
1 Solution
 
_b_hCommented:
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
 
_b_hCommented:
Additional note: You need the REXEC server running, which is started using:
STRTCPSVR *REXEC
0
 
tliottaCommented:
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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
Errol FarroAuthor Commented:
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
 
tliottaCommented:
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
 
Errol FarroAuthor Commented:
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
 
tliottaCommented:
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now