Language Detection

Programs and include files stored in data set members do not have file extensions, making it difficult for VS Code to automatically apply the correct language support when you open such files. Z Open Editor provides special user settings, such as zopeneditor.datasets.cobolDatasets that enable mapping data set naming patterns to specific languages, as documented in Setting remote file associations. However, this mapping applies at the data set level, not to individual members. Therefore, if a data set contains members written in multiple programming languages, you had to manually assign the appropriate language through the VS Code status bar.

However, if you are using an RSE API server and connect to z/OS® with an RSE API profile, Z Open Editor attempts to detect the language of the file automatically. The detector uses the RSE API metadata scanner to guess the language. Since this heuristic may occasionally be inaccurate, DEBUG-level logging is added to help you review the detector’s response. If the guessed language is incorrect, you can manually switch to the correct one using the VS Code status bar.

When you switch the Z Open Editor into DEBUG mode, as documented in Troubleshooting using log files, you can look for messages like these to observe what "language guess" was returned by the server.

DEBUG: Attempting to identify language for: /zos.rseapi/IBMUSER.SAMPLE.MISC/SAM1
DEBUG: RSE API returned extension: "cbl" for file "IBMUSER.SAMPLE.MISC(SAM1)"
DEBUG: Assigned language "cobol" for /zos.rseapi/IBMUSER.SAMPLE.MISC/SAM1 using RSE API call.

The feature is enabled by default for licensed users and can be disabled by setting zopeneditor.zowe.disableRseApiLanguageDetection: true, as documented in Using Zowe profiles in Z Open Editor.

Last Updated:
Contributors: PETER HAUMER