Mainframe Record ViewerBrowse mainframe data files in Visual Studio Code, record by record. A dataset copied down from z/OS is not a text file: it is a stream of fixed-length records, or records behind a descriptor word, written in EBCDIC. Opening one in an editor shows a wall of mojibake with no record boundaries. This extension shows it the way the mainframe does - one record per line, in text, in hex, or in both at once - and lets you search it. It reads the file only. Nothing is ever written back. What it reads
Code pages: the EBCDIC pages a dataset is normally written in (037, 273, 277, 278, 280, 284, 285, 297,
500, 870, 871, 875, 1025, 1026, 1047, and the 1140-1149 euro variants), plus Windows-1252, ISO 8859-1,
OEM 850 and OEM 437. Either the CCSID ( Variable files that carry a Micro Focus file header are recognised by it, and the header is skipped. The three-line viewHex is written vertically, the way RecordEditor and ISPF write it: the high nibble of a byte above its low nibble, one byte per column, under the character it stands for. So a byte, its hexadecimal and the column number on the ruler are always in the same place, and a field's position can be read off the screen.
View switches between the text alone, the two hex lines alone, and all three. Opening a file
Opening a Raincode catalog To make the viewer the default editor for an extension, add an editor association - VS Code offers it under Configure Editor Association too:
Files that are not on a local diskA dataset on an SSH mount (the SSH FS extension's A file opened in a Remote - SSH or WSL window is not affected: there the extension runs on the remote machine, the file is local to it, and it is read a page at a time like any other. Reading settingsReading settings opens what the file is being read as, and every part of it can be changed while the file is open: record format, record length, variable-record header, code page, the offset the first record starts at, and whether a zero byte escapes the byte that follows it in a line-sequential file. Applying a change rereads the file. What you choose is remembered per file, so the next time you open it, it opens the way you left it. A file whose metadata is wrong - a SearchingType a value and press Find:
Matches are highlighted, ▲ and ▼ step through them, and Only matches hides everything else. A search over a large file reports its progress and can be stopped. Settings
Large filesNothing is loaded whole. Records are read a page at a time through one sliding window, and a fixed file is counted arithmetically rather than walked. A variable or line-sequential file has to be walked once to be counted - that runs in the background, the record count grows as it goes, and only every 256th record offset is kept, so the memory it costs stays in kilobytes whatever the file's size. Not in this versionEditing, field-by-field decoding against a copybook, VSAM KSDS and D-ISAM files, PDS members and GDG generations. For those, and for editing, use RecordEditor and CatalogExplorer. Licence and supportMIT - see LICENSE.txt. The extension is provided as is: no warranty, no liability, and no support. Use it under your own responsibility. Bug reports and pull requests are welcome, and nothing is promised about them. Made by Raincode Labs. Source and issues: github.com/raincodelabs/vscode-recordviewer. |