The HOLD option generates a temporary HOLD file. HOLD files are explained in the Creating Reports With WebFOCUS Language manual. This HOLD file contains detailed information regarding file, segment, and field attributes, which you can display in reports using TABLE requests.
Certain fields in this HOLD file are of special interest. Unless otherwise noted, these fields are named the same as attributes in Master Files. Each field stores the values of the similarly named attribute. The fields can be grouped into file attributes, segment attributes, and field attributes.
Note that the FDEFCENT and FYRTHRESH attributes are included in the HOLD file, if they exist in the original Master File and you specify the ALL option.
Note that this field does not indicate the number of segment key fields. Segment types S1, S2, and so on are shown as type S. The same is true with segment type SHn.
The number of segment key fields. For example, if the segment type is S2, SKEYS has the value 2.
The number assigned to the segment within the structure. This appears in the picture.
The level of the segment within the structure. The root segment is on Level 1, its children are on Level 2, and so on.
PARENT, CRKEY, FIELDNAME
Note that if you include the FORMAT field in the TABLE request, do not use the full field name FORMAT. Rather, you should use the alias USAGE or a unique truncation of the FORMAT field name (the shortest unique truncation is FO).
Note that these attributes are included in the HOLD file, if they exist in the original Master File and you specify the ALL option.
This sample procedure creates a HOLD file describing the EMPLOYEE data source. It then writes a report that displays the names of cross-referenced segments in the EMPLOYEE data source, the segment types, and the attributes of the fields: field names, aliases, and formats.
CHECK FILE EMPLOYEE HOLD TABLE FILE HOLD HEADING "FIELDNAMES, ALIASES, AND FORMATS" "OF CROSS-REFERENCED FIELDS IN THE EMPLOYEE DATA SOURCE" " " PRINT FIELDNAME/A12 ALIAS/A12 USAGE BY SEGNAME BY SEGTYPE WHERE SEGTYPE CONTAINS 'K' END
The output is:
PAGE 1 FIELDNAMES, ALIASES, AND FORMATS OF CROSS-REFERENCED FIELDS IN THE EMPLOYEE DATA SOURCE SEGNAME SEGTYPE FIELDNAME ALIAS FORMAT ------- ------- --------- ----- ------ ATTNDSEG KM DATE_ATTEND DA I6YMD EMP_ID EID A9 COURSEG KLU COURSE_CODE CC A6 COURSE_NAME CD A30 JOBSEG KU JOBCODE JC A3 JOB_DESC JD A25 SECSEG KLU SEC_CLEAR SC A6 SKILLSEG KL SKILLS A4 SKILL_DESC SD A30
Assume the EMPLOYEE data source contains the following FILE declaration:
FILENAME = EMPLOYEE, SUFFIX = FOC, FDEFCENT = 19, FYRTHRESH = 50
The following request:
CHECK FILE EMPLOYEE HOLD ALL TABLE FILE HOLD PRINT FDEFCENT FYRTHRESH END
produces the following output:
FDEFCENT FYRTHRESH -------- --------- 19 50
An AS name may be provided for the temporary HOLD file generated by the CHECK command. If a name is not specified, the default name is HOLD and any existing default file will be replaced.
Note: When the AS option is specified in combination with other CHECK options, the AS holdname specification must appear last.
When using the HOLD option of the CHECK command, the TITLE text is placed in the TITLE field of the FLDATTR segment, the HELPMESSAGE text in the HELPMESSAGE field of the FLDATTR segment, and the TAG names in the TAGNAME field of the SEGATTR segment.
When no JOINs are in effect, or when a JOIN command is issued without a TAG name, the TAGNAME field by default contains the name of the data source specified in the CHECK command. When JOINs are issued in conjunction with the TAG name feature, the TAGNAME field contains the TAG name for the host and cross-referenced data sources.
With the HOLD option, virtual fields are placed in the segment in which they would be stored if they were real fields in the data source. This is not necessarily the physical location of the field in the Master File, but the lowest segment that must be accessed in order to evaluate the expression defining the field. Fields whose values are not dependent on retrieval default to the top segment. The value of FLDSEG in the FLDATTR segment is zero for these fields. The format of FLDSEG is I2S in the Master File, which causes zero to appear as blank in reports. FLDSEG may be dynamically reformatted in a TABLE request (FLDSEG/I2) to force the display of zero.
After data has been entered into a data source, you can no longer make arbitrary changes to the Master File. Some changes are entirely harmless and can be made at any time. Others are prohibited unless the data is reentered or the data source rebuilt. A few others can be made if corresponding changes are made in several places.
You can use a text editor to make permitted changes to the Master File. The checking procedure, CHECK, should be used after any change.