Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>DDS CanvasNew to Visual Studio Code? Get it now.
DDS Canvas

DDS Canvas

Rabbi Hossain

|
212 installs
| (1) | Free
A beautiful, modern DDS editing experience for IBM i developers. Column awareness, hovers, diagnostics with quick fixes, column-perfect snippets and a complete keyword reference for display, printer, physical and logical files. Plays nicely with Code for IBM i and display-file preview extensions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

DDS Canvas

A beautiful, modern DDS editing experience for IBM i developers in Visual Studio Code.

DDS is fixed-format: every entry must sit in an exact column, and getting one space wrong means a compile error. RDi helps but is expensive; plain VS Code gives you nothing. DDS Canvas fills that gap.

Stop counting spaces. The extension always tells you where you are, what that column means, and warns you before the compiler does.

Works with Physical Files (PF), Logical Files (LF), Display Files (DSPF) and Printer Files (PRTF).


Quick start — your first 5 minutes

  1. Install the extension and open any DDS source file (.pf, .lf, .dspf, .prtf or .dds).

  2. Look at the status bar (bottom right). You will see something like:

    DDS | Col 21 | Name
    

    Move the cursor around the line — the label updates instantly. You always know which DDS area you are in.

  3. Hover your mouse anywhere on a line. A tooltip explains the column region under the pointer: what it is for, its valid values, and real examples.

  4. Watch the subtle highlight. The column region containing your cursor is gently shaded, so you can see exactly where the area begins and ends.

  5. Turn on the column guides. The first time you open a DDS file, DDS Canvas offers to add vertical rulers at every DDS column boundary. Click Turn On (or run DDS Canvas: Apply Recommended Editor Settings later).

  6. Type a snippet. In a .dspf file type dspf-subfile and press Tab. A complete, column-perfect subfile with its control record appears. Press Tab to jump between the parts you need to fill in.

  7. Make a deliberate mistake. Type a Q in column 35 (the data type column). A squiggle appears immediately: "'Q' is not a valid DDS data type." That is the compiler error you just avoided. If an entry is merely in the wrong column, the light bulb (Ctrl+.) offers Realign columns on this line.

That's the core loop: read the status bar, hover when unsure, let snippets do the alignment, and trust the squiggles.


The DDS column layout (what the extension knows)

Every feature is driven by one internal map of the DDS layout:

Columns Region What goes there
1–5 Sequence Number Optional; usually blank in stream files
6 Form Type Always A
7 Comment / And-Or * = comment line; A/O chain indicator conditions
8–16 Conditioning Indicators Up to three conditions, e.g. N50 (DSPF/PRTF)
17 Name Type R record, K key, S select, O omit, J join (LF), H help (DSPF), blank = field
18 Reserved Must be blank
19–28 Name Record/field/key name, left-justified, max 10 chars
29 Reference R = take the definition from a referenced field
30–34 Length Right-justified digits; with R also +n/-n to adjust the referenced length
35 Data Type A char, P packed, S zoned, Y numeric (DSPF), L date, T time, Z timestamp, ...
36–37 Decimal Positions Right-justified, numeric fields only; with R also +n/-n
38 Usage B both, I input, O output, H hidden, M message, P program-to-system
39–41 Location: Line Screen/print line (DSPF/PRTF)
42–44 Location: Position Screen/print column (DSPF/PRTF); +n places the entry after the previous one
45–80 Keywords TEXT('...'), COLHDG(...), EDTCDE(Z), SFL, ... and constants such as 'Name:'

You never have to memorize this table — it is exactly what the status bar, hovers, highlight and guides show you in place. You can also open it any time with DDS Canvas: Show Column Reference (or by clicking the status bar item).


Features in detail

1. Status bar assistant

The status bar always shows your current column number and the DDS region it belongs to:

DDS | Col 27 | Name
DDS | Col 34 | Length
DDS | Col 52 | Keywords
  • Updates instantly as the cursor moves. Purely textual, so it also works for colorblind users.
  • Click it to open the interactive column reference.
  • The format is configurable — see Settings. Tokens: {column}, {section}, {fileType}.

2. Column reference and jump

Run DDS Canvas: Show Column Reference from the Command Palette (Ctrl+Shift+P), or click the status bar item. You get a searchable list of every DDS region with its columns and purpose. Selecting an entry moves the cursor to that region on the current line — if the line is too short, it is padded with spaces so you land exactly where you need to type.

Typical use: you are on a new line and need to type the field length. Open the reference, pick "Length", start typing.

3. Hover documentation

