Format specifications: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The page presents a summary chart of format specifications. Also see [[:Category:Format Specifications]] and [[File I/O]]  for detailed descriptions of each format.
The page presents a summary chart of format specifications. Also see [[:Category:Format Specifications]] and [[File I/O]]  for detailed descriptions of each format.


The following table shows where and how each of [[Business Rules!]] '''format specifications''' may be used. The first column identifies the format specification.
The following table shows where and how each of [[Business Rules!]] '''format specifications''' may be used.  


The second column labeled "Description" gives a very brief description of the format specification's purpose. The columns labeled "S", "N" and "I" indicate whether the specification is a [[string]], [[numeric]] or internal format spec.
"S", "N" and "I" indicate whether the specification is a [[string]], [[numeric]] or internal format spec.


The next two columns show what happens when the format specification is used with [[internal]] or [[external]] files, either for input (with the [[READ]]/[[REREAD]] [[statements]]) or for output (with the [[WRITE]]/[[REWRITE]] statements).
The next two columns show what happens when the format specification is used with [[internal]] or [[external]] files, either for input (with the [[READ]]/[[REREAD]] [[statements]]) or for output (with the [[WRITE]]/[[REWRITE]] statements).
Line 11: Line 11:
The last two columns show what happens when the format specification is used with full screen processing, either for input (with the [[INPUT FIELDS]] statement) or for output (with the [[PRINT FIELDS]] statement). Note that the information marked for INPUT FIELDS applies to [[RINPUT FIELDS]] when RINPUT FIELDS is used for input. Likewise, the information marked for PRINT FIELDS applies to RINPUT FIELDS when RINPUT FIELDS is used for output.
The last two columns show what happens when the format specification is used with full screen processing, either for input (with the [[INPUT FIELDS]] statement) or for output (with the [[PRINT FIELDS]] statement). Note that the information marked for INPUT FIELDS applies to [[RINPUT FIELDS]] when RINPUT FIELDS is used for input. Likewise, the information marked for PRINT FIELDS applies to RINPUT FIELDS when RINPUT FIELDS is used for output.


If there is an X in any of the last five columns, the format specification operates according to its intended purpose when it is used as indicated. If there is an error code number in the column, the format specification cannot be used with this type of file (the specified error will occur if usage is attempted). In some cases, the phrase "treats as   " appears in the column; this means that the specification is accepted when used as indicated, but treated as if it were a different format specification.
If there is an X in any of the last five columns, the format specification operates according to its intended purpose when it is used as indicated. If there is an error code number in the column, the format specification cannot be used with this type of file (the specified error will occur if usage is attempted).  
 
The phrase "Treat as " means that the specification is accepted when used as indicated, but treated as if it were a different format specification.


