Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Command Reference


5.2.14 Log-file monitoring job definition

This paragraph explains how to specify a log-file monitoring job definition.

The following gives the format of and the parameters for a log-file monitoring job definition.

Format
[lftpd=[!]"trap-data-1"[:[!]"trap-data-2"...];]...
[lffnm="log-file-name";]
[lfdft={s|s2|w1|w2};]
[lfrft={v:'[\]delimiter'|f:record-length};]
[lfhds={l:header-row-count|s:header-size};]
[lfmks=[!]"data-1-other-than-log-information"
     [: [!]"data-2-other-than-log-information"...];]
[lfsiv=file-monitoring-interval;]
[lfmxl=maximum-event-data-length;]
[lfsrc={y|n};]
[lfcre={y|n};]
[jpoif=macro-variable-name:passing-information-name;]
[etm=n;]
[fd=time-required-for-execution;]
[ex="execution-agent-name";]
[ha={y|n};]
[eu={ent|def};]
[ets={kl|nr|wr|an};]
[mm={and|or};]
[nmg={y|n};]
[eun=name-of-the-unit-whose-end-is-being-waited-for;]
[ega={exec|execdeffer|none};]
[uem={y|n};]
Parameters
lftpd=[!]"trap-data-1"[: [!]"trap-data-2"...];

Define data in a log file to be trapped.

You can set multiple pieces of trap data in a single lfptd parameter (based on AND conditions). You can also set more than one lfptd parameter (based on OR conditions). You can set up to 2,048 bytes of pieces of data.