Three kinds of hovers, zero configuration:

  • Column hovers — hover anywhere on a line and see the region's name, column range, purpose, valid values (with the file types each one applies to), examples and IBM notes. Example: hovering column 35 lists every data type letter, what it means, and where it is allowed.
  • Keyword hovers — hover any of the 243 keywords (DSPSIZ, SFLNXTCHG, CSRLOC, RTNCSRLOC, WDWTITLE, REFFLD, CA03, ...) and see its signature, an explanation, notes, its valid values, a working example, and where it is allowed (file, record or field level). Keywords that do not belong to the current file type are marked.
  • Value hovers — hover a parameter such as HI in DSPATR(HI), BLU in COLOR(BLU), RZ in CHECK(RZ) or J in EDTCDE(J) and see what that value does.

4. Column guides

Thin vertical lines mark every DDS column boundary (after columns 5, 6, 16, 18, 28, 29, 34, 35, 37, 38, 41, 44 and 80). They use VS Code's native editor rulers, scoped to DDS files only — your other files are untouched, and there is zero performance cost.

The first time you open a DDS file, DDS Canvas asks whether to turn them on. The choice is written to your user settings for the DDS languages only, so you can see it and change it like any other setting. Run DDS Canvas: Apply Recommended Editor Settings at any time to apply them later, and DDS Canvas: Toggle Column Guides to switch them on and off.

5. Section highlight

The column region containing your cursor is shaded very subtly (8% opacity by default, never more than 15%). Only the region is highlighted — never the whole line. It follows your theme automatically; you can also set a custom color.

Toggle it with DDS Canvas: Toggle Section Highlight.

6. Diagnostics

The extension validates as you type (debounced, so large files stay fast) and flags the classic DDS mistakes. The checks know the file type: a usage of H is fine in a display file and wrong in a physical file.

Problem Severity
Text past column 80 Error
Invalid data type, usage or name type (valid in no DDS file at all) Error
Data type, usage or name type that belongs to another file type (e.g. Y in a PF) Warning
Length or decimals not numeric; +n/-n without R in column 29 Error
Anything other than R or blank in column 29 (also an 11-character name spilling into it) Error
Decimal positions exceed the field length Error
Packed/zoned fields over 63 digits, binary over 18, character over 32766 Error
Malformed conditioning indicators; indicators in a PF/LF Error / Warning
Line or position not numeric Error
Subfile record not followed by its SFLCTL; SFLCTL without SFLSIZ/SFLPAG Error
SFLCTL without SFLDSP Warning
Duplicate record format, or duplicate field inside one record Error
Decimal positions on a character, date or time field Warning
Name with invalid characters or not left-justified Warning
Length, decimals, line or position not right-justified Warning
Location on a hidden (H) or program-to-system (P) field; location in a PF/LF Warning
Length/type specified on record (R) or key (K) lines Warning
Tab characters (they shift every column after them) Warning
Column 6 is not A Warning

Referenced fields are handled the way IBM documents them: with R in column 29, a length of +2 or decimals of -1 adjust the referenced definition and are accepted.

Everything appears in the editor as squiggles and in the Problems panel (Ctrl+Shift+M). Comment lines (* in column 7) are always ignored.

Quick fix: realign columns. When a line is wrong only because its entries slid out of their columns — typically after you typed a longer or shorter name over a snippet placeholder — the light bulb (Ctrl+.) offers Realign columns on this line (spaces only). It adds or removes spaces and nothing else, and it is offered only when there is exactly one clean way to fix the line.

7. Keyword completion

