Example DDS PF with all the Data types in DDS AS400 |
Introduction
In DDS supported physical file we do specify the data type of the field on fixed position 35.
Valid Data Types Entries
Basic Data Types in DDS PF
Entry | Meaning |
---|---|
A | Character |
B | Binary |
F | Floating point |
H | Hexadecimal |
L | Date |
P | Packed decimal |
S | Zoned decimal |
T | Time |
Z | Timestamp |
5 | Binary character |
Supported DBCS Data types
There are some other DDS datatypes too that supports DBCS.
Entry | Meaning |
---|---|
J | DBCS Only |
E | DBCS Either |
O | Open |
G | Graphics (that uses UCS-2 or UTF-16) |
Points to Remember
Example DDS source definitions for basic DDS data types with its maximum allowed limits
Character data type
For character data type maximum allowed length is 32766 and data type entry used is A.
For character data type maximum allowed length is 32740 when VARLEN keyword is specfied in DDS PF with character type field and data type entry used is A.
A R RCDFMT1
A CHAR1 32766A
A R RCDFMT1
A CHAR2 32740A VARLEN
Binary data type
For binary data type maximum allowed length is 18 in DDS PF and data type entry used is B.
A R RCDFMT1
A BIN1 18B
Floating point data type
For Floating data type maximum allowed length is 9 for single precision in DDS PF and data type entry used is F with keyword FLTPCN(*SINGLE).
For Floating data type maximum allowed length is 17 for double precision in DDS PF and data type entry used is F with keyword FLTPCN(*DOUBLE).
A R RCDFMT1
A FLOATS1 9F FLTPCN(*SINGLE)
A R RCDFMT1
A FLOATD1 17F FLTPCN(*DOUBLE)
Hexadecimal data type
For Hexadecimal data type maximum allowed length is 32766 (treated as character) in DDS PF and data type entry used is H.
A R RCDFMT1
A HEXDEC1 32766H
Date data type
For Date data type in DDS PF and data type entry used is L.
A R RCDFMT1
A DATE1 L
Packed Decimal data type
For Packed Decimal data type maximum allowed length is 63 in DDS PF and data type entry used is P.
Either 63 numeric and 0 decimal places or 0 numeric and 63 decimal places possible.
A R RCDFMT1
A PACKEDDEC1 63P 0
A PACKEDDEC2 63P63
Zoned Decimal data type
For Zoned Decimal data type maximum allowed length is 63 in DDS PF and data type entry used is S.
Either 63 numeric and 0 decimal places or 0 numeric and 63 decimal places possible
A R RCDFMT1
A PACKEDDEC1 63S 0
A PACKEDDEC2 63S63
Time data type
For Time data type in DDS PF and data type entry used is T.
A R RCDFMT1
A TIME1 T
TimeStamp data type
For TimeStamp data type in DDS PF and data type entry used is Z.
A R RCDFMT1
A TIMESTAMP1 Z
Binary Character data type
For Binary Character data type maximum allowed length is 32766 in DDS PF and data type entry used is 5.
A R RCDFMT1
A BINCHAR1 327665
Example DDS source definitions for supported DBCS DDS data types with its maximum allowed limits
DBCS Only data type
For DBCS Only data type maximum allowed length is 32766 in DDS PF and data type entry used is J.
A R RCDFMT1
A DBCSONLY1 32766J
DBCS Only data type with Varying Length
For DBCS Only with Varying Length data type maximum allowed length is 32740 in DDS PF and data type entry used is J.
A R RCDFMT1
A DBCSONLY2 32740J VARLEN
DBCS Either data type
For DBCS Either data type maximum allowed length is 32766 in DDS PF and data type entry used is E.
A R RCDFMT1
A DBCSETHR1 32766E
DBCS Either data type with Varying Length
For DBCS Either with Varying Length data type maximum allowed length is 32740 in DDS PF and data type entry used is E.
A R RCDFMT1
A DBCSETHR2 32740E VARLEN
Open data type
For open data type maximum allowed length is 32766 in DDS PF and data type entry used is O.
A R RCDFMT1
A OPEN1 32766O CCSID(65535)
Open data type with Varying Length
For Open data type with Varying Length data type maximum allowed length is 32740 in DDS PF and data type entry used is O.
A R RCDFMT1
A OPEN2 32740O CCSID(65535) VARLEN
Graphics data type
For graphics data type maximum allowed length is 16383 in DDS PF and data type entry used is G.
CCSID 1200 is used for UTF16
A R RCDFMT1
A GRAP1 16383G CCSID(1200)
CCSID 13488 is also used for UTF16
A R RCDFMT1
A GRAP2 16383G CCSID(13488)
Graphics data type with Varying Length
For Graphics data type with Varying Length data type maximum allowed length is 16370 in DDS PF and data type entry used is G.
CCSID 1200 is used for UTF16
A R RCDFMT1
A GRAPHICS1 16370G CCSID(1200) VARLEN
CCSID 13488 is used also for UTF16
A R RCDFMT1
A GRAPHICS2 16370G CCSID(13488) VARLEN