You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,14 @@ Sample scripts for each product are located in the directory that shares its nam
8
8
9
9
Alternatively, you can select from the use cases below:
10
10
11
+
## Code4z - VS Code extension for the example.com company
12
+
This is an [example](code4z/example-com-extension) of an extension that a fictitious company `example.com` might want to create to supplement Code4z with custom, company-specific functionality. It shows how to make the functionality of custom in-house ISPF applications available in VS Code.
13
+
11
14
## Endevor - Automated Test Facility for Batch Applications
12
15
This [sample repository](endevor/Automated-Test-Facility-for-Batch-Applications) contains artifacts described in the [How to Leverage Endevor Processors to Test Batch Applications](https://medium.com/modern-mainframe/how-to-leverage-endevor-processors-to-test-batch-applications-6247a9dfdafa) blog on Medium. The objects are for using Endevor processors in Building an Automated Test Facility for Batch Applications in Endevor.
13
16
14
17
## Endevor - Self-servicing Project Workareas in Endevor with Dynamic Environments
18
+
15
19
This [sample repository](endevor/Self-servicing-Project-Workareas-in-Endevor-with-Dynamic-Environments) contains artifacts described in the [Self-servicing Project Workareas in Endevor with Dynamic Environments](https://medium.com/modern-mainframe/self-service-developer-workspaces-in-endevor-3b83c72bdc14) blog on Medium. The objects are sample processors for enabling self service with Dynamic Environments backed by Deferred File Creation.
This is an example of an extension the company `example.com` might want to create to supplement Code4z with custom, company-specific functionality.
4
+
5
+
## Make Your Custom ISPF Apps Available in VS Code
6
+
7
+
If you have custom ISPF panels for your internal processes, you can make their functionality available in VS Code as part of your DevOps modernization.
8
+
9
+
The following sections outline the steps to take.
10
+
11
+
### Update Your ISPF Application to Run in Plain TSO
12
+
13
+
1. Update your ISPF application to accept arguments instead of relying on screen inputs.
14
+
1. Update the application to store its output to a dataset, or print it to the terminal instead of showing the result on an ISPF screen.
15
+
1. Test your updated application by running it in TSO without ISPF and check its output.
16
+
1. Run your updated application through Zowe CLI. Issue the following command: `zowe tso issue command "exec 'PUBLIC.REXX(REPOUT)' 'ARG1 ARG2'"`, where `PUBLIC.REXX(REPOUT)` is your REXX application and `ARG1``ARG2` are the arguments that are passed to it. The syntax above works both in Windows CMD and PowerShell as well as in Bourne compatible UNIX shells.
17
+
18
+
### Use the Basic-Report Command in This Extension
19
+
20
+
1. Update the `REXX_EXEC` constant in [basic-report.js](commands/basic-report.js#L6) to point to your application.
21
+
1. Start the extension by pressing <kbd>F5</kbd>. This opens a new VS Code window with this extension.
22
+
1. In this new VS Code window open the Command Palette by pressing <kbd>F1</kbd>
23
+
1. Type `example.com` in the command palette input box.
24
+
A list of commands displays.
25
+

26
+
1. Select the `Basic Report on a Dataset` command.
27
+
1. After a short moment an editor with the output of your applications opens.
28
+
29
+
To try this out with a basic REXX program, you can use the included [basic-report.rexx](commands/basic-report.rexx) sample. A successful output report looks like this:
30
+
31
+

32
+
33
+
### Explore the Enhanced-Report
34
+
35
+
The [basic report](commands/basic-report.js) is only 30 lines long. It is as simple as possible to get started quickly. To complete the extension there is a lot more to do. For example:
36
+
37
+
- Input validation
38
+
- Error checking
39
+
- Storing previous activity in memory
40
+
- Adding a progress bar
41
+
- Storing the report to a data set and retrieving it from there
42
+
- Adding a VS Code Output channel to diagnose issues
43
+
- Adding a setting for the location of the REXX exec instead of hard coding it in the extension code
44
+
45
+
All of these enhancements have been added to the [enhanced report](commands/enhanced-report.js) with its corresponding [enhanced-report.rexx](commands/enhanced-report.rexx) REXX exec. This adds a little over 100 lines of code and illustrates many other useful VS Code APIs. It also adds typescript checking via [JS Doc](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html) annotations to help you catch errors while authoring the code rather than at runtime.
46
+
47
+
### Build the Extension
48
+
49
+
To build the extension, run these two commands:
50
+
51
+
```
52
+
# Install development dependencies - typescript, types, and vsce
53
+
npm ci
54
+
# Package the extension
55
+
npm run package
56
+
```
57
+
58
+
### Next Steps
59
+
60
+
A few ideas about what you might want to try next:
61
+
62
+
- Store the last 10 user inputs in memory and let the user choose one (in addition to typing a new one).
63
+
- Submit a job and retrieve its output instead of running a REXX exec.
64
+
- Use the Zowe SDK instead of Zowe CLI (remove run-time dependency).
65
+
- Execute the REXX exec over SSH, or submit a job over FTP if you do not have Zowe CLI available.
66
+
- Copy the REXX exec to the mainframe before a command runs (in case the REXX does not exist) - to self-deploy the extension.
0 commit comments