In this module we are going to look at one of the most important building blocks on the IBM i platform: DDS, or Data Description Specifications.
If you work with files or green screen programs on the AS400, then DDS is something you will come across regularly. For many years DDS was the main way to define the structure of physical files, logical files, display files, and printer files on the system. Even today, it remains very common in production environments.
In this lesson, you’ll learn:
Think of DDS as the blueprint language of the IBM i world. It’s not flashy. It’s not modern. But it’s rock‑solid, predictable, and still deeply embedded in thousands of production systems. Once you understand it, you’ll unlock a huge part of how IBM i applications are built and maintained.
By the end of this lesson, you’ll be able to open a DDS member and confidently say, “Ah, I know exactly what this is doing” instead of staring at it like an ancient hieroglyph.
What does DDS Look like?
DDS source members are written in fixed-format columns, often using SEU or modern editors like RDi or VS Code. Each line describes a field, keyword, or layout instruction. Let’s look at examples for each major DDS type:
Physical File (PF) Example
A CUSTID 5P 0
A NAME 30A
A ADDRESS 50A
A CITY 20A
A STATE 2A
A ZIPCODE 5A
A K CUSTID
R CUSTREC defines a record format.
Each field has a name, length, and type (A for alphanumeric, P for packed decimal).
K CUSTID sets the key field.
Logical File (LF) Example
A NAME
A CITY
A STATE
A K NAME
This LF pulls selected fields from the PF.
It sorts records by NAME.
Display File (DSPF) Example
A CF03(03 'Exit')
A NAME 30A B 5 10
A CITY 20A B 6 10
A STATE 2A B 7 10
CF03 defines function key F3 as “Exit”.
Fields are positioned on screen using row/column (B 5 10 = row 5, column 10).
Printer File (PRTF) Example
A CUSTID 5P 0
A NAME 30A
A TOTAL 9P 2
A SPACEB(2)
A SKIPB(1)
SPACEB and SKIPB control vertical spacing.
Fields are printed in the order defined.
Each DDS type has its own set of keywords and layout rules, but once you get the hang of the syntax, it becomes second nature.
Next - let's look at all the data types within DDS...
