You can configure vscode to say if the type of the is JCL, then display a line at column 80, so you can tell when your lines spill, and other clever things.
You need to install the support
- IBM provides Z Open Editor, This provides a lot of function – some of which is chargeable. The editing for COBOL, PL/I, REXX, HLASM, and JCL is free. Once is it installed, you can click on the settings icon and display more information about what is supported.
- Broadcom provides JCL language Support
Open vscode
- Open the extensions window, Ctrl+shift+X
- Search for the extension you want, and install it
- Restart vscode
Configure the vscode settings
You need to do some vscode configuration to get the full benefit of Zowe explorer.
Display the file associations.
Use ctrl+shift+p and type Preferences: Open user settings (JSON).
For me this displayed a file which included
"files.associations": {
"**/*.COBOL*{,/*}": "cobol",
"**/*.COB*{,/*}": "cobol",
"**/*.COBCOPY*{,/*}": "cobol",
"**/*.COPYBOOK*{,/*}": "cobol",
"**/*.COPY*{,/*}": "cobol",
"**/*.PL1*{,/*}": "pl1",
"**/*.PLI*{,/*}": "pl1",
"**/*.INC*{,/*}": "pl1",
"**/*.INCLUDE*{,/*}": "pl1",
"**/*.JCL*{,/*}": "jcl",
If I edit a member in a data set which matches *.JCL*, it will be flagged as a language jcl.
Display the language settings
Ctrl+shift+P and search for Preferences: specify language specific settings. This displays all of the languages known to this instance of vscode. Scroll down to jcl. If jcl is missing, you need to install the support. See You need to install the support above
Click on JCL. Information about JCL is displayed. There is a box with @lang:jcl above the display. If you type @lang:jcl ruler it will display information about the ruler parameter
Mine says
Editor: Rulers (Modified elsewhere . Default value changed)
Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.
Edit in settings.json
If you click on Edit in settings.json it will put you into an edit session.
I inserted
"[jcl]": {
"editor.rulers": [10,16,80],
},
Save the files. Edit a JCL data set. The sessions should have vertical lines at 10,16, and 80.
Thanks
With thanks to Joshua Waters for getting me working, and answering my many questions.