Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Configuration) Guide


8.3.1 How to migrate definition information when changing hosts during an upgrade

To perform a migration, back up the JP1/AJS2 setup information and then restore the information on the installed JP1/AJS3.

You can migrate setup information after setting up JP1/AJS3 on the destination host. In addition, you need to make sure that the source and destination hosts are on the same platform and have the same language environment. When you migrate information to a different platform, first set up the destination host, and then restore only the job execution environment and calendar definition information.

Note that if the host name changes, you will need to change the host name after migration.

Organization of this subsection

(1) Backup on a JP1/AJS2 host

For details about how to back up setup information on a JP1/AJS2 host, see the description of backup in the JP1/AJS2 system in the JP1/Automatic Job Management System 2 Planning and Administration Guide.

(2) Restoring the setup information on a JP1/AJS3 host

For details about how to restore setup information on a JP1/AJS3 host, see 2.3 Restoring the setup information for a system that uses JP1/AJS3 in the JP1/Automatic Job Management System 3 Administration Guide.

When you perform migration from JP1/AJS2 - Manager to JP1/AJS3 - Manager, if necessary, also perform the procedure described in (3) Migration of execution agent information (JP1/AJS3 - Manager only).

(3) Migration of execution agent information (JP1/AJS3 - Manager only)

When you operate the database on the destination JP1/AJS3 in the standard configuration, you can use the procedure below to migrate the execution environment definitions for QUEUE jobs and submit jobs as execution agent information. Thus, the execution agent name in the unit definition that are also migrated can be used without any changes.

To perform the migration:

  1. Check the JP1_HOSTNAME environment variable.

    To migrate the execution environment definitions for QUEUE jobs and submit jobs from a logical host, specify the logical host name in the JP1_HOSTNAME environment variable.

    To migrate the execution environment definitions for QUEUE jobs and submit jobs from a physical host, do not change the JP1_HOSTNAME environment variable.

  2. Export the execution environment definitions for QUEUE jobs and submit jobs.

    Execute the following command to export the execution environment definitions for QUEUE jobs and submit jobs to a file:

    jpqexport -dt isam -co output-destination-file-name -agmfmt

    Example: When the output destination file name is AgentBack.csv:

    jpqexport -dt isam -co AgentBack.csv -agmfmt

    After executing the command, check the return value of the command.

    Cautionary notes

    • For the output destination file, specify a new (nonexistent) file. If you execute the command with an existing file specified, nothing will be exported.

    • The jpqexport command does not output anything to the standard output or standard error output. Check the return value of the command to determine whether the command terminated normally or abnormally. If the return value is 0, the command terminated normally.

    • The logical host from which the definitions are to be output can be specified in the -mh option of the jpqexport command. In this procedure, however, specify the logical host name in the JP1_HOSTNAME environment variable as described in step 1, rather than in the -mh option.

    • You can use the -agmfmt option of the jpqexport command only in this procedure. Do not use this option to back up or restore the execution environment definitions for QUEUE jobs and submit jobs.

    • You can use the jpqimport and jpqexport commands even in a standard configuration without ISAM. However, you will not be able to execute QUEUE jobs or submit jobs even if you import, to the migration-destination instance of JP1/AJS3, the result file exported by using the jpqexport command or the result file exported by using the -agmfmt option of the jpqexport.

  3. Check the number of definitions to be migrated.

    Execution agents or execution agent groups exceeding the maximum number of definitions cannot be migrated in the agent information.

    If the result file you exported in step 2 contains agent information that exceeds the maximum number of definitions, delete unnecessary definition lines from the result file so that the number of definitions is within the maximum.

    The maximum number of definitions in the agent information is as shown below.

    Maximum number of execution environment definitions for QUEUE jobs and submit jobs

    Agents: 1,024

    Queues: 8,192

    Maximum number of definitions in the agent information for JP1/AJS3 version 9

    Execution agents: 1,023

    Execution agent groups: 1,024

    To check the number of definitions in the agent information:

    (1) Use a text editor to open the output results in step 2.

    Using a text editor, open the file specified in the -co option in step 2.

    (2) Check the number of definitions to be migrated as execution agents.

    Count the lines that begin with "A", which indicate lines that define execution agents. However, do not count a line beginning with "A","@SYSTEM", which indicates a line that defines the default execution agent.

    If there are 1,024 or more lines to be processed, not all of the agent definitions can be migrated as execution agents, in which case, delete unnecessary agent definitions.

    (3) Check the number of definitions to be migrated as execution agent groups

    Count the lines that begin with "G", which indicate lines that define execution agent groups. If there are 1,025 or more lines to be processed, not all of the queue definitions can be migrated as execution agent groups, in which case, delete unnecessary queue definitions.

    For example, if the following information is output as a result of step 2, two agent definitions will be migrated as execution agents and two queue definitions will be migrated as execution agent groups.

     "A","@SYSTEM","Agent1","00:00-00:00=5","Ef",""
     "A","Agent1","Agent1","00:00-00:00=5","Ef",""
     "A","Agent2","Agent2","00:00-00:00=0","In",""
     "G","Agent2","Agent1:16,Agent2:16","In",""
     "G","que1",,"Ef",""
  4. Start the JP1/AJS3 service.

    If the JP1/AJS3 service is already running, you do not need to restart it.

  5. Import the information for the database for QUEUE jobs and submit jobs you exported in step 2 to the agent management database.

    Execute the ajsagtadd command to import the execution environment definitions for QUEUE jobs and submit jobs to the agent management database.

    For details about the ajsagtadd command, see ajsagtadd in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

    Example: When the import source file name is AgentBack.csv:

    ajsagtadd -f AgentBack.csv

