Automating commands with shared NMREADY when Netmaster comes up
search cancel

Automating commands with shared NMREADY when Netmaster comes up

book

Article ID: 250316

calendar_today

Updated On:

Products

NetMaster Network Management for TCP/IP NetMaster File Transfer Management NetMaster Network Automation NetMaster Network Management for SNA SOLVE:Operations Automation SOLVE: Access Session Management

Issue/Introduction

We would like to execute commands with automation when Netmaster comes up.

Where is the best location for this within the product?

We are sharing the same hlq.TESTEXEC(RUNSYSIN)  across multiple systems, so the NMINIT and NMREADY are also shared.

Which member should we use, and how can we configure this so that different commands can be issued depending on the system?

Environment

Release : 12.2

Component : NetMaster Network Management for TCP/IP

Resolution

The best location is most likely the NMREADY. Here is basic information about NMINIT and NMREADY.

As delivered, the NMINIT and NMREADY members are contained in your TESTEXEC, and pointed to by the RUNSYSIN member.
They do not contain any commands out of the box; they are intended to facilitate customization.
Both contain a long block of comments that outline what they do, and each is implemented at different times during the initialization process.
More information can be found in the Verify the TESTEXEC Data Set section of the Installing Guide.

At the end, a message is written to the log indicating that the proc has completed processing.
This is useful in case of initialization problems, so should not be changed.


Commands are generally defined in the NMREADY.
They are placed in the proc before the flowerbox section indicating the end of the proc.

Here are a few examples of commands that can be issued.

1. Issue a system command.
SUB BSYS D IPLINFO

2. Kick off an NCL proc
SUB BSYS START procname

3. Set up a timer command to issue a command at a specific time, either once or multiple times
AT    12.00 LIMIT=1  KEEP=MON CMD=ACT NCP1 

4. Set up a timer command to issue a command at a specific interval, with limited or unlimited repeats.
EVERY  1.00 LIMIT=NO KEEP=LOG CMD=D BFRUSE 


5. Write messages out to the Netmaster activity log
&WRITE LOG=YES DATA=SUBMITTING PROC procname

For detailed syntax and useage information for the AT and EVERY commands, logon to Netmaster, go to the Command Entry (CMD) screen and issue 
HELP AT      or
HELP EVERY


Sharing the same hlq.TESTEXEC(RUNSYSIN) across multiple systems is not standard; Netmaster doc intends for each region to have its own TESTEXEC, or at least unique members within the library.
But for a situation where the TESTEXEC and members are shared, here is our recommendation for enabling execution of different commands on each system.

Create a single proc to run all commands on all systems.
Within that proc, you can decide if a command is to be executed depending on the system. The two variables for that are &ZSYSNAME and &ZNMDID.

One is the system name, and the other matches the NMDID value in your RUNSYSIN.

As an example, on one of our Netmaster regions, those variables resolve to XE72 and C817.

So with one NMREADY you could use this format in your proc

&If .&ZSYSNAME = XE72 &Then +

   &do

automation command 1

automation command 2

etc...

   &doend

(or use &ZNMDID instead of &ZSYSNAME if preferred).

 

If you have a system where no commands are needed, the proc will run through correctly, but do nothing.


To run the proc during Netmaster initialization, add it to the NMREADY member as noted above - SUB BSYS START procname.

Additional Information

For a complete list of all system variables, please see the System Variables section of the NCL Reference Guide.