Skip to content

Commit 9ed67eb

Browse files
Resolve conflict
Signed-off-by: Sanjula Ganepola <Sanjula.Ganepola@ibm.com>
2 parents d4956d8 + d989b08 commit 9ed67eb

File tree

10 files changed

+114
-18
lines changed

10 files changed

+114
-18
lines changed

.astro/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"_variables": {
3-
"lastUpdateCheck": 1756135576916
3+
"lastUpdateCheck": 1756490224047
44
}
55
}

src/content/docs/dev/api.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,54 @@ export function loadBase(): CodeForIBMi|undefined {
6565
export function getInstance(): Instance|undefined {
6666
return (baseExtension && baseExtension.isActive && baseExtension.exports ? baseExtension.exports.instance : undefined);
6767
}
68-
```
68+
```
69+
70+
## Outside of VS Code
71+
72+
**This is not production ready**.
73+
74+
<details>
75+
<summary>Click to expand</summary>
76+
77+
On the main branch of vscode-ibmi, the IBM i API is written so it is can be portable and used outside of the VS Code namespace (this is how the vitest tests work). Until we publish the API as a standalone package, you will need to manually import the API.
78+
79+
After using `npm i github:codefori/vscode-ibmi`, you will need to cleanup/remove everything but the `src/api` directory.
80+
81+
```ts
82+
//#webpack.config.js
83+
84+
function prepareIbmiApi() {
85+
const ibmiApi = path.join(__dirname, `node_modules`, `vscode-ibmi`, `src`, `api`);
86+
const ibmiPackage = path.join(__dirname, `node_modules`, `vscode-ibmi`, `src`);
87+
88+
const checkDirectory = (dir) => {
89+
if (fs.existsSync(dir)) {
90+
const files = fs.readdirSync(dir);
91+
files.forEach(file => {
92+
const filePath = path.join(dir, file);
93+
const stat = fs.lstatSync(filePath);
94+
const canDelete = !ibmiApi.startsWith(filePath) && !filePath.startsWith(ibmiApi);
95+
if (stat.isDirectory()) {
96+
// If the directory is not the api directory, delete it
97+
if (canDelete) {
98+
fs.rmdirSync(filePath, { recursive: true });
99+
// console.log(`Deleted directory: ${filePath}`);
100+
} else {
101+
checkDirectory(filePath);
102+
}
103+
} else if (stat.isFile()) {
104+
if (canDelete) {
105+
fs.unlinkSync(filePath);
106+
// console.log(`Deleted file: ${filePath}`);
107+
}
108+
}
109+
});
110+
}
111+
}
112+
113+
checkDirectory(ibmiPackage);
114+
}
115+
```
116+
117+
You will also need to enable `allowTsInNodeModules: true` with `ts-loader` in webpack.
118+
</details>

src/content/docs/developing/debug/index.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Guide
2+
title: Guide
33
---
44
import { Aside, CardGrid, Card, Icon, Tabs, TabItem } from '@astrojs/starlight/components';
55

@@ -91,12 +91,12 @@ To make use of the Debug Service, you need the following PTFs:
9191

9292
* Java 11 information:
9393
* `/QOpenSys/QIBM/ProdData/JavaVM/jdk11/64bit`
94-
* [IBM documentation for PTFs](https://www.ibm.com/support/pages/download-installation-and-usage-java-11-ibm-i-os)
94+
* [IBM documentation for PTFs](https://www.ibm.com/support/pages/download-installation-and-usage-java-11-ibm-i-os)
9595

96-
<Aside type="danger">
97-
Two defective PTF's are included in IBM i 7.5 [Java PTF Group SF99955 level 15](http://www.ibm.com/support/docview.wss?uid=nas4SF99955), released on 2025-07-03: **SJ05893 and SJ05889**.
98-
99-
After applying these PTFs, the debug service will no longer start. Please remove these PTFs for the debug service to work again.
96+
<Aside type="note">
97+
IBM i 7.5 Java PTF Group SF99955 level 15 and IBM i 7.4 Java PTF Group SF99665 level 28 contained two defective PTF's for Java 11. These PTF's has now been superceded by newer PTF's included in PTF Group SF99955 level 16 for 7.5 and PTF Group SF99665 level 29 for 7.4.
98+
99+
For more information, read [this IBM Support document](https://www.ibm.com/support/pages/node/7239287)
100100
</Aside>
101101

102102
</TabItem>
@@ -109,7 +109,7 @@ To make use of the Debug Service, you need the following PTFs:
109109
* 7.3 PTF SJ02996
110110
* Java 11 is required via LPP 5770JV1 Option 19 (not Java from Yum)
111111
* `/QOpenSys/QIBM/ProdData/JavaVM/jdk11/64bit`
112-
* [IBM documentation for PTFs](https://www.ibm.com/support/pages/download-installation-and-usage-java-11-ibm-i-os)
112+
* [IBM documentation for PTFs](https://www.ibm.com/support/pages/download-installation-and-usage-java-11-ibm-i-os)
113113
* 5770WDS option 60 is required
114114
* Workstation Tools - Base
115115

@@ -122,7 +122,7 @@ To make use of the Debug Service, you need the following PTFs:
122122
* IBM i 7.3 PTF SI85976 and SI82198
123123
* Java 11 is required via LPP 5770JV1 Option 19 (not Java from Yum)
124124
* `/QOpenSys/QIBM/ProdData/JavaVM/jdk11/64bit`
125-
* [IBM documentation for PTFs](https://www.ibm.com/support/pages/download-installation-and-usage-java-11-ibm-i-os)
125+
* [IBM documentation for PTFs](https://www.ibm.com/support/pages/download-installation-and-usage-java-11-ibm-i-os)
126126
* 5770WDS option 60 is required
127127
* Workstation Tools - Base
128128

@@ -144,15 +144,15 @@ After you have installed the PTFs, the connection inside of Visual Studio Code w
144144
## Configuring & starting the service
145145

146146
This must be done with user that has *ALLOBJ and *SYSADM privlages.
147-
Below are the base requirements to configure the certificate:
147+
Below are the base requirements to configure the certificate:
148148
- Master key 1 is set (this can be done in Navigator for IBM i under Security > Cryptographic Services Key Management > Manage Master Keys)
149149
- *SYSTEM store is populated with a valid certificate (this can be done in Digital Certificate Manager)
150150

151151
1. On Navigator for IBM i, go to Network > Servers > TCP/IP Servers
152152
2. Scroll down to System Debugger and right click
153153
3. Hover over Stop Instance, select Debug Service
154154
![](image-4.png)
155-
4. Right click System Debugger again, select Regenerate Debug Service Trust Store
155+
4. Right click System Debugger again, select Regenerate Debug Service Trust Store
156156
![](image-3.png)
157157
5. Enter in the password for the *SYSTEM store, click OK
158158
![](image-1.png)
487 KB
Loading
743 KB
Loading
73.6 KB
Loading

src/content/docs/extensions/db2i/index.mdx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,22 @@ update: select * from sample.employee;
7777

7878
Enter the value `null` to set a column to *null*. If the column cannot accept at least 4 characters, then `-` (a dash) may be used.
7979

80+
### Binding parameters
81+
82+
It is possible to bind to SQL parameters inside of SQL statements - both `?` markers and named parameters (e.g. `:param1`) are supported - by using the `bind:` prefix. `bind:` is followed by a list of strings or numbers, either space or comma separated. When executing the prefix, it will find the most previous statement in the document to bind to.
83+
84+
```sql
85+
select * from employee where empno = ?;
86+
87+
bind: '000010';
88+
bind: '000020';
89+
90+
select * from employee where empno = ? and workdept = ?;
91+
92+
bind: '000010', 'A00';
93+
bind: '000020', 'A00';
94+
```
95+
8096
## Syntax checking
8197

8298
When connected to an IBM i, the syntax checker has the following options:
@@ -119,6 +135,21 @@ The Db2 for i extension adds a view called Schema Browser which allows the user
119135

120136
If you are using the Schema Browser to browse objects, you are able to use the 'View contents' icon when hovering over a table, view, or alias to cause a basic SQL select statement to be generated and executed.
121137

138+
139+
## Using Examples
140+
141+
The Examples view provides users with a set of SQL example scripts that can be used as a learning tool or as a starting point for their own SQL scripts. These examples are grouped into categories to make it easy to find what you are looking for. You can hover over any example to get a preview of the SQL script or click on it to open a copy which you can freely edit.
142+
143+
![](./images/examplesPreview.png)
144+
145+
On top of the built-in examples, users can also add specific directories containing their own SQL examples using the `Add...` button under the `Custom Examples Directories` submenu on the Examples view. All SQL files in the specified directories and at most one subdirectory level deeper will be picked up. By default, the folder name will be the category and the file name will be the name of the example. This can be customized by optionally including a comment in the file with the tags `category` and `description`.
146+
147+
![](./images/examplesAdd.png)
148+
149+
Once you have added a custom examples directory, you can quickly save new examples to that directory using the `Save As New Example` button in the Examples view.
150+
151+
![](./images/examplesSave.png)
152+
122153
## SQL Error Logging Facility (SELF)
123154

124155
SQL Error Logging Facility (SELF) offers a comprehensive view that can help users understand specific SQL errors or warnings. The SELF view can be accessed through the IBM i panel next to the Results View.

src/content/docs/settings/connection.mdx

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
---
2-
title: Connection
2+
title: Connection
33
---
44

55
import { Aside } from '@astrojs/starlight/components';
66

77
Multiple connections can be defined and some settings are specific to a connection and can be saved for the connection and later reloaded.
88

9+
### Read only mode
10+
11+
When checked, you can not change any content on the server, run any actions on the server or open any terminal.
12+
You can only browse the content of the server, and members and streamfiles will always be opened in readonly mode.
13+
14+
<Aside type="note">
15+
This setting can be controlled by the IBM i system administrator in the [system settings](../system/).
16+
</Aside>
17+
18+
<Aside type="danger">
19+
This setting can only protect against changes from Code for IBM i. It will not protect against changes from any other interface or application.
20+
21+
Configuration of IBM i object security on the server is advised!
22+
</Aside>
23+
924
### Current library
1025

1126
The library which will be set as the current library during compilation.
1227

13-
You can change the current library with the 'Change build library' command (F1 -> Change build library).
28+
You can change the current library with the 'Change Current Library' command in the Command Palette (F1).
1429

1530
### Home Directory
1631

@@ -20,15 +35,15 @@ Home directory for user. This directory is also the root for the IFS browser.
2035

2136
Temporary library. Stores temporary objects used by Code for i. Will be created automatically if it does not exist. Cannot be QTEMP. Default value is `ILEDITOR`.
2237

23-
<Aside type="danger">
38+
<Aside type="note">
2439
If your IBM i runs replication software, there is no need to replicate the temporary library. Your sysadmin may add it to the list of objects to be ignored.
2540
</Aside>
2641

2742
### Temporary IFS directory
2843

2944
Temporary IFS directory. Stores temporary IFS files used by Code for i. Will be created automatically if it does not exist. Must be in root or QOpenSys filesystem. Default value is `/tmp`.
3045

31-
<Aside type="danger">
46+
<Aside type="note">
3247
If your IBM i runs replication software, there is no need to replicate the temporary directory. Your sysadmin may add it to the list of path to be ignored.
3348
</Aside
3449
>
-64.4 KB
Loading

src/content/docs/settings/system.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ As of Code for IBM i 2.16.3, the extension supports system-wide settings that ca
88

99
All configuration files related to VS Code settings should be stored under `/etc/vscode/` in the IFS.
1010

11-
![](./settings_json.png)
12-
1311
### Code for IBM i settings
1412

13+
![](./settings_json.png)
14+
1515
The path is `/etc/vscode/settings.json`. The top level is a JSON object that can contain different properties. Below is a table for the first level of properties. If sub-properties are not described here, refer to the content assist while working on the file.
1616

1717
| Property | Description |

0 commit comments

Comments
 (0)