HP 3000 Manuals

BRWINFO [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation


HP ALLBASE/BRW Reference Manual

BRWINFO 

Use this intrinsic to get information about the parameters in a report or
report job file.  The information necessary to access such files will
have been returned in the parameter BRW_COMAREA by your previous call to
BRWOPEN. The BRWINFO intrinsic will return information on both HP
ALLBASE/BRW Standard Parameters (such as $USER, $USERPASS) and
user-defined parameters.

Call BRWINFO like this: 

BRWINFO (brw_comarea, brw_parameters)

Where the arguments have the following characteristics:

BRW_COMAREA 

A 332 byte array with the following structure:
_______________________________________
|                                     |
|     return_status       :   2 bytes;|
|     error_parm          :   2 bytes;|
|     for system use      : 328 bytes.|
_______________________________________

            

BRW_COMAREA has the same characteristics as in intrinsic BRWOPEN. That
is, you use the values in BRW_COMAREA that were returned by the previous
call to BRWOPEN. You must have made a successful call to intrinsic
BRWOPEN before calling BRWINFO.

BRW_PARAMETERS 

An integer array parameter.  Its structure is:
________________________________________________________________________
|                                                                      |
|     max_num_parms       :    2 byte integer;                         |
|     actual_num_parms    :    2 byte integer;                         |
|Then, for each parameter:                                             |
|                                                                      |
|     parm_name           :    20 bytes;                               |
|     parm_type           :     2 byte integer;                        |
|     parm_result_type    :     2 byte integer;                        |
|     result_length       :     2 byte integer;                        |
|     parm_mode           :     2 byte integer;                        |
|     upshift             :     2 byte integer;                        |
|     parm_value          :    55 bytes;                               |
|     reserve             :     1 byte.                                |
________________________________________________________________________

            

The array size is calculated using the formula below.

       No. of bytes =  (max_num_parms * 86) + 4

The intrinsic returns the actual number of parameters found in the job
template header or report execution file, and the BRW_PARAMETERS array is
filled with information about each parameter.

Each item of the parameter BRW_PARAMETERS is discussed in detail below.

max_num_parms :  2 bytes; 

This item is an integer and is REQUIRED by the intrinsic.  You must set
max_num_parms to the maximum number of parameters you allow in a job
template header or in the report execution file, that is, those
parameters defined between BEGINPARMS and ENDPARMS or defined within the
report specification, plus the HP ALLBASE/BRW Standard Parameters ($USER,
$USERPASS, $GROUP, $GROUPPASS, $ACCT, $ACCTPASS, $REPORT, $SCHEDULE,
$FORMAL-PRINTFILE, $DEVICE, $OUTPRI, $NBR-COPIES, $INPRI, $CCTL, and
$ENVIRONMENT). 

actual_num_parms :  2 bytes 

Integer in which the BRWINFO intrinsic returns the actual number of
parameters found in the job template header or report execution.

parm_name :  20 bytes; 

Name of the parameter.

parm_type :  2 bytes; 

Integer that indicates the type of the parameter; that is, either
Single-value, List- of-values, or Comparison Predicate.

        0 = Single Value
        1 = List of Values
        3 = Comparison Predicate

parm_result_type :  2 bytes; 

Integer that indicates the type of the parameter result; that is, either
an HP ALLBASE/BRW Standard Parameter, or user-defined parameters of type
String, Date, Time, Integer, Numeric Fixed, or Real.

     0 = HP ALLBASE/BRW Standard Parameter
     1 = String
     2 = Date
     3 = Time
     4 = Integer
     5 = Numeric Fixed
     6 = Real

result_length :  2 bytes 

If the result is of type String, this is an integer showing the length of
the string.

     parm_mode : 2 bytes;

Integer that indicates whether the parameter is Required or Frozen.

      0 = Parameter is neither Required nor Frozen
      1 = The parameter value is Frozen (cannot be
          altered)
      2 = A parameter value is Required

upshift :  2 bytes; 

Integer that indicates whether any letters in the parameter should be
shifted to upper-case.

      0 = characters are not shifted to upper-case
      1 = characters are shifted to upper-case

parm_value :  55 bytes; 

Byte array containing the value of the parameter.

reserve :  1 byte; 

Not used.


NOTE Note 1 If the parameter is an HP ALLBASE/BRW Standard Parameter of type $USER, $GROUP, $ACCT, $USERPASS, $GROUPPASS, or $ACCTPASS, parm_name will be set to the standard parameter name (for example, $USER). The parm_value of the HP ALLBASE/BRW Standard Parameters $USER, $GROUP, or $ACCT will be set to the log-on value. The parm_value of an HP ALLBASE/BRW Standard Parameter password ($USERPASS, $GROUPPASS, or $ACCTPASS) will be set to spaces. Note 2 If you use BRWINFO to read parameter information from a report job file, the items $FORMAL- PRINTFILE, $DEVICE, $OUTPRI, $CCTL, $ENVIRONMENT, and $COPIES will all be read from the value in the $PRINTFILE parameter.


MPE/iX 5.0 Documentation