If you want to use a double quotation mark (") or a hash mark (#) as a character, prefix the character by #. That is, use #" instead of " and use ## instead of #.

Note that you can use a regular expression to specify trap data.

lffnm="log-file-name";

Specify the file name that is to be monitored.

You can set a character string of 1 to 256 bytes. You can set up to eight log file names at one time in the format of lffnm="log-file-name".

If you want to use a double quotation mark (") or a hash mark (#) as a character, prefix the character by #. That is, use #" instead of " and use ## instead of #.

You can specify a macro variable.

lfdft={s|s2|w1|w2};

Define the output format of a log file to be trapped. The default is s.

  • s: Sequential file (Data is appended to one log file, and when the file is filled to its capacity, a new log file is created with another name, and new log data is written to the new file.)

  • s2: Sequential file (A log file with the same name is continuously used for logging by creating a new file with the same name after backing up the current file with another name or deleting the current file.)

    If the job execution host is a Windows host, you can specify this option in JP1/AJS3, or in JP1/AJS2 08-00 or a later version if the JP1/Base version is 08-10 or later.

    If the job execution host is a UNIX host, you can specify this option in JP1/AJS3, or in JP1/AJS2 07-00 or a later version if the JP1/Base version is 07-00 or later.

  • w1: Wraparound (When log data is written to the end of the log file, the existing data is overwritten with new data, starting with the beginning of the file.)

  • w2: Wraparound (When log data is written to the end of the log file, the existing data is deleted and then new data is written from the beginning of the file.)

lfrft={v:'[\]delimiter'|f:record-format};

Define a record format for log data to be trapped. The default is v:'\n'.

  • v:'[\]delimiter': Delimits rows by a variable-length record. You can set a character string of 1 byte for a delimiter.

  • f:record-length: Delimits rows by a fixed-length record. You can set a character string of 1 to 9,999,999 bytes for record length.

lfhds={l:header-row-count|s:header-size};

Define a header.

  • l:header-row-count: If the log file to be trapped begins with a header, specify the number of header rows.

    You can set 0 to 99,999 header rows.

  • s:header-size: Specify a header size if the log file to be trapped beings with a header for which you cannot specify a row count. For example, you cannot specify a row count if the format of binary data or records is different from that of a log record.

    You can set 0 to 9,999,999 bytes for a header size.

lfmks=[!]"data-1-other-than-log-information"[:[!]"data-2-other-than-log-information"...];

If the log file to be trapped contains data other than log information, define the data.

You can set up to 1,024 bytes of multiple data items.

If you want to use a double quotation mark (") or a hash mark (#) as a character, prefix the character by #. That is, use #" instead of " and use ## instead of #.

Note that you can use a regular expression to specify data.

OR conditions apply if you specify more than one lfmks parameter, while AND conditions apply if you specify more than one item of data in a single lfmks parameter.

lfsiv=file-monitoring-interval;

Define a time interval to search the log file.

You can set 1 to 86,400 seconds. The default is 10.

lfmxl=maximum-event-log-data-length;

Define how many top bytes are to be set as event data in one row in a specified log file to be entered.

You can set 2 to 512 bytes. The default is 512.

lfsrc={y|n};

Define whether to enter data from its top. The default is n.

  • y: Enters data from its top.

  • n: Does not enter data from its top.

lfcre={y|n};

Define whether to cause an error if a specified log file is missing when you have started a log file monitoring job. The default is n.

  • y: Error

  • n: Opens the file repeatedly until the log file is created.

jpoif=macro-variable-name:passing-information-name;

Set macro-variable-name as a character string of no more than 64 bytes, using the format ?AJS2xxxxx?. In the xxxxx part, you can use uppercase alphabetic characters (A to Z), numerals (0 to 9), and periods (.).

This parameter can contain up to 2,048 bytes in the "jpoif=macro-variable-name:passing-information-name;".

This parameter makes it possible to take over event information of subsequent PC jobs, Unix jobs, flexible jobs, HTTP connection jobs, and action jobs.

etm=n;

Define the time-out period using the relative minutes from the start time. You can set 1 to 1,440 minutes. This parameter is invalid for a job within the start condition.

fd=time-required-for-execution;

Define the time-required-for-execution within which the job is expected to be terminated.

You can specify a decimal value between 1 and 1,440 (minutes).

If you define this parameter as a start condition, it is disabled when a job is executed.

ex="execution-agent-name";

Define the name of the execution agent that is used to execute jobs.

You can set a character string of 1 to 255 bytes.

If you want to use a double quotation mark (") or a hash mark (#) as a character, prefix the character with #. That is, use #" instead of ", and use ## instead of #.

You can specify a macro variable.

ha={y|n};

Define whether to suspend job execution. The default is n. This parameter is invalid for a job within the start condition.

  • y: Suspends jobnet execution.

  • n: Does not suspend jobnet execution.

eu={ent|def};

Define the JP1 user who executes the job. The default is ent. This parameter is ignored in an event job.

  • ent: The JP1 user who registered the jobnet executes the job.

  • def: The JP1 user who owns the job executes the job.

ets={kl|nr|wr|an};

Define the state of the event job after the execution time-out period elapses. The default is kl. This parameter is invalid for a job within the start condition.

  • kl: Killed

  • nr: Ended normally

  • wr: Ended with warning

  • an: Ended abnormally

mm={and|or};

Define the wait method with respect to the specified units whose ends are being waited for.

The default is and.

  • and: Start executing at completion of all units whose ends are being waited for.

  • or: Start executing at completion of one of the units whose ends are being waited for.

nmg={y|n};

Define the behavior when there are no generations of the root jobnet for the specified unit whose end is being waited for.

The default is n.

  • y: Start executing.

  • n: Do not start executing.

eun=name-of-the-unit-whose-end-is-being-waited-for;

Define the full-path name of a unit whose end is being waited for.

To specify multiple units, repeat the parameter. You can specify a maximum of 32 units.

You can use a character string of 1 to 930 bytes as the unit name.

ega={exec|execdeffer|none};

Specify the behavior when a jobnet with start conditions is specified as the jobnet whose end is being waited for and the execution generation ends abnormally.

If you omit this option, the system assumes none.

  • exec: Start executing.

  • execdeffer: Do not start executing. However, if the execution generation is in the Skipped so not exe. status, start executing.

  • none: Do not start executing.

uem={y|n};

Specify the behavior when a jobnet with start conditions is specified as the jobnet whose end is being waited for and the monitoring generation is in the Unmonitored + Ended status.

If you omit this option, the system assumes n.

  • y: Start executing.

  • n: Do not start executing.

Cautionary notes
  • The log file name can also contain space characters and symbols. However, if you want to use a special character, such as a double quotation mark ("), as a normal character, prefix a backslash (\) to the special character.

    For example: log\#"file

  • Suppose that you want to pass on (inherit) the passing information received in an event job to the parameters of a standard job or action job. If the passing information contains a double quotation mark ("), you must prefix the \ sign to the passing information. If you do not prefix the \ sign, even if the received information is inherited, a problem occurs: for example, the double quotation mark is ignored. You can avoid this problem by setting the option that enables any data containing a double quotation mark to serve as passing information as specified.

    For the specific settings, see the following sections, depending on your OS. On a Windows host, see 6.3.4 Passing event data containing double quotation marks in the JP1/Automatic Job Management System 3 Configuration Guide. On a UNIX host, see 15.3.4 Passing event data containing double quotation marks in the JP1/Automatic Job Management System 3 Configuration Guide.