HP 3000 Manuals

Report Job File Body [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation


HP ALLBASE/BRW Reference Manual

Report Job File Body 

The report job file body is an MPE job containing parameters for which
actual parameter values are inserted.  Each parameter name in the body
must be preceded by a ^ character and must have been defined in the
report job file Header.

Logon Command 

The report job file body must begin with the logon command for the job,
!JOB. The logon command can be defined for a fixed user, account and
group, for example:

     !JOB Expenses,MGR.MYACCT,PUB

In addition, you can define a logon command that includes standard
parameters, for example:

     !JOB Expenses,$user/^$userpass.^$ACCT/^$ACCTPASS,PUB

When you start the report job file, HP ALLBASE/BRW prompts for user name,
account name and the passwords on the Request Report screen.

You can use multiple JOB commands in a report job file body.

Parameters 

Standard parameters must be defined inside the report job file header,
but outside the BEGINPARMS/ ENDPARMS clause.  Both user-defined and
standard parameters can be used anywhere in the job file body.  You must
specify a ^ character followed by the parameter name, as shown here.

     ^sales-area

HP ALLBASE/BRW replaces the parameter with an actual value when the
report job file is started.

You can restrict the length of a user-defined parameter with a result of
type String using replacement options, for example:

     ^sales-area[=16]

In this example, the length of the parameter value is 16 characters.
Longer values are truncated on the right; shorter values are padded with
blanks for this case.

     ^sales-area[<=16]

In the above example, parameter values longer than 16 characters are
truncated on the right.

     ^sales-area[>=4]

In above example parameter values shorter than 4 characters are padded
with blanks.

A replacement option only effects the replacement where it is specified.

To supply parameters for the single reports executed in the report job
file, you must specify the parameter name defined in the report followed
by a ^ character and the parameter name defined in the report job file
header, as shown here:

     !RUN BRWEXEC.PUB.SYS
     salesan2.rf
     percent-sales ^sales-%

In this example, percent-sales is the name in the report and ^sales-% is
the name in the report job file.

This allows you to define names for the parameters in the report job file
other than those defined in the report.

For more about running BRWEXEC standalone, see "Requesting Reports with
BRWEXEC" earlier in this chapter.

$Printfile 

The $Printfile parameter must be specified in the first column of the
line where the FILE command for the print file characteristic is needed.
For example:

      .  .  .

      ^$PRINTFILE
      !CONTINUE
      !RUN BRWEXEC.PUB.SYS
      salesan2

      .  .  .

$Parms 

This command is used when you need all parameters in a report, and the
parameter names in the report and in the report job file are the same.
It causes all parameter names and their values to be inserted at this
place, for example:

     DEFINE JOB TEMPLATE
     BEGINPARMS
        sales-area     (P, SU16)
        sales-%        (P,  I)  >=  10
        product-line   (P,  SU2)
     ENDPARMS
     !JOB   salesan, mgr.rsdemo,pub

      .  .  .

     !RUN BRWEXEC.PUB.SYS
     salesan2.rspec
     ^$PARMS
     !EOD

     .  .  .

The !EOD command takes the place of the // you enter when you run BRWEXEC
interactively.

With actual parameter values, the program looks like this:

     !RUN BRWEXEC.PUB.SYS
     salesan2.rspec
     sales-area         SOUTH
     sales-%            >= 10
     product-line
     !EOD


NOTE BRWEXEC ignores parameters that are specified in the job but not in the report.


MPE/iX 5.0 Documentation