Hitachi

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


2.6.2 Converting path names

Define the path conversion settings as parameters so that the path names used in job definition scripts can be used in both Windows and UNIX.

In JP1/Advanced Shell, you can specify paths in job definition scripts according to the platform as shown in the following.

Table 2‒14: Rules for paths supported in Windows and UNIX environments

Item

Windows environment

UNIX environment

Directory separator

\\#1

/

Path separator

;

:

Capitalization of path name

Case sensitive#2

Case sensitive

Absolute path

A path name begins with drive-letter:\\#1, #3

A path name begins with /

#1

In a Windows environment, use \\ because \ is treated as an escape character. Alternatively, enclose the entire path name in single quotation marks.

#2

When path names are converted, they are case sensitive also in a Windows environment.

#3

UNC names are also supported. When you define path name conversion in job definition scripts, make sure that the path obtained after conversion will not end with a shared name (including a name ending with \). If a path name ends with a shared name, operation is not guaranteed.

To convert paths according to the above rules, the following definitions are required in the parameters:

The following explains the parameters used to convert path names.

Organization of this subsection

(1) Example of file path conversion (path conversion setting 1)

This example shows how job definition scripts before execution are converted according to the information in the environment file.

  1. Path /home/hitachi/bin is converted to C:\\Program Files according to the PATH_CON parameter definition.

    Also, the directory separator is converted from / to \\ according to the PATH_CONV_ENABLE parameter definition.

  2. Path /tmp is converted to C:\\temp according to the PATH_CONV parameter definition.

    Also, the directory separator is converted from / to \\ according to the PATH_CONV_ENABLE parameter definition.

(2) Example of file path conversion (path conversion setting 2)

This example shows how job definition scripts before execution are converted according to the information in the environment file.

  1. Because shell variable DIR01 that handles path names is defined in the job definition script before conversion, shell variable DIR01 is enclosed in double quotation marks (") and then a directory separator is added after the shell variable.

  2. Because the top of the character string matches the conversion rule, it is enclosed in double quotation marks ("). The path separator is converted to ";". Furthermore, because the character string was converted to the path, variable name PATH is also enclosed in double quotation marks.

  3. Conversion takes place because the arithmetic expression matches the path conversion setting. To suppress this conversion, the job definition script must be corrected with either of the following methods:

    • Enclose the variable in single quotation marks such as let ANS='BB/AA'.

    • Add $ at the beginning of the variable name to be referenced such as let ANS=$BB/$AA.

(3) Notes