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


PRINT

GDDM V3R2 Diagnosis
SC33-0870-01




    ________________________________________________________________________ 
   |                                                                        |
   | PRINT("control_string"[, remaining_parameters])                        |
   |                                                                        |
   |________________________________________________________________________|


This causes a single line to be inserted in the trace output file.

The control_string parameter is a character string defining the format of the line. It specifies literal text and sufficient format controls for the following parameters. Format controls should be separated by the underscore character '_', which becomes a blank in the output.

The format controls are:


     %JW.nc

where:

%
Is a token indicating a substitution format control.

J
Is an optional control specifying either:

+
Right justified, the default.
-
Left justified.

W
Is an optional control that specifies the minimum field width. If no value is given, the PRINT function chooses a suitable value. If the value specified is too small, it is overridden with the value that the PRINT function would have used, had no value been specified.

n
Is an optional control that specifies:

  • For character strings, the maximum number of characters to be printed. If not specified, the default is all the characters in the string.
    
    
  • For floating-point numbers, the number of digits to be printed to the right of the decimal point. If this number is not specified, the default is 1. This prevents a floating-point number being mistaken for an integer.
    
    

c
Is a control character that must be specified. It determines the type of formatting performed. Possible values are:

B or b
Binary format.

The corresponding parameter should be a fullword. Output has a single leading zero to minimize the binary string length.

D or d
Decimal format.

The corresponding parameter should be a fullword.

E or e
Exponential format.

The corresponding parameter should be in short form floating-point format.

F or f
Floating-point format.

The corresponding parameter should be in short form floating-point format.

S or s
Character string format.

The corresponding parameter should be a character string.

X or x
Hexadecimal format.

The corresponding parameter should be a fullword.

The decimal point is only required if the optional n control is specified.

The remaining_parameters are the items that are to be formatted as directed by the control string and then sent to the trace file.

If there are more remaining_parameters than format controls, the excess parameters are ignored.

If there are more format controls than remaining_parameters, a single * is put in the trace file for each missing parameter.

Here are some examples of PRINT:

  • PRINT("Trace_example") produces:
    
    
    
             Trace example
    

  • PRINT("%s","trace_example") produces:
    
    
    
             trace example
    

  • PRINT("%20s","trace_example") produces:
    
    
    
                    trace example
    

    1---5----0----5----0----5----0 - (This line indicates where the characters appear.)

  • PRINT("%-20s","trace_example") produces:
    
    
    
             trace example
    

    1---5----0----5----0----5----0

  • PRINT("%-20.10s","trace_example") produces:
    
    
    
             trace example
    

    1---5----0----5----0----5----0

  • PRINT("Data_in_reg_%d_is_%x", 5, 5 GR) produces:
    
    
    
             Data in register 5 is 02447E
    

    if the data in general-purpose register 5 is X'02447E'.
    
    

Notes:

1. All spaces within a character string must be written as underscore (_) in the TRCESTR string.

2. Because they are within a TRCESTR statement, the control_string, and each of the remaining_parameters that is a character string, must be within either double quotation marks or a pair of single quotation marks.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012