Data columns
The DTACOL (data column) tag can be used to define values for data fields and selection fields that are coded within the data column. If you have a group of data fields and selection fields on the same application panel, the DTACOL tag is a convenient short-cut for ensuring alignment of the fields.
The DTACOL tag has these attributes:
- PMTWIDTH
- Applies to data fields and selection fields
- ENTWIDTH
- Applies to data fields only
- DESWIDTH
- Applies to data fields only
- SELWIDTH
- Applies to selection fields only
- FLDSPACE
- Applies to data fields only
- PAD
- Applies to data fields only
- PADC
- Applies to data fields only
- OUTLINE
- Applies to data fields only
- PMTFMT
- Applies to data fields only
- AUTOTAB
- Applies to data fields only
- ATTRCHANGE
- Applies to data fields only
- PMTLOC
- Applies to data fields only
- DBALIGN
- Applies to data fields only
- VARCLASS
- Applies to data fields only
- REQUIRED
- Applies to data fields only
- CAPS
- Applies to data fields only
These attributes serve the same purposes in DTACOL definitions as they do in CHOFLD, DTAFLD, and SELFLD definitions. The only difference is that when you use them with a DTACOL tag, they define those values for all of the data fields and selection fields coded between the DTACOL start and end tags.
Here is an example of markup that uses a data column to define
a prompt width, entry width, and description width for the data fields
and the selection field coded within the data column. Because we want
to limit the entry width of the State and Zip code fields,
we defined ENTWIDTH values in the DTAFLD definitions for these fields
that override the DTACOL ENTWIDTH value.
<!doctype dm system>
<varclass name=sampcls type ='char 30'>
<varclass name=statcls type ='char 2'>
<varclass name=zipcls type ='char 5'>
<varclass name=char1cls type ='char 1'>
<varlist>
<vardcl name=name varclass=sampcls>
<vardcl name=addr varclass=sampcls>
<vardcl name=city varclass=sampcls>
<vardcl name=stat varclass=statcls>
<vardcl name=day varclass=char1cls>
<vardcl name=zipc varclass=zipcls>
</varlist>
<panel name=dcolxmp>Schedule Appointments
<topinst>Enter your name and address and
choose the most convenient day for your appointment.
<area>
<dtacol pmtwidth=12 entwidth=30 deswidth=29 selwidth=30>
<dtafld datavar=name>Name
<dtafldd>Last, First, M.I.
<dtafld datavar=addr>Address
<dtafldd>If it applies, include apartment number
<dtafld datavar=city>City
<dtafld datavar=stat entwidth=2>State
<dtafldd>Use 2-character abbreviation
<dtafld datavar=zipc entwidth=5>Zip code
<divider type=solid gutter=3>
<selfld name=day pmtloc=before>Weekdays
<choice>Monday
<choice>Tuesday
<choice>Wednesday
<choice>Thursday
<choice>Friday
</selfld>
</dtacol>
</area>
</panel>Here is how the panel formats:
Schedule Appointments
Enter your name and address and choose the most convenient day for your
appointment.
Name . . . . ______________________________ Last, First, M.I.
Address . . ______________________________ If it applies, include
apartment number
City . . . . ______________________________
State . . . __ Use 2-character abbreviation
Zip code . . _____
---------------------------------------------------------------------------
Weekdays . . __ 1. Monday
2. Tuesday
3. Wednesday
4. Thursday
5. Friday