How to: |
Reference: |
The FILE declaration in a Master File can have a REMARKS or DESCRIPTION attribute that displays when browsing through Master Files using front-end tools, such as the App Studio Report canvas. Each FIELD declaration can have a DESCRIPTION attribute that provides documentation about that field and can be displayed instead of the field name in those tools. A FIELD declaration can also specify a TITLE attribute that provides a default column heading (title) in a report.
Master Files support descriptions in multiple languages. The description used depends on the value of the LANG parameter and whether a DESC_ln attribute is specified in the Master File, where ln identifies the language to which the description applies. In order to display these descriptions properly, all of the languages used must be consistent with your NLS configuration.
In a report, a column's heading is determined by:
For a file declaration in a Master File, use the following syntax:
FILE = filename, . . . {REMARKS|DESC} = default_desc DESC_ln = desc_for_ln . . . FIELDNAME = field, ... . . . TITLE = default_column_heading TITLE_ln = column_heading_for_ln . . . DESC = default_desc DESC_ln = desc_for_ln . . .
For a field declaration in a Master File, use the following syntax:
FIELDNAME = field, ... . . . TITLE = default_column_heading TITLE_ln = column_heading_for_ln . . . DESC = default_desc DESC_ln = desc_for_ln . . .
where:
Is a field in the Master File.
Is the column heading to use when SET TITLES=ON and either the LANG parameter is set to the default language for the server, or another language is set but the Master File has no corresponding TITLE_ln attribute for that field. This column heading is also used if an the ln value is invalid.
Specifies the language to which the associated column heading applies.
Specifies the text of the column heading for the specified language. That column heading is used when SET TITLES=ON, the LANG parameter is set to a non-default language for the server, and the Master File has a corresponding TITLE_ln attribute, where ln is the two-digit code for the language specified by the LANG parameter. Valid values for ln are the two-letter ISO 639 language code abbreviations.
Is the description to use when either the LANG parameter is set to the default language for the server, or another language is set but the Master File has no corresponding DESC_ln attribute for that field. This description is also used if an the ln value is invalid.
Specifies the language to which the associated description applies.
Specifies the description text for the specified language. This description is used when the LANG parameter is set to a non-default language for the server and the Master File has a corresponding DESC_ln attribute. Valid values for ln are two-letter ISO 639 language code abbreviations, as shown in the following table.
Language Name |
Two-Letter Language Code |
Three-Letter Language Abbreviation |
---|---|---|
Arabic |
ar |
ARB |
Baltic |
lt, lv |
BAL |
Chinese - Simplified GB |
zh |
PRC |
Chinese - Traditional Big-5 |
tw |
ROC |
Czech |
cs |
CZE |
Danish |
da |
DAN |
Dutch |
nl |
DUT |
English - American |
en |
AME or ENG |
English - UK |
uk |
UKE |
Finnish |
fi |
FIN |
French - Canadian |
fc |
FRE |
French - Standard |
fr |
FRE |
German - Austrian |
at |
GER |
German - Standard |
de |
GER |
Greek |
el |
GRE |
Hebrew |
iw |
HEW |
Italian |
it |
ITA |
Japanese - Shift-JIS(cp942) on ascii cp939 on EBCDIC |
ja |
JPN |
Japanese - EUC(cp10942) on ascii (UNIX) |
je |
JPE |
Korean |
ko |
KOR |
Norwegian |
no |
NOR |
Polish |
pl |
POL |
Portuguese - Brazilian |
br |
POR |
Portuguese - Portugal |
pt |
POR |
Russian |
ru |
RUS |
Spanish |
es |
SPA |
Swedish |
sv |
SWE |
Thai |
th |
THA |
Turkish |
tr |
TUR |
Issue the SET LANG command in a supported profile, on the command line, or in a FOCEXEC to set the language of error messages when set for a Reporting Server and localize report titles if the Master File contains alternate language TITLE attributes.
For information on using SET LANG to localize a report, see Creating Multi-Locale Applications.
The syntax is as follows:
SET LANG = lng
or
SET LANG = ln
LANG = lng
where:
Is the three-letter abbreviation for the language.
Is the two-letter ISO language code.
Note: If SET LANG is used in a procedure, its value will override the values set in nlscfg.err or in any profile.
The following Master File for the CENTINV data source specifies French descriptions (DESC_FR) and Spanish descriptions (DESC_ES) as well as default descriptions (DESC) for the PROD_NUM and PRODNAME fields:
FILE=CENTINV, SUFFIX=FOC, FDFC=19, FYRT=00 SEGNAME=INVINFO, SEGTYPE=S1, $ FIELD=PROD_NUM, ALIAS=PNUM, FORMAT=A4, INDEX=I, DESCRIPTION='Product Number' DESC='Product Number', DESC_ES='Numero de Producto', DESC_FR='Nombre de Produit', $ FIELD=PRODNAME, ALIAS=PNAME, FORMAT=A30, WITHIN=PRODCAT, DESCRIPTION='Product Name' DESC_FR='Nom de Produit', DESC_ES='Nombre de Producto', $ FIELD=QTY_IN_STOCK, ALIAS=QIS, FORMAT=I7, DESCRIPTION='Quantity In Stock', $ FIELD=PRICE, ALIAS=RETAIL, FORMAT=D10.2, TITLE='Price:', DESCRIPTION=Price, $
The following Master File for the CENTINV data source specifies French titles (TITLE_FR) and Spanish titles (TITLE_ES) as well as default titles (TITLE) for the PROD_NUM and PRODNAME fields:
FILE=CENTINV, SUFFIX=FOC, FDFC=19, FYRT=00 SEGNAME=INVINFO, SEGTYPE=S1, $ FIELD=PROD_NUM, ALIAS=PNUM, FORMAT=A4, INDEX=I, TITLE='Product,Number:', TITLE_FR='Nombre,de Produit:', TITLE_ES='Numero,de Producto:', DESCRIPTION='Product Number', $ FIELD=PRODNAME, ALIAS=PNAME, FORMAT=A30, WITHIN=PRODCAT, TITLE='Product,Name:', TITLE_FR='Nom,de Produit:', TITLE_ES='Nombre,de Producto:' DESCRIPTION='Product Name', $ FIELD=QTY_IN_STOCK, ALIAS=QIS, FORMAT=I7, TITLE='Quantity,In Stock:', DESCRIPTION='Quantity In Stock', $ FIELD=PRICE, ALIAS=RETAIL, FORMAT=D10.2, TITLE='Price:', DESCRIPTION=Price, $
The default language for the server code page is English and, by default, SET TITLES=ON. Therefore, the following request, uses the TITLE attributes to produce column headings that are all in English:
TABLE FILE CENTINV PRINT PROD_NUM PRODNAME PRICE WHERE PRICE LT 200 END
The output is:
Product Product Number: Name: Price: ------- ------- ------ 1004 2 Hd VCR LCD Menu 179.00 1008 DVD Upgrade Unit for Cent. VCR 199.00 1026 AR3 35MM Camera 10 X 129.00 1028 AR2 35MM Camera 8 X 109.00 1030 QX Portable CD Player 169.00 1032 R5 Micro Digital Tape Recorder 89.00
Now, issue either of the following commands to set the language to Spanish, and run the same request:
The output now displays column headings from the TITLE_ES attributes where they exist (Product Number and Product Name). Where no Spanish title is specified (the Price field), the column heading in the TITLE attribute appears:
Numero Nombre de Producto: de Producto: Price: ------------ ------------ ------ 1004 2 Hd VCR LCD Menu 179.00 1008 DVD Upgrade Unit for Cent. VCR 199.00 1026 AR3 35MM Camera 10 X 129.00 1028 AR2 35MM Camera 8 X 109.00 1030 QX Portable CD Player 169.00 1032 R5 Micro Digital Tape Recorder 89.00
WebFOCUS | |
Feedback |