|
| 1 | +--- |
| 2 | +title: Structured Download |
| 3 | +--- |
| 4 | + |
| 5 | +import { CardGrid, Card, Aside, Icon } from '@astrojs/starlight/components'; |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +**Download...** in the Object Browser is a submenu that offers three ways to download IBM i source members to a local folder. The original single-member download is still available as **Member**, and two new structured layout options organize downloads into subfolders that reflect the IBM i QSYS hierarchy. |
| 10 | + |
| 11 | +The structured options are particularly useful when migrating IBM i source into a Git repository, as they produce a folder layout that is ready for version control. |
| 12 | + |
| 13 | +## How to Use |
| 14 | + |
| 15 | +<CardGrid> |
| 16 | + |
| 17 | +<Card> |
| 18 | + |
| 19 | +1. In the **Object Browser/Filter**, right-click one of the following: |
| 20 | + - A **source physical file (PF-SRC) name** — downloads all members in that file |
| 21 | + - Select one or more **source members** — downloads the selected members |
| 22 | +2. Hover over **Download...** to reveal the submenu |
| 23 | +3. Choose a download option: |
| 24 | + - **Member** — saves a single member via a Save-as dialog (original behavior) |
| 25 | + - **File → Member** — structured download to a subfolder named for the Source File |
| 26 | + - **Library → File → Member** — structured download to a library->file folder structure with the members stored under the file name folder. |
| 27 | +4. For structured options, choose a **base download folder** on your local machine when prompted |
| 28 | +5. Subfolders and files are created automatically |
| 29 | + |
| 30 | +</Card> |
| 31 | + |
| 32 | +<Card> |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +</Card> |
| 37 | + |
| 38 | +</CardGrid> |
| 39 | + |
| 40 | +## Download Options |
| 41 | + |
| 42 | +### Library → File → Member |
| 43 | + |
| 44 | +<CardGrid> |
| 45 | + |
| 46 | +<Card> |
| 47 | + |
| 48 | +Use this when you want the full IBM i path preserved locally. |
| 49 | + |
| 50 | +Given IBM i source in library `DEVLIB`: |
| 51 | + |
| 52 | +``` |
| 53 | +DEVLIB |
| 54 | +├── QRPGLESRC |
| 55 | +│ ├── PROGRAMA.RPGLE |
| 56 | +│ ├── PROGRAMB.RPGLE |
| 57 | +│ └── PROGRAMC.RPGLE |
| 58 | +├── QCLLESRC |
| 59 | +│ └── STARTJOB.CLLE |
| 60 | +├── QCMDSRC |
| 61 | +│ └── STARTJOB.CMD |
| 62 | +└── QSQLSRC |
| 63 | + ├── CUSTOMERS.SQL |
| 64 | + └── INVENTORY.SQL |
| 65 | +``` |
| 66 | + |
| 67 | +</Card> |
| 68 | + |
| 69 | +<Card> |
| 70 | + |
| 71 | +After choosing `~/myproject` as the base download folder: |
| 72 | + |
| 73 | +``` |
| 74 | +~/myproject/ |
| 75 | +└── DEVLIB/ |
| 76 | + ├── QRPGLESRC/ |
| 77 | + │ ├── PROGRAMA.RPGLE |
| 78 | + │ ├── PROGRAMB.RPGLE |
| 79 | + │ └── PROGRAMC.RPGLE |
| 80 | + ├── QCLLESRC/ |
| 81 | + │ └── STARTJOB.CLLE |
| 82 | + ├── QCMDSRC/ |
| 83 | + │ └── STARTJOB.CMD |
| 84 | + └── QSQLSRC/ |
| 85 | + ├── CUSTOMERS.SQL |
| 86 | + └── INVENTORY.SQL |
| 87 | +``` |
| 88 | + |
| 89 | +</Card> |
| 90 | + |
| 91 | +</CardGrid> |
| 92 | + |
| 93 | +### File → Member |
| 94 | + |
| 95 | +<CardGrid> |
| 96 | + |
| 97 | +<Card> |
| 98 | + |
| 99 | +Use this when want the source files to sit directly inside your project folder with their members below them — for example, downloading to a folder named `Pickles` that receives `QRPGLESRC`, `QCLLESRC`, etc. builds the folder structure using the source file names as subfolders. |
| 100 | + |
| 101 | +After choosing `~/Pickles` as the base download folder: |
| 102 | + |
| 103 | +``` |
| 104 | +~/Pickles/ |
| 105 | +├── QRPGLESRC/ |
| 106 | +│ ├── PROGRAMA.RPGLE |
| 107 | +│ ├── PROGRAMB.RPGLE |
| 108 | +│ └── PROGRAMC.RPGLE |
| 109 | +├── QCLLESRC/ |
| 110 | +│ └── STARTJOB.CLLE |
| 111 | +├── QCMDSRC/ |
| 112 | +│ └── STARTJOB.CMD |
| 113 | +└── QSQLSRC/ |
| 114 | + ├── CUSTOMERS.SQL |
| 115 | + └── INVENTORY.SQL |
| 116 | +``` |
| 117 | + |
| 118 | +</Card> |
| 119 | + |
| 120 | +<Card> |
| 121 | + |
| 122 | +#### Collision handling |
| 123 | + |
| 124 | +<Aside type="caution"> |
| 125 | + |
| 126 | +If members from **different libraries** share the same `FILE/MEMBER.EXT` path, silently overwriting one with the other would result in data loss. Instead, those specific members automatically fall back to the full `LIBRARY/FILE/MEMBER.EXT` structure, and a warning notification identifies the collisions. All non-colliding members still use the flat `FILE/MEMBER` layout. |
| 127 | + |
| 128 | +</Aside> |
| 129 | + |
| 130 | +</Card> |
| 131 | + |
| 132 | +</CardGrid> |
| 133 | + |
| 134 | +## Comparison of Download Options |
| 135 | + |
| 136 | +| | Download → Member | Download → File→Member | Download → Library→File→Member | |
| 137 | +|---|---|---|---| |
| 138 | +| Single member | `MEMBER.EXT` | `FILE/MEMBER.EXT` | `LIBRARY/FILE/MEMBER.EXT` | |
| 139 | +| Multiple members | All Members in one folder | `FILE/MEMBER.EXT` tree (library omitted) | Full `LIBRARY/FILE/MEMBER.EXT` tree | |
| 140 | +| Best for | Quick one-off save | Single-library Git project setup | Multi-library or full-archive download | |
| 141 | + |
| 142 | +## Notes |
| 143 | + |
| 144 | +- The base download folder you select is remembered as the default for future downloads |
| 145 | +- The member's source type (aka `SEU type`) is used as the file extension. |
| 146 | +- If a member's source type is blank, the file extension is set to `.MBR` |
| 147 | +- All library, file, and member names are created in **uppercase** |
| 148 | +- Subfolders (for each library and file) are created automatically if they do not exist. |
| 149 | +- Source change dates (SEU sequence/date columns) are **not** downloaded — the recommended approach for change management for these objects is **Git** |
| 150 | + |
| 151 | +For further reading on local development and Git workflows with IBM i, see the [Code for IBM i documentation](https://codefori.github.io/docs/developing/local/getting-started/)<Icon name="external" color="cyan" class="icon-inline" />. |
0 commit comments