GDDM V3R2 Diagnosis
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Coding TRCESTR statements

GDDM V3R2 Diagnosis
SC33-0870-01



A set of TRCESTR statements consists of one or more


           ADMMDFT TRCESTR='xxxxxxxxxxxxx'

statements in an external default module or file. Note that:

  • You must have a space before ADMMDFT.
    
    
  • If you are including your TRCESTR statements in an external default file, rather than a default module, you can begin the statements with DEFAULT instead of ADMMDFT.
    
    
  • Each character string can be up to 256 characters long.
    
    
  • All the TRCESTR statements in the defaults module or file are used to make up a single trace program; this program must conform to the syntax defined in Appendix D.
    
    

A set of trace statements can consist of one action or several actions to be executed whenever the trace processor is invoked. It can be as simple as:


     [label] ADMMDFT TRCESTR='FLOW'

This statement specifies that trace is to be invoked and that standard trace statements (known as flow statements) are to be produced in the trace output. Every module boundary is traced on entry and exit.

Remember that the ADMMDFT statement must not begin in column 1.

You can restrict the amount of trace output produced. If, for example, you want trace output from the ICU only, you can specify:


     [label] ADMMDFT TRCESTR='IF ICU THEN FLOW'

You can specify several actions in one statement. For example, the statement:


     [label] ADMMDFT TRCESTR='IF ICU THEN FLOW PARTIO TIME'

requests a partial transmission trace from the ICU, with standard output. Specifying TIME causes a time stamp to be included in the trace output for each traced module.

The general form of a statement is:


     [label] ADMMDFT TRCESTR='IF event THEN actions ELSE actions'

The event and action functions that you can specify are defined in "Functions available with the TRCESTR keyword" in topic 2.7.

Compound statements are allowed. Use semicolons to separate all statements within the compound statement. The previous example could be written:


     [label] ADMMDFT TRCESTR='IF ICU THEN DO FLOW; PARTIO; TIME END'

IF statements can be nested:


     [label] ADMMDFT TRCESTR='IF ESI THEN IF COUNT(4) THEN DO FLOW;'
             ADMMDFT TRCESTR='PARTIO; TIME END'

They can be nested within compound statements:


     [label] ADMMDFT TRCESTR='IF TSI THEN                    '
             ADMMDFT TRCESTR=' DO                            '
             ADMMDFT TRCESTR='  FLOW ;                       '
             ADMMDFT TRCESTR='  IF NAME(''ADMLN*'') THEN     '
             ADMMDFT TRCESTR='   DO                          '
             ADMMDFT TRCESTR='    LIST(100,200);             '
             ADMMDFT TRCESTR='    PARTIO(ON)                 '
             ADMMDFT TRCESTR='   END;                        '
             ADMMDFT TRCESTR='  TIME                         '
             ADMMDFT TRCESTR=' END                           '

Note that, if you specify a variable character string in a TRCESTR statement, such as ADMLN* in the statement using the NAME event function above, you must include the character string in double quotation marks or a pair of single quotation marks, and it must be in uppercase.

The relational expression in an IF statement can consist of a combination of events. For example:


     [label] ADMMDFT TRCESTR='IF CMPNT & (ICU | FSM) THEN FLOW'

This example can also be written:


     [label] ADMMDFT TRCESTR='IF CMPNT AND (ICU OR FSM) THEN FLOW'

Signed numeric values can be expressed as binary numbers (B'011100'), decimal numbers (-123445) or hexadecimal numbers (X'789AB').

The contents of an address (%), a general-purpose register (GR), or a floating-point register (FR), can be referred to in a relational expression or as a parameter:


     [label] ADMMDFT TRCESTR='IF ENTRY & ESI THEN LIST((1 GR +4)%,4)'
             ADMMDFT TRCESTR='IF 13 GR >= X''0F1B2'' THEN FLOW'

Note that, if you use % to access an address for which trace does not have read access, an abnormal termination occurs in module ADMATPX for the unacceptable address.

You can trace on a component RCP code. These are listed in Appendix E, "Request Control Parameter codes" in topic E.0. For example, to trace entry and exit parameters for ASREAD:


     [label] ADMMDFT TRCESTR='DO IF CMPNT THEN                     '
             ADMMDFT TRCESTR='   IF (1 GR +4)%%=X''C100000'' THEN  '
             ADMMDFT TRCESTR='   PARMSF   END                      '

In this example, nesting ensures that the address is evaluated only after CMPNT is satisfied, thus eliminating the risk of an abend.

All the relational expressions in an IF statement are evaluated on every occasion (no jumping code); thus the following two examples are equivalent:


     [label] ADMMDFT TRCESTR='IF COUNT(4) & LIMIT(2,12) THEN FLOW'
             ADMMDFT TRCESTR='IF LIMIT(2,12) & COUNT(4) THEN FLOW'

If you want the effect that would be produced by jumping code, you must explicitly code nested IF statements:


     [label] ADMMDFT TRCESTR='IF COUNT(4) THEN IF LIMIT(2,12) THEN FLOW'
             ADMMDFT TRCESTR='IF LIMIT(2,12) THEN IF COUNT(4) THEN FLOW'

You can use the following operators in TRCESTR statements - where words are used, uppercase and lowercase letters are both acceptable:


   +   add                   =   equal to
   -   subtract              =  not equal to
   *   multiply              <   less than
   /   divide                >   greater than
   &   and                   <=  less than or equal to
   |   or                    >=  greater than or equal to
      not


The % sign can be used to indicate the contents of an address, as described on topic 2.6. It is also used as a token on the PRINT function, as described on topic 2.7.3.16.

Note: If you are compiling or assembling the TRCESTR statements, ampersands (&) within the statements must be repeated. For example:


     [label] ADMMDFT TRCESTR='IF CMPNT && ICU THEN FLOW'

You can put a CLEAR statement at the start of your set of TRCESTR statements, and a FORCE statement at the end. These control the priority if you have more than one set of TRCESTR statements. The next section of this topic gives examples of these functions.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012