{| border="1" style="border-collapse:collapse;"
{| border="1" style="border-collapse:collapse;"
! colspan="5" rowspan="2"|Type
! style="background:#a5c7ff;" colspan="5" rowspan="2"|Type
! colspan="2" | Internal
! style="background:#a5c7ff;" colspan="2" | Internal
! Display
! style="background:#a5c7ff;" | Display
! colspan="2" |Full Screen
! style="background:#a5c7ff;" colspan="2" |Full Screen
|-
|-style="background:#a5c7ff;"
! Read/Reread
! Read/Reread
! Write/Rewrite
! Write/Rewrite
Line 24: Line 26:
! Input Fields
! Input Fields
! Print Fields
! Print Fields
|-
|-style="background:#a5c7ff;"
! Format
! Format
! Description
! Description
Line 35: Line 37:
! (Input)
! (Input)
! (Output)
! (Output)
|-style="background:#ddeaff;"
|[[B]]||Binary|| || ||X||X||X||Error 0816||Error 0816||Error 0816
|-
|-
|B||Binary|| || ||X||X||X||Error 0816||Error 0816||Error 0816||
|[[BL]]||Binary Low|| || ||X||X||X||Error 0816||Error 0816||Error 0816
|-
|-style="background:#ddeaff;"
|BL||Binary Low|| || ||X||X||X||Error 0816||Error 0816||Error 0816||
|[[BH]]||Binary High|| || ||X||X||X||Error 0816||Error 0816||Error 0816
|-
|BH||Binary High|| || ||X||X||X||Error 0816||Error 0816||Error 0816||
|-
|C||Character||X|| || ||X||X||X||X||X||
|-
|CC||C Centered||X|| || ||Treat as C||X||X||Treat as C||X||
|-
|CR||C Right Justified||X|| || ||Treat as C||X||X||Treat as C||X||
|-
|CL||C Lowercase||X|| || ||Err 1006||Err 1006||Err 1006||X||Treat as C||
|-
|CU||C Uppercase||X|| || ||Err 1006||Err 1006||Err 1006||X||Treat as C||
|-
|D|| Double Precision Floating Point|| || ||X||X||X||X||Err 0861||Err 0861||
|-
|G||Generic||X||X|| ||X||X||X||X||X||
|-
|-
|GL||G Lowercase||X||X|| ||Err 1006||Err 1006||Err 1006||X||Treat as G||
|[[C]]||Character||X|| || ||X||X||X||X||X
|-style="background:#ddeaff;"
|[[CC]]||C Centered||X|| || ||Treat as C||X||X||Treat as C||X
|-
|-
|GU||G Uppercase||X||X|| ||Err 1006||Err 1006||Err 1006||X||Treat as G||
|[[CR]]||C Right Justified||X|| || ||Treat as C||X||X||Treat as C||X
|-style="background:#ddeaff;"
|[[CL]]||C Lowercase||X|| || ||Err 1006||Err 1006||Err 1006||X||Treat as C
|-
|-
|GZ||G Zero Suppress||X||X|| ||Treat as G||X||X||Treat as G||X||
|[[CU]]||C Uppercase||X|| || ||Err 1006||Err 1006||Err 1006||X||Treat as C
|-style="background:#ddeaff;"
|[[D]]|| Double Precision Floating Point|| || ||X||X||X||Err 801||Err 0861||Err 0861
|-
|-
|L||Long Numeric|| || ||X||X||X||Err 0816||Err 0862||Err 0862||
|[[DH]]||Date Binary|| ||X|| ||X||X|| || ||
|-style="background:#ddeaff;"
|DL||Date Binary Low|| ||X|| ||X||X|| || ||
|-
|-
|L||Leave Decimal|| ||X|| ||Err 1006||Err 1006||Err 1006||X||X||
|[[DT]]||Date Binary High|| ||X|| ||X||X|| || ||
|-style="background:#ddeaff;"
|[[FMT]]||Masked (Formatted) Input||X||X|| || || || ||X||X
|-
|-
|N||Numeric|| ||X|| ||X||X||X||X||X||
|[[G]]||Generic||X||X|| ||X||X||X||X||X
|-
|-
|NZ||N Display Zero|| ||X|| ||Treat as N||X||X||Treat as N||X||
|[[GF]]||G Floating Point||X||X|| ||X||X||X|| ||
|-style="background:#ddeaff;"
|[[GL]]||G Lowercase||X||X|| ||Err 1006||Err 1006||Err 1006||X||Treat as G
|-
|-
|PD||Packed Decimal|| || ||X||X||X||Err 0816||Err 0816||Err 0816||
|[[GU]]||G Uppercase||X||X|| ||Err 1006||Err 1006||Err 1006||X||Treat as G
|-style="background:#ddeaff;"
|[[GZ]]||G Zero Suppress||X||X|| ||Treat as G||X||X||Treat as G||X
|-
|-
|PIC||Picture||X||X|| ||X|| ||X||X||X||
|L||Long Numeric|| || ||X||X||X||Err 0801||X||X
|-style="background:#ddeaff;"
|L||Leave Decimal|| ||X|| ||Err 1006||Err 1006||Err 1006||X||X
|-
|-
|S||Single Precision Floating Point|| || ||X||X||X||X||X||
|N||Numeric|| ||X|| ||X||X||X||X||X
|-style="background:#ddeaff;"
|[[NZ]]||N Display Zero|| ||X|| ||Treat as N||X||X||Treat as N||X
|-
|-
|V||String||X|| || ||X||X||X||X||X||
|[[Picture|P]]||Picture|| || ||X|| || || ||X||X
|-style="background:#ddeaff;"
|[[PD]]||Packed Decimal|| || ||X||X||X||Err 0816||Err 0816||Err 0816
|-style="background:#ddeaff;"
|[[PIC]]||Masked (Pic Spec) Input||X||X|| ||X|| ||X||X||X
|-
|-
|VL||S Lowercase||X|| || ||Err 1006||Err 1006||Err 1006||X||Treat as V||
|S||Single Precision Floating Point|| || ||X||X||X||X||X
|-style="background:#ddeaff;"
|V||String||X|| || ||X||X||X||X||X
|-
|-
|VU||S Lowercase||X|| || ||Err 1006||Err 1006||Err 1006||X||Treat as V||
|[[VL]]||S Lowercase||X|| || ||Err 1006||Err 1006||Err 1006||X||Treat as V
|-style="background:#ddeaff;"
|[[VU]]||S Lowercase||X|| || ||Err 1006||Err 1006||Err 1006||X||Treat as V
|-
|-
|ZD||Zoned Decimal|| || ||X||X||X||Err 0816||Err 0861||Err 0861||
|[[ZD]]||Zoned Decimal|| || ||X||X||X||Err 0816||Err 0861||Err 0861
|-
|-
|}
|}

