![]() |
![]() |
|
|
Using the CRM Administration Commands
The topics in this section cover commands an administrator uses to start and stop the Communications Resource Manager (CRM). These commands may be entered on the command line for UNIX or NT systems or through Job Control Language (JCL) on OS/390MVS.
Action List
Before you use the CRM Administrative commands, see the following action list and refer to the appropriate information sources.
|
Your action... |
Refer to... |
---|---|---|
1 |
Complete all prerequisite tasks. |
|
2 |
Learn how to start or stop the CRM. |
|
3 |
Prepare for the next step. |
Prerequisites
Before you use the CRM Administrative commands, you should complete the following tasks.
Starting and Stopping the CRM
Before you learn how to start or stop the CRM for your specific operating system, you need to understand the start and stop command syntax and options. The two commands for starting and stopping the CRM are:
These commands can be entered from a command line or you may also use JCL on an OS/390 Multiple Virtual Storage (MVS) platform to set the invoke the CRM start and stop commands. Sample JCL is included in the samples.jar file, which is delivered with your JAM installation.
The following sections provide detailed descriptions of these commands and examples of JCL for each command. After you learn about the commands, you can then refer to the specific instructions for using them with your operating system in the sections following the command descriptions.
CRM Command
The CRM command launches the Communications Resource Manager. The CRM communicates between a JAM gateway and a remote application using SNA protocol.
When you start the CRM from the command line, the CRM Command Line Console puts its prompt in the window. If you exit the Command Line Console window, all of the active links are shut down.
You must configure one CRM for each JAM gateway, as well as configuring one stack for each CRM definition. Each stack can manage one or more SNA links. The CRM must be started and listening before the JAM gateway is booted.
The CRM has a BLOBLOG log file stored in $APPDIR. BLOBLOG stores session and link information. You can use the CRMLOGS command to display the contents and state of the CRM log file.
Example of the CRM command line:
CRM [ -t 0|1|2|3 ] [-s] [-p <nbr>] <addr> <group>
Descriptions of the command line options follow.
Command Line Options
The following table provides descriptions of the valid options for the CRM command:
Environment Variables
You must set the following environment variables before starting the CRM:
APPDIR must be set to the application directory.
For UNIX, the APPDIR indicates the directory for the files created by the CRM.
APPDIR=<High level qualifier for datasets to be created in APPDIR>
For MVS, the APPDIR qualifies the dataset for the files created by the CRM.
Diagnostics
The CRM exits with a return code of 0 upon successful completion.
Examples
To launch the CRM with the console running in the background, enter the following command:
$ CRM //myhost:5587 GROUP2 std.out 2>std.err &
To launch the CRM with detailed tracing and APPC Stack API tracing turned on from the command line using the host/port address, enter the following command:
CRM -t 3 -s //myhost:5587 GROUP2
Sample CRM Command JCL for OS/390 MVS Platform
This section provides an explanation of the SET commands and an example of JCL that can be used when you run the CRM command.
SET STARTCMD
Sets the CRM command line parameters.
SET OBJLIB
Indicates the name of the PDSE library where the CRM executable is installed.
SET DATA
Indicates the dataset containing the ENVFILE.
SET ENVFILE
Indicates the name of the PDS member that contains the environment variables for the CRM. A sample member, ENV, is delivered with your product.
SET SIZE
Defines the region size for the running CRM task. The recommended setting for this option is 0M to allow the CRM to start up and level out to the size it requires.
SET ENV
Indicates the ENVFILE DD name. This value is pre-set and should not be changed.
SET CEE
Specifies the high-level qualifier for the LE runtime library. CEE should be set to the prefix of the IBM Language Environment data sets. Language Environment is required to run the CRM.
Note: Uncomment the SET CEE line and tailor the STEPLIB concatenation if these libraries are not in your system link library concatenation.
SET CBC
Specifies the high-level qualifier for the C/C++ runtime library. CBC should be set to the prefix of the IBM C++ data sets.
Listing 4-1 Sample crmstart.jcl for CRM Command
//*****************************************************************
//* THIS JOB IS USED TO RUN THE SNACRM PROCESS. *
//* *
//* @(#)$Id: crmstart.jcl,v 1.3 2001/05/07 23:41:27 crount Exp $
//* Copyright (c)2000 BEA Systems, Inc., all rights reserved. *
//*****************************************************************
//* YOU MUST SET THE ENVIRONMENT VARIABLES NEEDED BY SNACRM *
//*****************************************************************
//*****************************************************************
//* USE THE SET STATEMENTS TO SET THE APPROPRIATE VALUES *
//* STARTCMD IS THE CRM COMMAND LINE *
//* OBJLIB IS THE LOAD LIBRARY CONTAINING THE PROGRAM EXECUTABLES*
//* DATA IS THE DATASET THAT CONTAINS THE ENVIRONMENT VARIABLES *
//* ENVFILE NAMES THE MEMBER THAT CONTAINS THE ENVIRONMENT VARS *
//* RUNOPTS SETS ANY DESIRED LE RUNTIME OPTIONS (OPTIONAL) *
//* SIZE SETS THE REGION SIZE FOR THE SNACRM PROCESS. 0M SETS NO *
//* LIMITS ON THE REGION SIZE *
//* TAILOR YOUR JCL FOR THE BELOW IF THESE LIBRARIES ARE NOT *
//* IN YOUR SYSTEM LINK LOAD LIBRARY CONCATENATION *
//* CEE IS THE HLQ FOR THE LE RUNTIME LIBRARY *
//* CBC IS THE HLQ FOR THE C/C++ RUNTIME LIBRARY *
//*****************************************************************
// SET STARTCMD='"//<address>:<port>" <group>'
// SET OBJLIB=
// SET DATA=
// SET ENVFILE=ENV
// SET RUNOPTS=
// SET SIZE=0M
//SETENV='ENVAR("_CEE_ENVFILE=DD:ENV")'
//*SETCEE=CEE,CBC=CBC
//CRMEXECPGM=CRM,REGION=&SIZE,
// PARM='POSIX(ON) &ENV &RUNOPTS/&STARTCMD'
//STEPLIBDDDSN=&OBJLIB,DISP=SHR
//*DDDSN=&CEE..SCEERUN,DISP=SHR
//*DDDSN=&CBC..SCLBDLL,DISP=SHR
//MSGFILE DD SYSOUT=*
//TRACE DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//ENVDDDSN=&DATA(&ENVFILE),DISP=SHR
//
crmdown Command
The crmdown command shuts down a CRM.
crmdown shuts down the CRM specified on the command line. crmdown can be used from any machine located on the same TCP/IP network as the machine running the CRM server. The command can also be used in a script and it returns 0 if the command could be sent to the target CRM or 1 if the command could not be sent to the target CRM.
Example of the crmdown command line:
crmdown -n<hostname:port> [-v -i]
Descriptions of the command line options follow.
Command Line Options
The following table provides descriptions of the valid options for the crmdown command:
Diagnostics
crmdown only checks the syntax of the command. If the command could not be successfully sent to the CRM, crmdown prints an error message if in verbose mode and exits with error code 1. Upon successful completion, crmdown exits with exit code 0.
Example
To stop the CRM running on mach1 at port 5000:
crmdown -n mach1:5000
Sample crmdown Command JCL for OS/390 MVS Platform
This section provides an explanation of the SET commands and an example of JCL that can be used when you run the crmdown command.
SET STOPCMD
Sets the crmdown command line parameters.
SET OBJLIB
Indicates the name of the PDSE library where the crmdown executable is installed.
SET DATA
Indicates the dataset containing the ENVFILE.
SET ENVFILE
Indicates the name of the PDS member that contains the environment variables for the crmdown. A sample member, ENV, is delivered with your product.
SET SIZE
Defines the region size for the running crmdown task.
SET ENV
Indicates the ENVFILE DD name.
SET CEE
Specifies the high-level qualifier for the LE runtime library. CEE should be set to the prefix of the IBM Language Environment data sets. Language Environment is required to run crmdown.
SET CBC
Specifies the high-level qualifier for the C/C++ runtime library. CBC should be set to the prefix of the IBM C++ data sets.
Note: Uncomment the SET CBC line and tailor the STEPLIB concatenation if these libraries are not in your system link library concatenation.
Listing 4-2 Sample crmdown.jcl for crmdown Command
//*****************************************************************
//* THIS JOB IS USED FOR THE STAND-ALONE COMMAND USED *
//* TO SHUTDOWN THE SNACRM PROCESS. SEE USER GUIDE FOR MORE INFO *
//* *
//* @(#)$Id: crmdown.jcl,v 1.5 2001/05/07 23:41:27 crount Exp $
//* Copyright (c)2000 BEA Systems, Inc., all rights reserved. *
//*****************************************************************
//* YOU MUST SET THE ENVIRONMENT VARIABLES NEEDED BY CRMDOWN *
//*****************************************************************
//*****************************************************************
//* STOPCMD INDICATES THE COMMAND LINE FOR CRMDOWN *
//* OBJLIB IS THE LOAD LIBRARY CONTAINING THE PROGRAM EXECUTABLES*
//* RUNOPTS SETS ANY DESIRED LE RUNTIME OPTIONS (OPTIONAL) *
//* DATA IS THE DATASET THAT CONTAINS THE ENVIRONMENT VARIABLES *
//* ENVFILE NAMES THE MEMBER THAT CONTAINS THE ENVIRONMENT VARS *
//* SIZE SETS THE REGION SIZE FOR THE SNACRM PROCESS *
//* *
//* TAILOR YOUR JCL FOR THE BELOW IF THESE LIBRARIES ARE NOT *
//* IN YOUR SYSTEM LINK LOAD LIBRARY CONCATENATION *
//* CEE IS THE HLQ FOR THE LE RUNTIME LIBRARY *
//* CBC IS THE HLQ FOR THE C/C++ RUNTIME LIBRARY *
//*****************************************************************
// SET STOPCMD='-n<host name>:<port>'
// SET OBJLIB=
// SET RUNOPTS=
// SET DATA=
// SET ENVFILE=ENV
// SET SIZE=1M
//SETENV='ENVAR("_CEE_ENVFILE=DD:ENV")'
//*SETCEE=CEE,CBC=CBC
//CRMDOWNEXECPGM=CRMDOWN,REGION=&SIZE,
// PARM='POSIX(ON) &ENV &RUNOPTS/&STOPCMD'
//STEPLIBDDDSN=&OBJLIB,DISP=SHR
//*DDDSN=&CEE..SCEERUN,DISP=SHR
//*DDDSN=&CBC..SCLBDLL,DISP=SHR
//ENVDDDSN=&DATA(&ENVFILE),DISP=SHR
//MSGFILE DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//
Starting the CRM on UNIX, OS/390 UNIX, or Windows NT
The CRM server communicates directly with the PU 2.1 server to provide SNA connectivity. These servers can be started manually. The PU 2.1 server must always be started before the CRM. Both servers must be started before starting the associated JAM gateway.
To ensure proper start up of the CRM, complete the following tasks:
APPDIR must be set to the application directory where the CRM will create its files.
Refer to the operational documentation provided by your SNA stack vendor for information about starting the PU2.1 server. The SNA stack must be running and active before you start the CRM.
Enter the CRM command with your required option arguments on the command line.
When you start the CRM from the UNIX command line, the CRM Command Line Console puts its prompt in a window, and if exited, shuts down all of the active links.
Open a Command Prompt window and navigate to the drive where the CRM executable is installed. Enter the CRM command with your required option arguments to start CRM.exe.
On Windows NT, the CRM can be started in its own window; however, no prompt is displayed and no console commands are available.
Refer to CRM Command for more detailed information about the CRM command.
Starting the CRM on OS/390 MVS
The OS/390 MVS platform sets the environment and invokes the CRM using Job Control Language (JCL).
APPDIR=<High level qualifier for datasets to be created in APPDIR>
The high level qualifier is used for the datasets created by the CRM and must be unique for each running CRM.
Note: For more information about the dataset names, refer to the information for installing the CRM on an MVS platform in the BEA WebLogic Java Adapter for Mainframe Installation Guide.
Refer to Sample CRM Command JCL for OS/390 MVS Platform for more information about the sample CRMstart.JCL.
Note: If the CRM is installed on an OS/390 MVS platform, it does not have to be restarted when the JAM gateway shuts down abnormally. The CRM continues running until it receives a normal termination command. Only the OS/390 MVS version and the OS/390 UNIX version of the CRM have this persistent feature. Refer to Stopping the CRM On All Platforms for more information about stopping the CRM on an OS/390 MVS platform.
Stopping the CRM On All Platforms
If the JAM gateway terminates, the persistent CRM feature allows the OS/390 CRM to continue running. You must explicitly shutdown the CRM if the JAM gateway has terminated and the CRM needs to be stopped.
Enter the crmdown command with your required option arguments on the command line.
Run a crmdown job using JCL written explicitly for your system.
Refer to crmdown Command for more information about the crmdown command and the sample crmdown JCL.
What Do I Do Next?
After you learn how to start and stop the CRM , you are ready to deploy your configuration file and verify that the JAM System is running correctly. Refer to Deploying Your Configuration for more information.
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|