There are more dialects of COBOL, depending on the environment it is utilized:
IBM Enterprise COBOL for z/OS (the industrial standard; banks, insurance companies, globals; most rigorous, most modern, most maintained)
Micro Focus COBOL (under Windows/Linux; for development, education, migration)
GnuCOBOL (free, open source; not exactly compatible with the IBM dialect)
COBOL-IT/Fujitsu COBOL/ACUCOBOL (in smaller, specialized systems)
The IBM Z Xplore utilizes the IBM z/OS environment therefore the IBM Enterprise dialect.
The JCL, the data sets, the DD-s, VSAM, DB2 are connected to the dialect.
Between a COBOL program and the OS, the JCL stands. The JCL gives inputs which are not directly defined within the COBOL, and directs the output direction and sets up the environment to the job in which the program will run.
Before a COBOL program can be executed, it must be compiled and the executable must be placed into the LOADLIB.
There are 3 main code styles:
classic mainframe (everything is uppercase)
modern enterprise (keywords are uppercase, variables are lowercase)
mixed case (often in IBM samples, e.g. first letter in the sentence is uppercase, the rest is lowercase)
The Visual Studio Code which is widely used for COBOL programming, offers classic built-in code snippets (uppercase).
The modern enterprise style mostly follows the practices coming from modern languages like Java (camelCase for variables). This style helps to have a bit shorter code next to increased readability.
EXAMPLE FOR CLASSIC CODE STYLE:
EXAMPLE FOR MODERN ENTERPRISE CODE STYLE:
EXAMPLE FOR IBM MIXED CASE CODE STYLE:
A project contains these:
source data (any data set type)
resulted data (any data set type)
source codes (PDS)
copybook (PDS)
JCL files (PDS)
LOADLIB for the complied modules (PDS)
documentation (PS or PDS)
Except the source data, and optionally the resulted data, the other files should be placed on the same qualifier level and by qualifier names.
The Visual Studio Code or VSCode with the Zowe Explorer extension is not able to detect the COBOL code by its content but checks the qualifiers of the container dataset. This means without marking CBL or COBOL in the dataset name, it will not handle the source code as a code but as a plain text.
There are no similar problems with JCL.
FIGURE OF FILE STRUCTURE OF PROJECT:
https://www.ibm.com/docs/en/cobol-zos