• Aucun résultat trouvé

IF DOMAINID='CNM01' I TEXT='PURGE DATE IS LATER THAN TODAY"S DATE'

Dans le document Who Should Use This Book (Page 45-48)

THEN EXEC (CMD('CLISTA') ROUTE (ONE * OPERl»;

The comparison-expressions are true if the message originated in domain CNM01 or if its text is PURGE DATE IS LATER THAN TODAY'S DATE.

NetView evaluates expressions linked with & before those linked with

I.

For

example, the following IF-THEN statement has three comparison-expressions linked with 1 and & operators:

IF DOMAINID='CNM01' I TEXT='PURGE DATE IS LATER THAN TODAY"S DATE'

& SYSID='MVS' THEN EXEC (CMD('CLISTA') ROUTE (ONE * OPERl)};

When processing this IF-THEN statement, NetView evaluates the TEXT and SYSID

comparison-expressions first, because they are linked with the'logical-and (&) operator, then evaluates the DOMAINID comparison-expression. This means both the

TEXT and SYSID comparison-expressions must be true or the DOMAINID

comparison-expression must be true.

Chapter 1. Definition Statement Reference

35

IF .. THEN

You can control the order in which comparison-expressions are evaluated by using parentheses to group comparisons that you want evaluated together. If, in the pre-vious example, you want NetView to evaluate the DOMAINID and TEXT

comparison-expressions first, code parentheses around them, as follows:

IF (DOMAINID='CNM01 ' I TEXT='PURGE DATE IS LATER THAN TODAY I IS DATE')

& SYSID='MVS ' THEN EXEC (CMD('CLISTA ' ) ROUTE (ONE * OPERl»;

When processing this IF-THEN statement, NetView evaluates the DOMAINID and TEXT

comparison-expressions first, because they are grouped within parentheses, then evaluates the SYSID comparison-expression. This means either the DOMAINIO or the

TEXT comparison-expressions must be true and the SYSID comparison-expression must be true.

The three kinds of comparison-expressions are:

• Parse-function

• Token-function

• Bitstring-function.

Parse-function Comparison-Expressions

Use the parse-function comparison-expression to compare alphanumeric character strings. The format is:

parse-name

The following parse-names can be used. These parse-names can also be assigned to a variable in the IF portion of an IF-THEN automation statement. The variable can then be used in the cmdstring parameter of the THEN portion of an

IF-THEN automation statement. See the explanation of the cmdstring parameter on page 42.

DOMAINID

indicates that you want to compare the NetView domain where the received message originated to compare-item. The compare-item is the 1- to a-character name of a NetView domain.

HDRMTYPE

JOBNAME

indicates that you want to compare the header type of the received message to compare-item. The compare-item is a 1-character message header type. See the description of the BUFHDR contol block in NetView Customization: Using Assembler for information on the possible values of HDRMTYPE.

indicates that you want to compare the name of the MVS job where the received message originated to compare-item .. The

compare-item is the 1- to 8-character name of an MVS job. JOBNAME

can only be used when executing NetView in an MVS environment.

Because the JOBNAME is the name of the job that originated the message, it may not always be the same as the name of the job to which the message is referring. For example, this can occur when

MVS issues a message about the NetView job. Also, JOBNAME can contain the name of an initiator (instead of the actual jobname)

MSGIO

SESSIO

SYSID

TEXT

(pos)

when a job is started or terminated. If the message is issued during startup or termination, extract the job name from the message text rather than using the JOBNAME variable. The value of JOBNAME is null if the message is not received through the subsystem. interface (551).

indicates that you want to compare the message identifier of the received message to compareMitem. The compare-item is a 1- to 10Mcharacter message identifier. The message identifier of the received message is the first ten characters of the first token of the message. If a reply 10 is sent with the message, it is not used as the first token.

indicates that you' want to compare the identifier of the TAF session from which the received message was sent to compare-item. The compare-item is a 1- to 8-characterTAF session identifier.

indicates that you want to compare the identifier of the MV5 system where the received message originated to compare-item. The compare-item is a 1- to 8-character MVS system identifier. SYSIO can only be used when executing NetView in an MVS environment. The value of SYSID is null if the message is not received through the sub-system interface (SSI).

indicates that you want to compare the text of the received message to compare-item. TEXT contains the entire message text.

The compare-item is a 1- to 255Mcharacter string.

specifies the position within parse-name where you want the comparison to begin. The default value is 1.

= 1...,=

=

indicates that parse-name must equal compare.-item for the comparison-expression to be true .

..., =

indicates that parse-name must not equal compare-item for the comparison-expression to be true.

compare-item

The compare-item for OOMAINID, HDRMTYPE, JOBNAME, MSGID, SESSID, and SYSID parse-names must be either a literal or a variable-name. The compare-item for the TEXT parse-name can be any combination of literals, variable-names, and place-holders.

literal

an alphanumeric character string that is compared with the message you want checked for automatic processing.

Chapter 1. Definition Statement Reference

37

IF-THEN

'.

Enclose a literal compare-item in single quotes. When using a single quote as part of the comparison string, code a second single quote following the first. For example, to compare a message such as:

Dans le document Who Should Use This Book (Page 45-48)

Documents relatifs