Data Flow Breakdown
How do DDS components work together in real-world IBM i applications?
Physical File (PF)
Keyword | Purpose | Example |
|---|---|---|
R | Record format definition | A R CUSTREC |
Field name | Defines a field | A NAME 30A |
K | Key field for indexing | A K CUSTID |
TEXT | Field or record description | A TEXT('Customer Name') |
COLHDG | Column heading for display | A COLHDG('Name') |
Logical File (LF)
Keyword | Purpose | Example |
|---|---|---|
R | Record format definition | A R CUSTVIEW |
PFILE | Points to the physical file | A PFILE(CUST) |
K | Key field for sorting | A K NAME |
SELECT | Includes records matching criteria | A SELECT STATE EQ 'TX' |
JOIN | Joins multiple PFs (advanced) | A JOIN(CUSTORD) |
Display File (DSPF)
Keyword | Purpose | Example |
|---|---|---|
R | Screen format definition | A R CUSTSCRN |
CFxx | Function key definition | A CF03(03 'Exit') |
B | Field position (row/column) | A NAME 30A B 5 10 |
DSPATR | Display attributes (e.g. reverse, blink) | A DSPATR(RI) |
COLOR | Field color | A COLOR(BLU) |
EDTCDE | Edit code for numeric formatting | A TOTAL 9P 2 EDTCDE(J) |
Printer File (PRTF)
Keyword | Purpose | Example |
|---|---|---|
R | Print format definition | A R INVOICE |
SPACEB | Blank lines before printing | A SPACEB(2) |
SKIPB | Skip to line before printing | A SKIPB(1) |
DATE | Prints system date | A DATE |
TIME | Prints system time | A TIME |
BARCODE | Prints barcode (if supported) | A BARCODE(CODE39) |