Latest revision as of 02:50, 20 January 2020

The page presents a summary chart of format specifications. Also see Category:Format Specifications and File I/O for detailed descriptions of each format.

The following table shows where and how each of Business Rules! format specifications may be used.

"S", "N" and "I" indicate whether the specification is a string, numeric or internal format spec.

The next two columns show what happens when the format specification is used with internal or external files, either for input (with the READ/REREAD statements) or for output (with the WRITE/REWRITE statements).

The column labeled "PRINT (Output)"Print shows what happens when the format specification is used with display files.

The last two columns show what happens when the format specification is used with full screen processing, either for input (with the INPUT FIELDS statement) or for output (with the PRINT FIELDS statement). Note that the information marked for INPUT FIELDS applies to RINPUT FIELDS when RINPUT FIELDS is used for input. Likewise, the information marked for PRINT FIELDS applies to RINPUT FIELDS when RINPUT FIELDS is used for output.

If there is an X in any of the last five columns, the format specification operates according to its intended purpose when it is used as indicated. If there is an error code number in the column, the format specification cannot be used with this type of file (the specified error will occur if usage is attempted).

The phrase "Treat as " means that the specification is accepted when used as indicated, but treated as if it were a different format specification.

Type Internal Display Full Screen
Read/Reread Write/Rewrite Print Input Fields Print Fields
Format Description S N I (Input) (Output) (Output) (Input) (Output)
B Binary X X X Error 0816 Error 0816 Error 0816
BL Binary Low X X X Error 0816 Error 0816 Error 0816
BH Binary High X X X Error 0816 Error 0816 Error 0816
C Character X X X X X X
CC C Centered X Treat as C X X Treat as C X
CR C Right Justified X Treat as C X X Treat as C X
CL C Lowercase X Err 1006 Err 1006 Err 1006 X Treat as C
CU C Uppercase X Err 1006 Err 1006 Err 1006 X Treat as C
D Double Precision Floating Point X X X Err 801 Err 0861 Err 0861
DH Date Binary X X X
DL Date Binary Low X X X
DT Date Binary High X X X
FMT Masked (Formatted) Input X X X X
G Generic X X X X X X X
GF G Floating Point X X X X X
GL G Lowercase X X Err 1006 Err 1006 Err 1006 X Treat as G
GU G Uppercase X X Err 1006 Err 1006 Err 1006 X Treat as G
GZ G Zero Suppress X X Treat as G X X Treat as G X
L Long Numeric X X X Err 0801 X X
L Leave Decimal X Err 1006 Err 1006 Err 1006 X X
N Numeric X X X X X X
NZ N Display Zero X Treat as N X X Treat as N X
P Picture X X X
PD Packed Decimal X X X Err 0816 Err 0816 Err 0816
PIC Masked (Pic Spec) Input X X X X X X
S Single Precision Floating Point X X X X X
V String X X X X X X
VL S Lowercase X Err 1006 Err 1006 Err 1006 X Treat as V
VU S Lowercase X Err 1006 Err 1006 Err 1006 X Treat as V
ZD Zoned Decimal X X X Err 0816 Err 0861 Err 0861

See Also