Put the cursor in the keyword area (column 45 or beyond) and press Ctrl+Space:

  • Filtered by file type — a .dspf file offers SFL, SFLCTL, WINDOW, DSPATR, ...; a .pf file offers COLHDG, UNIQUE, VARLEN, ...; a .prtf offers SKIPB, SPACEA, PAGNBR, ...
  • Context-aware ordering — keywords that are valid where the cursor is come first: file-level keywords before the first record, record-level keywords under an R line, field-level keywords under a field.
  • Parameter values — inside the parentheses you get the valid values with their meaning: DSPATR( offers HI, RI, PC, ND, ...; COLOR( offers the colors; CHECK(, EDTCDE(, DATFMT( and others work the same way.
  • Function keys — type CA05 or CF12 directly; every key from 01 to 24 is recognized.
  • Nothing pops up while you are typing inside a quoted constant.

Each completion shows the full documentation and inserts a fill-in-the-blanks template, e.g. EDTCDE(Z) with the edit code pre-selected.

8. Snippets

Type a prefix and press Tab. Every snippet is column-perfect: the test suite renders each one and requires zero diagnostics from the extension's own checks, and requires every keyword in it to be valid for its file type. Each file type only sees its own snippets — a .dspf offers the dspf- snippets, a .prtf the prtf- ones; a plain .dds file gets all of them. Single-letter choices (usage, function key type, date format, edit code, ...) are offered as a pick list.

Display files

Prefix Inserts
dspf-file Complete display file: DSPSIZ, PRINT, F3/F12 and a first screen with title, date, time, a field and the key legend
dspf-record Display record with a highlighted title
dspf-input Input-capable character field (B or I) at line/position
dspf-input-num Numeric input/output field (type Y) with an edit code
dspf-output Output-only character field
dspf-output-num Edited numeric output field
dspf-hidden Hidden field (usage H)
dspf-ref Field defined like a database field (R + REFFLD)
dspf-ref-file File-level REF to a field reference file
dspf-constant Constant text at line/position
dspf-title Highlighted title on line 1
dspf-datetime System date and time in the top-right corner
dspf-fkeys Function key legend on line 23
dspf-fkey Function key (CAnn or CFnn)
dspf-error ERRMSG conditioned by an indicator
dspf-errmsgid ERRMSGID from a message file
dspf-error-attr Reverse image + cursor on the field in error (DSPATR(RI PC))
dspf-attr-field Field with a program-controlled attribute (DSPATR(&ATR) + P field)
dspf-subfile Load-all subfile: option field with SFLNXTCHG, control record with SFLSIZ/SFLPAG/SFLDSP/SFLDSPCTL/SFLCLR/SFLEND, SFLRCDNBR, headings and footer
dspf-subfile-page Page-at-a-time subfile with PAGEDOWN/PAGEUP
dspf-sflmsg Message subfile for the program message queue
dspf-window Window with border, top and bottom titles and a field
dspf-dummy ASSUME record that keeps the screen behind windows
dspf-cursor CSRLOC and RTNCSRLOC with their hidden fields
dspf-help Help specification linked to a panel group

Printer files

Prefix Inserts
prtf-file Complete printer file: heading with date and page number, detail and total records
prtf-record Record format with SPACEA
prtf-header Page heading record with SKIPB, title and page number
prtf-field Character field at a position
prtf-field-num Numeric field with an edit code
prtf-constant Constant text at a position
prtf-pagnbr 'Page' label and page number
prtf-datetime System date and time

Physical and logical files

Prefix Inserts
pf-file Complete keyed physical file: UNIQUE, record, fields with TEXT/COLHDG, key
pf-record Record format with a character field
pf-ref File-level REF
pf-colhdg Column heading
field-char, field-varchar Character field, variable-length character field (VARLEN)
field-packed, field-zoned, field-binary Numeric fields (types P, S, B)
field-unicode UTF-16 field (type G, CCSID(1200))
field-date, field-time, field-timestamp Date (L), time (T) and timestamp (Z) fields with format pick list
field-ref Referenced field (R + REFFLD)
key-field, key-descend Key field, descending key field
lf-file Complete keyed logical file over a physical file
lf-record Logical record format with PFILE and a key
lf-select, lf-omit Select / omit specification with COMP
lf-select-values Select by a list of values
lf-join Join logical file (JFILE, JOIN, JFLD)
lf-rename, lf-concat, lf-substring RENAME, CONCAT, SST fields

Every file type

Prefix Inserts
dds-header Header comment block with file name, description, author and date
dds-comment Comment line
dds-separator Section separator comment

9. Outline and breadcrumbs

Record formats, fields, keys and select/omit specifications appear in the Outline view (Explorer sidebar) and in the breadcrumb bar above the editor. Fields show their definition and location, e.g. 30A B 5,20 or R +2 O 8,16 for a referenced field. Click to jump. Ctrl+Shift+O gives you quick symbol navigation inside the file.

10. Toggle comment

Ctrl+/ (Cmd+/ on macOS) comments and uncomments the selected lines the DDS way: an * in column 7. A line conditioned with A/O in column 7 keeps that flag and gets it back when you uncomment.


Commands

Open the Command Palette with Ctrl+Shift+P and type "DDS":

Command What it does
DDS Canvas: Show Column Reference Searchable column cheat sheet; jumps the cursor to the chosen region
DDS Canvas: Toggle Column Guides Show/hide the vertical column rulers
DDS Canvas: Toggle Section Highlight Enable/disable the cursor section highlight
DDS Canvas: Toggle Comment Comment/uncomment the selected lines (* in column 7); bound to Ctrl+/ in DDS files
DDS Canvas: Apply Recommended Editor Settings Turns on the column rulers and indent-with-spaces for the DDS languages in your user settings

Settings

Open Settings (Ctrl+,) and search for "DDS Canvas":

Setting Default Description
ddsCanvas.statusBar.enabled true Show the status bar assistant
ddsCanvas.statusBar.format DDS \| Col {column} \| {section} Status bar text; tokens {column}, {section}, {fileType}
ddsCanvas.statusBar.showIcon true Icon before the status bar text
ddsCanvas.hover.enabled true Column and keyword hovers
ddsCanvas.diagnostics.enabled true DDS validation squiggles
ddsCanvas.completion.enabled true Keyword completion in columns 45–80
ddsCanvas.highlight.enabled true Cursor section highlight
ddsCanvas.highlight.color (theme) Custom highlight color as hex, e.g. #61AFEF
ddsCanvas.highlight.opacity 0.08 Highlight opacity, capped at 0.15

Recommended editor settings

DDS Canvas never changes your editor settings silently. The first time you open a DDS file it asks once whether to apply two settings, scoped to the DDS languages only:

Setting Value Why
editor.rulers the DDS column boundaries The column guides
editor.insertSpaces true A tab character shifts every DDS column after it; pressing Tab inserts spaces instead

Not Now asks again next time; Don't Ask Again never asks again. Either way you can apply them later with DDS Canvas: Apply Recommended Editor Settings, and remove them from your settings.json like any other setting.


File detection

These extensions are recognized automatically (case-insensitive):

File extension Language ID Language name
.pf dds.pf DDS Physical File
.lf dds.lf DDS Logical File
.dspf dds.dspf DDS Display File
.prtf dds.prtf DDS Printer File
.dds dds DDS

The dds.* IDs are the standard IBM i community language IDs (also used by IBMi Languages and Code for IBM i), so DDS Canvas and the rest of the ecosystem recognize the same files the same way.

If your sources use different names — for example members downloaded as .MBR or files without extensions — map them to the right DDS language in your settings:

"files.associations": {
  "*.MBR": "dds",
  "CUSTDSP*": "dds.dspf"
}

You can also click the language indicator in the status bar (bottom right) and choose one of the DDS languages for the current file.

Note: DDS Canvas is for DDS sources only. RPGLE, SQLRPGLE and CLLE members are not DDS — support for those languages is on the roadmap but a fixed-format RPG file will not activate this extension.


Using DDS Canvas with Code for IBM i and display-file extensions

DDS Canvas is an editing assistant and is designed to work alongside the IBM i ecosystem — Code for IBM i, IBMi Languages, Display File render/preview and DSPF designer/editor extensions.

Since v0.3.0, DDS Canvas uses the same language IDs as those extensions (dds.pf, dds.lf, dds.dspf, dds.prtf), so there is no conflict over who owns a file: a .dspf opens as a DDS Display File for every extension at once. Display-file previews render, graphical DSPF editors work, and DDS Canvas keeps providing the status bar, hovers, diagnostics, completion, snippets, guides and highlight on the very same file — nothing to configure.


Frequently asked questions

Nothing happens when I open my file. Check the language indicator in the bottom-right of the status bar. It must say DDS or one of the DDS file types (DDS Display File, DDS Physical File, ...). If it says "Plain Text" (or "RPGLE"), the file was not recognized — click the indicator and select a DDS language, or add a files.associations entry as shown above.

I don't see the column guides. They are standard VS Code rulers and are only added when you accept them. Run DDS Canvas: Apply Recommended Editor Settings, or DDS Canvas: Toggle Column Guides.

Can I change where the column guides are? Yes. They live in your user settings under "[dds.dspf]": { "editor.rulers": [...] } (and the same for dds, dds.pf, dds.lf, dds.prtf). Edit them there, per user or per workspace.

My diagnostics say a referenced field is wrong. With R in column 29, +n/-n in the length (30–34) and decimals (36–37) are valid. Check that the R really is in column 29 — the status bar shows the column — and that the value is right-justified (ending in column 34 or 37).

The highlight is too strong / too weak. Adjust ddsCanvas.highlight.opacity (0.02–0.15) or set a custom ddsCanvas.highlight.color.

Does it work with my theme? Yes. All colors default to your theme's own tokens (tested with One Dark Pro, Dark+, GitHub Dark, Catppuccin and Dracula). Nothing is hard-coded or bright.

Is it fast on large sources? Yes. Parsing is line-based and cached, diagnostics are debounced, decorations touch only the active editor, and the status bar updates only when the cursor moves.

Does it compile my DDS? No. DDS Canvas is an editing assistant; it does not replace the IBM i compiler. Pair it with Code for IBM i or your usual deployment workflow to compile.


Roadmap

  • More quick fixes (the first one, realign columns, is in 0.4.0)
  • IBM keyword parameter validation
  • PF/LF relationship viewer
  • Localization
  • RPGLE / SQLRPGLE / CLLE support in a companion experience

Development

npm install
npm run compile   # build
npm test          # 92 unit tests: parser, columns, rules, keywords, editing, snippets, samples
npm run lint

Press F5 in VS Code to launch an Extension Development Host. Sample sources to play with are in samples/.

The core (parser, column map, diagnostic rules) is pure TypeScript with no VS Code dependencies. The single source of truth for the layout is src/constants/columns.ts; every feature derives from it.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft