If you want to generate a report that displays all of a segment fields, you can refer to the complete segment without specifying every field. You only need to specify one field in the segment (any field will do) prefixed with the SEG. operator.
The segment PRODS01in the GGPRODS Master File contains the PRODUCT_ID, PRODUCT_DESCRIPTION, VENDOR_CODE, VENDOR_NAME, PACKAGE_TYPE, SIZE, and UNIT_PRICE fields.
SEGMENT=PRODS01 FIELDNAME = PRODUCT_ID FIELDNAME = PRODUCT_DESCRIPTION FIELDNAME = VENDOR_CODE FIELDNAME = VENDOR_NAME FIELDNAME = PACKAGE_TYPE FIELDNAME = SIZE FIELDNAME = UNIT_PRICE
To write a report that includes data from every field in the segment, you can issue either of the following requests:
1. TABLE FILE GGPRODS
PRINT PRODUCT_ID AND PRODUCT_DESCRIPTION AND VENDOR_CODE AND
VENDOR_NAME AND PACKAGE_TYPE AND SIZE AND UNIT_PRICE
END
2. TABLE FILE GGPRODS
PRINT SEG.PRODUCT_ID
END
WebFOCUS |