(4) Note on migration of only a unit definition

To migrate only a unit definition from a version 8 or earlier JP1/AJS2 environment to a JP1/AJS3 environment on another host, the agent name specified as the target host in the unit definition must be defined as an execution agent#1.

If the unit definition to be migrated contains jobs that will be executed on the local host, perform either of the following operations:

#1

Use the ajsagtadd command to define the execution agent. For details about the ajsagtadd command, see ajsagtadd in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

#2

For details about the default execution agent, see 5.1.4 Default execution agent in the manual JP1/Automatic Job Management System 3 Overview.

(5) Note on the maximum number of concurrently executable jobs

When you perform a migration to JP1/AJS3 version 9 by using the procedure in (3) Migration of execution agent information (JP1/AJS3 - Manager only), two execution agents are created in the local host agent definition: the default execution agent and an execution agent that has the same name as the local host name.#

#

If the agent definition that has the same name as the local host name does not exist in version 8 or earlier, only the default execution agent is created. The execution agent that has the same name as the local host name is not created.

Care is required because the selected execution agent depends on how the execution agent is specified in the unit definition as described below.

In addition, the maximum number of concurrently executable jobs specified for the execution agent applies to each execution agent. If the default execution agent and the execution agent with the local host name are defined, the sum of the maximum number of concurrently executable jobs specified for these agents applies to the jobs that will be executed on the local host.

For example, if local host name host1 defined as an agent in version 8 or earlier is migrated to JP1/AJS3 version 9, two execution agents, @SYSTEM and host1, are defined. If the maximum number of concurrently executable jobs for host1 is set to 00:00-00:00=10 (maximum of 10 concurrent jobs, 24 hours a day), a maximum of 15 jobs can be executed concurrently. This is because the maximum number of concurrently executable jobs for the default execution agent is 00:00-00:00=5 (maximum of five concurrent jobs, 24 hours a day).

(6) Migration of execution registration status of jobnets (JP1/AJS3 - Manager only)

If JP1/AJS2 - Manager 08-50 or later is on the source host, you can use the functions for exporting and importing execution registration information for jobnets to migrate the execution registration status of jobnets to JP1/AJS3 - Manager on the destination host. However, the execution results of jobnets and jobs cannot be migrated.

For details about how to export and import execution registration information for jobnets, see 3.4 Backing up and recovering the execution registration status of jobnets by using the ajsrgexport and ajsrgimport commands in the JP1/Automatic Job Management System 3 Administration Guide.

If the version of JP1/AJS2 - Manager on the source host is 08-10 or earlier, execution registration information for jobnets cannot be exported. In this case, you need to register the jobnets again with JP1/AJS3 - Manager on the destination host.

(7) When the migration source host name and the migration destination host name are different

For details about the procedure when the migration source host name and the migration destination host name are different, see 7.9 Changing the JP1/AJS3 host settings in the JP1/Automatic Job Management System 3 Administration Guide.