Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


2.6.12 Migrating job definition scripts from UNIX to Windows

This subsection explains how to migrate UNIX job definition scripts to Windows job definition scripts. Before you perform the procedure, make sure that the encoding of the job definition scripts and environment files matches the value of the LANG environment variable that is used on the target platform.

To migrate from UNIX job definition scripts to Windows job definition scripts:

  1. Enable the path conversion functionality.

    To convert the separators used in UNIX job definition scripts to those supported by Windows platforms, specify the following parameter in the environment file:

    #-adsh_conf PATH_CONV_ENABLE / :
  2. Specify the setting needed for converting the specified paths.

    If program paths are specified explicitly in job definition scripts, specify the parameter shown below to convert the paths to paths used in the Windows environment. This example converts the paths of UNIX-compatible commands.

    #-adsh_conf PATH_CONV /opt/jp1as " "C:\\Program Files\\HITACHI\\JP1AS\\JP1ASE"
  3. Specify the setting needed for converting the separators around the shell variables that handle paths.

    If program paths are specified by using shell variables in job definition scripts, add the following command for each job definition script to convert the separators in the paths using shell variables:

    #-adsh_path_var VAR
  4. Select the path conversion setting. (Windows only)

    Specify the path conversion setting by using the PATH_CONV_RULE parameter.

    If you want to convert a part enclosed in double quotation marks ("), specify path conversion setting 1 as follows:

    #-adsh_conf PATH_CONV_RULE 1

    If you want to convert a part that is not enclosed in double quotation marks (") as well as a part enclosed in double quotation marks, specify path conversion setting 2 as follows:

    #-adsh_conf PATH_CONV_RULE 2
  5. Verify that conversion is enabled.

    In path conversion setting 1, verify that the paths to be converted are enclosed in double quotation marks (") as shown in the following example:

    "$VAR/cmd/ls" -l "/opt/jp1as/sample"

    In path conversion setting 2, verify that the path that you do not wish to convert is enclosed in single quotation marks (').

  6. Check the path conversion results.

    Perform a syntax check on the job definition script (adshexec -c command) and check the path conversion results in the generated script image. If the conversion results are not correct, either change the path conversion setting or edit the job definition script, and then perform a syntax check again.

The following shows examples of path conversion settings 1 and 2.