Category:Format Specifications: Difference between revisions
No edit summary |
No edit summary |
||
Line 57: | Line 57: | ||
<TD>SMALLINT</TD> | <TD>SMALLINT</TD> | ||
<TD>BH</TD> | <TD>BH</TD> | ||
<TD> | <TD>BH 2</TD> | ||
</TR> | </TR> | ||
Line 69: | Line 69: | ||
<TR> | <TR> | ||
<TD>DECIMAL</TD> | <TD>DECIMAL</TD> | ||
<TD>N</TD> | <TD>N or PD</TD> | ||
<TD>N 12.2</TD> | <TD>N 12.2 or PD 6.2</TD> | ||
</TR> | </TR> | ||
Line 79: | Line 79: | ||
<TD>Typically Stored as separate fields</TD> | <TD>Typically Stored as separate fields</TD> | ||
</TR> | </TR> | ||
<TR> | <TR> | ||
Line 87: | Line 85: | ||
<TD>C 8 or D</TD> | <TD>C 8 or D</TD> | ||
</TR> | </TR> | ||
<TR> | |||
<TD>CHAR</TD> | |||
<TD>C</TD> | |||
<TD>C 30</TD> | |||
</TR> | |||
</TABLE> | </TABLE> |
Revision as of 14:23, 11 April 2023
See the format specifications below for more details on each.
See also Format specifications for a chart comparing their uses.
Format specifications tell Business Rules the form that a particular data field will be in. A format specification is required whenever data is input into or output from a program. It is also required with the full screen processing statements. Format specs are not required in the following situations: with unformatted internal files, with all display files, and when unformatted PRINT statements are used.
Not all format specifications are alike in their uses. Some can be used with internal and external files, but not with display files. Some can be used only with full screen formatting. And some format specifications behave differently depending on whether they are used for input or output.
Common SQL Fields and BR Equivilants
SQL Field | BR Equivilant | Example |
---|---|---|
COUNTER | N | N 6 |
INTEGER | N | N 6 |
LONG INTEGER | N | N 12 |
SINGLE | S | S |
DOUBLE | D | D |
BINGINT | N/A | N 10 |
SMALLINT | BH | BH 2 |
FLOAT | L | N 6 |
DECIMAL | N or PD | N 12.2 or PD 6.2 |
DATETIME | N/A | Typically Stored as separate fields |
DATE | C or D | C 8 or D |
CHAR | C | C 30 |