In this section: |
The display commands LIST and PRINT list the individual values of the fields you specify in your report request. LIST numbers the items in the report. PRINT does not number the items.
You can easily display all of the fields in the data source by specifying an asterisk (*) wildcard instead of a specific field name, as described in Displaying All Fields.
For all PRINT and LIST requests, the number of records retrieved and the number of lines displayed are the same. In addition, there is no order to the report rows. The PRINT and LIST commands display all the values of the selected fields found in the data source in the order in which they are accessed. The order in which data is displayed may be affected by the AUTOPATH setting. For more information, see Optimizing Retrieval Speed for FOCUS Data Sources, and the documentation on SET parameters in the TIBCO WebFOCUS® Developing Reporting Applications manual.
In general, when using PRINT or LIST, the order of the values displayed in the report depends on whether or not the field is a key field, as described in the Describing Data With TIBCO WebFOCUS® Language manual.
Alternatively, you can sort the values using the BY or ACROSS sort phrases. When LIST is used in a request that includes a sort phrase, the list counter is reset to 1 every time the value in the outermost sort field changes. For more information on sorting, see Sorting Tabular Reports.
PRINT * or PRINT SEG.* prints only the real fields in the Master File. To print virtual fields, explicitly reference them in the PRINT statement (PRINT * virtual field name). This is true even if the virtual field name is a re-defines of a real field.
For PRINT and LIST syntax, see Use Display Commands in a Request.
To display the values of individual fields, use the PRINT command. The following request displays the values of two fields, LAST_NAME and FIRST_NAME, for all employees.
TABLE FILE EMPLOYEE PRINT LAST_NAME AND FIRST_NAME END
The following shows the report output.
LAST_NAME --------- |
FIRST_NAME ---------- |
STEVENS SMITH JONES SMITH BANNING IRVING ROMANS MCCOY BLACKWOOD MCKNIGHT GREENSPAN CROSS |
ALFRED MARY DIANE RICHARD JOHN JOAN ANTHONY JOHN ROSEMARIE ROGER MARY BARBARA |
To number the records in a report, use the LIST command.
TABLE FILE EMPLOYEE LIST LAST_NAME AND FIRST_NAME END
The following shows the report output.
LIST ---- 1 2 3 4 5 6 7 8 9 10 11 12 |
LAST_NAME --------- STEVENS SMITH JONES SMITH BANNING IRVING ROMANS MCCOY BLACKWOOD MCKNIGHT GREENSPAN CROSS |
FIRST_NAME ---------- ALFRED MARY DIANE RICHARD JOHN JOAN ANTHONY JOHN ROSEMARIE ROGER MARY BARBARA |
You can easily display all of the fields in the left path of the data source by specifying an asterisk (*) wildcard instead of a specific field name. For additional information about Master File structures and segment paths, including left paths and short paths, see the Describing Data With TIBCO WebFOCUS® Language manual.
The following request produces a report displaying all of the fields in the EDUCFILE data source.
TABLE FILE EDUCFILE LIST * END
The following shows the report output.
LIST ---- |
COURSE_CODE ----------- |
COURSE_NAME ----------- |
DATE_ATTEND ----------- |
EMP_ID ------ |
1 |
101 |
FILE DESCRPT & MAINT |
83/01/04 |
212289111 |
2 |
101 |
FILE DESCRPT & MAINT |
82/05/25 |
117593129 |
3 |
101 |
FILE DESCRPT & MAINT |
82/05/25 |
071382660 |
4 |
101 |
FILE DESCRPT & MAINT |
81/11/15 |
451123478 |
5 |
101 |
FILE DESCRPT & MAINT |
81/11/15 |
112847612 |
6 |
102 |
BASIC REPORT PREP NON-PROG |
82/07/12 |
326179357 |
7 |
103 |
BASIC REPORT PREP NON-PROG |
83/01/05 |
212289111 |
8 |
103 |
BASIC REPORT PREP NON-PROG |
82/05/26 |
117593129 |
9 |
103 |
BASIC REPORT PREP NON-PROG |
81/11/16 |
112847612 |
10 |
104 |
FILE DESC & MAINT NON-PROG |
82/07/14 |
326179357 |
11 |
106 |
TIMESHARING WORKSHOP |
82/07/15 |
326179357 |
12 |
202 |
WHAT'S NEW IN FOCUS |
82/10/28 |
326179357 |
13 |
301 |
DECISION SUPPORT WORKSHOP |
82/09/03 |
326179357 |
14 |
107 |
BASIC REPORT PREP DP MGRS |
82/08/02 |
818692173 |
15 |
302 |
HOST LANGUAGE INTERFACE |
82/10/21 |
818692173 |
16 |
108 |
BASIC RPT NON-DP MGRS |
82/10/10 |
315548712 |
17 |
108 |
BASIC RPT NON-DP MGRS |
82/08/24 |
119265415 |
18 |
201 |
ADVANCED TECHNIQUES |
82/07/26 |
117593129 |
19 |
203 |
FOCUS INTERNALS |
82/10/28 |
117593129 |
How to: |
You can easily display all fields in a segment by adding the prefix "SEG." to any field in the desired segment.
seg.anyfield
where:
Is any field that is in the desired segment.
The following request produces a report displaying all of the fields in the segment that contains the QTY_IN_STOCK field.
TABLE FILE CENTINV PRINT SEG.QTY_IN_STOCK BY PRODNAME NOPRINT END
The following shows the report output.
When using display commands, it is important to understand the structure of the data source and the relationship between segments, since these factors affect your results. You can use the CHECK command PICTURE option to display a diagram of the data source structure defined by the Master File.
You can also display the retrieval order of a data source using the CHECK command PICTURE RETRIEVE option. It should be noted that retrieval is controlled by the minimum referenced subtree. For more information, see Understanding the Efficiency of the Minimum Referenced Subtree in the Describing a Group of Fields chapter in the Describing Data With TIBCO WebFOCUS® Language manual.
To display the structure diagram of the CENTORD data source, which is joined to the CENTINV and CENTCOMP data sources, issue the following command:
CHECK FILE CENTORD PICTURE
The following shows the structure diagram output.
NUMBER OF ERRORS= 0 NUMBER OF SEGMENTS= 4 ( REAL= 2 VIRTUAL= 2 ) NUMBER OF FIELDS= 23 INDEXES= 4 FILES= 3 NUMBER OF DEFINES= 8 TOTAL LENGTH OF ALL FIELDS= 139 SECTION 01 STRUCTURE OF FOCUS FILE CENTORD ON 07/18/03 AT 11.06.34 OINFO 01 S1 ************** *ORDER_NUM **I *STORE_CODE **I *PLANT **I *ORDER_DATE ** * ** *************** ************** I +-----------------+ I I I STOSEG I PINFO 02 I KU 03 I S1 .............. ************** :STORE_CODE :K *PROD_NUM **I :STORENAME : *QUANTITY ** :STATE : *LINEPRICE ** : : * ** : : * ** :............: *************** JOINED CENTCOMPFO************** I I I I INVSEG 04 I KU .............. :PROD_NUM :K :PRODNAME : :QTY_IN_STOCK: :PRICE : : : :............: JOINED CENTINV FOCUS A1
To display the retrieval order of the EMPLOYEE data source, which is joined to the JOBFILE and EDUCFILE data sources, issue the following command:
CHECK FILE EMPLOYEE PICTURE RETRIEVE
The following shows the command output that adds the numbers that display at the top left of each segment, indicating the retrieval order of the segments. A unique segment such as FUNDTRAN is treated as a logical addition to the parent segment for retrieval. FUNDTRAN and SECSEG are unique segments, and are therefore treated as part of their parents.
The following shows the retrieval order:
The following request produces a report displaying all of the fields on the left path of the EMPLOYEE data source.
TABLE FILE EMPLOYEE PRINT * END
The following shows a list of the output fields the previous request produces. Due to the size of the report, only the fields for which all instances will be printed are listed here. In the report, these fields would be displayed from left to right, starting with EMP_ID.
EMP_ID LAST_NAME FIRST_NAME HIRE_DATE DEPARTMENT CURR_SAL CURR_JOBCODE ED_HRS BANK_NAME BANK_CODE BANK_ACCT EFFECT_DATE DAT_INC PCT_INC SALARY JOBCODE JOBCODE JOB_DESC SEC_CLEAR SKILLS SKILL_DESC
Each field in this list appears in segments on the left path of the EMPLOYEE data source. To view the retrieval order structure of the EMPLOYEE data source, see Displaying the Retrieval Order of a Multi-Path Data Source.
(FOC757) WARNING. YOU REQUESTED PRINT * OR COUNT * FOR A MULTI-PATH FILE