IBMi Source Member Checkout
Check out IBM i source members locally, edit them offline, and merge changes back using VS Code's built-in diff editor. Works with Code for IBM i. Why?Editing source members directly through Code for IBM i saves straight to the IBM i on every keystroke-save. This extension lets you check out a local copy, work at your own pace, and merge changes back when ready — with full diff support and source date preservation. This allows AI tools to work with your source files locally. ImportantI would go into the settings and change the local folder to a different location than the default. The default is in the extension storage. This just makes finding the folder easier to open in the workspace. The easiest way is IBM i Checkout: Move Checkout Folder... (Command Palette, or the ... menu on the Checked Out Members panel). It moves any members you've already checked out into the new folder and updates the setting for you. Editing the setting directly only affects new checkouts — existing ones stay where they are. Settings
FeaturesCheck Out MembersRight-click a member in the Code for IBM i Object Browser and choose Check Out Member. The source downloads to a local file (named after the member, e.g. Select multiple members (Ctrl/Shift-click) before checking out, and they're all downloaded together — if any are already checked out, you're asked once whether to re-download or skip them. Checked Out Members PanelHover over a checkout to see its member text, status, checkout dates and local path. Member text is recorded at checkout, and checkouts made before it was recorded pick it up on their next refresh. Checkouts are grouped Library → Source File → Member. Libraries and source files start collapsed; use Expand All in the panel toolbar to open everything, or search by member name to show only the matching members, already expanded.
Check Out All MembersRight-click a source file (one level above members) and choose Check Out All Members to pull down every member it contains in one go. Since this can mean a lot of members, a confirmation dialog warns that it may take a while before starting. Protected Filter MembersCheckout is hidden by default for members in a protected (read-only) filter. Enable Merge Back to IBM iRight-click a checkout and choose Merge Back to IBM i to open a diff view — your local changes on the left, the live remote member on the right. Use VS Code's merge arrows to selectively apply changes, then save the remote side; Code for IBM i handles the upload and preserves source dates. Upload to IBM iFor a quick full replace, use Upload to IBM i. This overwrites the remote member with your local copy. A warning confirms that source dates will not be preserved. If any lines are longer than the source file's record length allows, the confirmation lists them, since they would be cut off. New Members (Files Created Locally)If a file is created in the checkout folder outside the extension (by hand, by a tool, or by an AI assistant), for example
Create on IBM i is also offered for members flagged Remote member does not exist, to put them back on the IBM i. If a file for a member whose checkout shows Local file missing turns up in the checkout folder (for example you changed its extension or moved it back), the scan offers to re-link that checkout to it. Its checkout history is kept, so the next refresh compares it properly. Missing Local FilesOpening a checkout whose local file is missing (double-click, Open Local File, or a refresh) offers:
Re-checkout from IBM iRight-click a checkout and choose Re-checkout from IBM i to replace your local copy with a fresh download of the remote member, without having to refresh first. This discards any local changes, so a confirmation dialog is shown before proceeding. Works on a multi-selection. Refresh Remote StatusCompares your local file, the live remote content, and the remote content as it was at checkout time (not just a stale comparison) to classify each checkout:
Trailing blank lines (including lines that contain only blank padding) are ignored when comparing, so extra blank lines at the end of a member don't make it look out of sync. Refresh per member (inline icon or context menu, with a conflict prompt to Merge Back or Re-checkout), per source file, per library, or for every checkout at once from the panel toolbar. Members are refreshed in the order the panel shows them, and the progress notification shows which member is being checked. Compare WithRight-click a checkout for comparison tools: Select for Compare (mark one checkout, then Compare with Selected on another), Compare with Active File, Compare with Local File, Compare with IFS File, or Compare with Member (any source member by path). Other Actions
Multi-SelectThe Checked Out Members panel supports selecting multiple checkouts at once. Open Local/Remote File, Run Action, Upload to IBM i, Create on IBM i, Re-checkout from IBM i, Refresh Remote Status, and Discard Checkout all work on a multi-selection, each confirming with a message naming how many members the action will affect before proceeding. Actions that only make sense for one item at a time (Merge Back, Compare With, Copy Member Path, Reveal in File Explorer) are single-selection only. Settings
Local File Structure
Organizing by system, library, and source file preserves the original filename for compilation and prevents collisions across different IBM i systems. Requirements
LicenseGPL-3.0 |