Propagating Mixed-Case Column Titles to a HOLD File

How to:

Reference:

A report request can display custom column titles on the report output by using an AS phrase to specify the title. These names can be propagated as field names to a HOLD Master File by issuing the SET ASNAMES command. With SET ASNAMES=ON, all column titles are converted to uppercase when propagated to the HOLD file. To retain mixed-case column titles as field names, use the SET ASNAMES=MIXED command.


Top of page

x
Syntax: How to Propagate Mixed-Case Column Titles to a HOLD File
SET ASNAMES = {OFF|ON|MIXED|FOCUS}
ON TABLE SET ASNAMES {OFF|ON|MIXED|FOCUS}

where:

OFF

Does not use the literal specified in an AS phrase as a field name in HOLD files, and does not affect the way ACROSS fields are named.

ON

Uppercases the literal specified in an AS phrase and propagates it as the field name in the HOLD Master File. Creates names for ACROSS fields that consist of the AS name value concatenated to the beginning of the ACROSS field value and controls the way ACROSS fields are named in HOLD files of any format.

MIXED

Uses the literal specified in an AS phrase for the field name, retaining the case of the AS name, and creates names for ACROSS fields that consist of the AS name value concatenated to the beginning of the ACROSS field value.

FOCUS

Uses the literal specified in an AS phrase as the field name and controls the way ACROSS fields are named only in HOLD files in FOCUS format. FOCUS is the default value.


Top of page

x
Reference: Usage Notes for SET ASNAMES


Example: Retaining Mixed-Case AS Names in a HOLD Master File

The following request against the GGSALES data source creates custom mixed-case column titles for the fields:

SET ASNAMES = OFF
TABLE FILE GGSALES                        
SUM DOLLARS AS 'Sales' UNITS AS 'Quantity'
BY ST AS 'State'                          
BY CATEGORY AS 'Product'                  
ON TABLE HOLD                    
END                                       

With SET ASNAMES=OFF, the HOLD Master File has the same field names as the original Master File:

FILENAME=HOLD    , SUFFIX=FIX     , IOTYPE=BINARY, $       
  SEGMENT=HOLD, SEGTYPE=S2, $                              
    FIELDNAME=ST, ALIAS=E01, USAGE=A02, ACTUAL=A04, $      
    FIELDNAME=CATEGORY, ALIAS=E02, USAGE=A11, ACTUAL=A12, $
    FIELDNAME=DOLLARS, ALIAS=E03, USAGE=I08, ACTUAL=I04, $ 
    FIELDNAME=UNITS, ALIAS=E04, USAGE=I08, ACTUAL=I04, $   

With SET ASNAMES=ON, the field names in the HOLD Master File are the AS names, converted to uppercase:

FILENAME=HOLD    , SUFFIX=FIX     , IOTYPE=BINARY, $       
  SEGMENT=HOLD, SEGTYPE=S2, $                              
    FIELDNAME=STATE, ALIAS=E01, USAGE=A02, ACTUAL=A04, $   
    FIELDNAME=PRODUCT, ALIAS=E02, USAGE=A11, ACTUAL=A12, $ 
    FIELDNAME=SALES, ALIAS=E03, USAGE=I08, ACTUAL=I04, $   
    FIELDNAME=QUANTITY, ALIAS=E04, USAGE=I08, ACTUAL=I04, $

With SET ASNAMES=MIXED, the field names in the HOLD Master File are the AS names, in the case specified in the request:

FILENAME=HOLD    , SUFFIX=FIX     , IOTYPE=BINARY, $       
  SEGMENT=HOLD, SEGTYPE=S2, $                              
    FIELDNAME=State, ALIAS=E01, USAGE=A02, ACTUAL=A04, $   
    FIELDNAME=Product, ALIAS=E02, USAGE=A11, ACTUAL=A12, $ 
    FIELDNAME=Sales, ALIAS=E03, USAGE=I08, ACTUAL=I04, $   
    FIELDNAME=Quantity, ALIAS=E04, USAGE=I08, ACTUAL=I04, $

Information Builders