Link to home
Start Free TrialLog in
Avatar of Errol Farro
Errol FarroFlag for Aruba

asked on

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
Avatar of Barry Harper
Barry Harper
Flag of Canada image

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
Additional note: You need the REXEC server running, which is started using:
STRTCPSVR *REXEC
Avatar of Member_2_276102
Member_2_276102

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
Avatar of Errol Farro

ASKER

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 ?
ASKER CERTIFIED SOLUTION
Avatar of Member_2_276102
Member_2_276102

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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)                                                          
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