Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .astro/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1719327976015
}
}
7 changes: 7 additions & 0 deletions .astro/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@ declare module 'astro:content' {
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"extensions/clle/index.mdx": {
id: "extensions/clle/index.mdx";
slug: "extensions/clle";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"extensions/db2i/index.mdx": {
id: "extensions/db2i/index.mdx";
slug: "extensions/db2i";
Expand Down
4 changes: 4 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ export default defineConfig({
autogenerate: { directory: 'extensions/rpgle/' },
collapsed: true,
},
{
label: 'CLLE',
link: 'extensions/clle'
}
],
collapsed: false,
},
Expand Down
Binary file added src/assets/clle/ExCL_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/ExCL_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/ExCL_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/ExCL_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/ExCL_05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/ExCL_06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/ExCL_07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/ExCL_21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/ExCL_22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/ExCL_23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/ExCL_Box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/Install_CL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/RunCL_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/RunCL_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/RunCL_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/assist_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/assist_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/assist_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clle/assist_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
97 changes: 97 additions & 0 deletions src/content/docs/extensions/clle/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: CLLE Language tools
---

import { CardGrid, Card, Tabs, TabItem } from '@astrojs/starlight/components';
import { Aside, Icon } from '@astrojs/starlight/components';

__Command Language__ is the scripting language for the IBM i operating system. This extension assists in CLP or CLLE program development, providing:

- Content assist for CL commands
- Outline view
- Go to or peek definition and references

It also provides support for running a CL statement with `Ctrl+r`.

## Installation

The CL Language tools extension can be [installed from the Marketplace](https://marketplace.visualstudio.com/items?itemName=IBM.vscode-clle)<Icon name="external" color="cyan" class="icon-inline" /> and is also part of the [IBM i Development Pack](https://marketplace.visualstudio.com/items?itemName=HalcyonTechLtd.ibm-i-development-pack)<Icon name="external" color="cyan" class="icon-inline" />.
<CardGrid>
<Card>
Or it can be installed from the Extension view inside Visual Code.
</Card><Card>
![Install CLLE](../../../../assets/clle/Install_CL.png)
</Card>
</CardGrid>
## Content Assist

Content Assist is triggered by `Ctrl+space`. This is best explained by examples.

### Content Assist Example 1

Suppose you want to create a data area with the CRTDTAARA command. Enter CRTDTAARA __follwed by a space__, like this: ![Example Step 1](../../../../assets/clle/ExCL_01.png)

Press `Ctrl+space` to invoke Content Assist to produce a pick list like this:
![Example step 2](../../../../assets/clle/ExCL_02.png)

Press `enter` or `tab` to accept the highlighted "`All parameters`" from the pick list and a skeleton command is created: ![Example step 3](../../../../assets/clle/ExCL_03.png)

The cursors is in the first parameter value `DTAARA`. Enter the data area name, then press the `tab` key to move the cursor to the next parameter, `TYPE`: ![Example step 4](../../../../assets/clle/ExCL_04.png)

Press `Ctrl+space` to produce a pick list of valid types: ![Example step 5](../../../../assets/clle/ExCL_05.png)

Highlight `*CHAR`, then `tab` to move to the `LENGTH` parameter. Enter 20, then tab to `VALUE`. The value can be a text string or it can be a variable. Use`Ctrl+space` to get a pick list of variables (just one in this example): ![Example step 6](../../../../assets/clle/ExCL_06.png)

Chose the variable. Delete the other unneeded parameter and you have a completed command: ![Example step 7](../../../../assets/clle/ExCL_07.png)


### Content Assist Example 2

If you are familar with a command, you do not have to create a skeleton with all parameters. Suppose you have typed this far: ![Example 2 step 1](../../../../assets/clle/ExCL_21.png)

When you type `t` a pick list of parameters that start with `t` is provided: ![Example 2 step 2](../../../../assets/clle/ExCL_22.png)

If a pick list is too long, you can enter additional characters to reduce it. In this case, if you entered `ty` only `TYPE` would appear in the pick list.

Select `TYPE` and the cursor is in the type value field where you can do `Ctrl+space` to get a pick list of valid types: ![Example 2 step 3](../../../../assets/clle/ExCL_23.png)


### Content Assist Snippets

Prompting of most CL commands requires a connection to a server. However, there are a number of commands that are provided as snippets, which don't require a connection. `DCL`, for example, is provided as a snippet.

Commands that are provided as snippets are preceeded by a "box": ![Example 2 step 3](../../../../assets/clle/ExCL_Box.png)

To declare a variable, enter just "d" and get a list of commands that begin with "d":

![Command assist](../../../../assets/clle/assist_01.png)

Since the "`DCL`" command is highlighted, hit enter and get a pick list of available parameters:

![Command assist all keywords](../../../../assets/clle/assist_02.png)

The "`VAR`" parameter value is selected, so enter the variable name, then tab to the "`TYPE`" parameter value:

![Command assist parameter](../../../../assets/clle/assist_03.png)

If all the valid valued for "`TYPE`" are know, just enter a valid value, for example "*CHAR". Or delete the highlighted value and key `Ctrl+Space` to get a pick list of the valid values:

![Command assist parameter](../../../../assets/clle/assist_04.png)

## CL Code Runner

A CL command may be executed by highlighting the command and pressing `Ctrl+r`.

### Code Runner Example
The two lines of the `CRTMSGF` command are highlighted:
![Run CL example 1](../../../../assets/clle/RunCL_01.png)

Press `Ctrl+r` and success is reported:![Run CL example 1](../../../../assets/clle/RunCL_02.png)

Click `Open output` if you want more detail or if the command fails: ![Run CL example 1](../../../../assets/clle/RunCL_03.png)




Not all CL commands may be executed.