HP NonStop G-Series User Manual
Page 164
![background image](/manuals/397027/164/background.png)
Creating an Enform Report From Measure Data
Measure User’s Guide — 520560-003
A- 6
Creating User-Defined Records
> CONTAINS "OSIMAGE"))/1000000),
>disc-time := ((SUM(cpu-busy-time
> OVER process.cpu-num WHERE
> priority >= 220))/1000000),
>user-time := ( ((SUM(cpu-busy-time OVER
> process.cpu-num))/1000000)
> -((SUM(cpu-busy-time OVER
> process.cpu-num WHERE program-file-name
> CONTAINS "OSIMAGE"))/1000000) )
>);
The FIND statement begins by naming the new record to receive the values listed
in the statement. The remainder of the FIND statement is much like the LIST
statement. However, instead of displaying the specified values, the FIND statement
writes the specified values to the new record.
Each field value specified in the FIND statement must include the name of the field
in the new record that is to receive the field value. In the example, the first field
value specified is PROCESS.CPU-NUM. The new record has a CPU-NUM field, so
the value of PROCESS.CPU-NUM is assigned to BUSYTIME.CPU-NUM. Use of
the BY clause causes one BUSYTIME record to be created for each CPU.
The remaining field values in the FIND statement do not have matching field
names in the new record, so the FIND statement explicitly names the field in the
new record that is to receive the value specified in the FIND statement. For
example, the PROC-TIME field receives the sum of all
PROCESS.CPU-BUSY-TIME fields in the CPU.
Because the values being assigned to the new record are grouped according to
the CPU-NUM field (the OVER item), the CPU-NUM field must be included in the
new record.
5. You can now use the new record as you would any other record. This example
displays two of the new fields. Although the user-defined variable PROC-TIME
cannot be used as a BY item, the field PROC-TIME can.
>LIST BY PROC-TIME,SYS-TIME;
PROC-TIME SYS-TIME
---------------- ----------------
218.423 134.772
4.192 4.036
For more examples of DDL RECORD statements and FIND queries for CPU and
PROCESS data files, see
Appendix B, Examples of RECORD Statements and FIND
.