SET PROGRAMMING LANGUAGE command

Sets the current programming language. You can only set the current programming language to the selection of languages of the programs currently loaded. For example, if the current load module contains both C and COBOL compile units, but not PL/I, you can set the language only to C or COBOL. However, if you later STEP or GO into another load module that contains C, COBOL, and PL/I compile units, you can set the language to any of the three.

The programming language setting affects the parsing of incoming z/OS® Debugger commands. The execution of a command is always consistent with the current programming language setting that was in effect when the command was parsed. The programming language setting at execution time is ignored.

Read syntax diagramSkip visual syntax diagramSETPROGRAMMINGLANGUAGECYCLEAUTOMATICHOLDASSEMBLERCCOBOLDISASSEMBLYLANGXCOBOLPLIHOLD;
CYCLE
Specifies that the programming language is set to the next language in the alphabetic sequence of supported languages.
AUTOMATIC
Cancels a HOLD by specifying that the programming language is set according to the current qualification and thereafter changed automatically each time the qualification changes or STEP or GO is issued.
HOLD
Specifies that the given language (or the current language, if no language is specified) remains in effect regardless of qualification changes. The language remains in effect until SET PROGRAMMING LANGUAGE changes the language or releases the hold.
ASSEMBLER
Sets the current programming language to ASSEMBLER.
C
Sets the current programming language to C. z/OS Debugger does not differentiate between C and C++, use this option for C++ as well as C programs.
COBOL
Sets the current programming language to COBOL.
DISASSEMBLY
Sets the current programming language to disassembly.
LANGXCOBOL
Sets the current programming language to LangX COBOL.
PLI
Sets the current programming language to PL/I.

Usage notes

  • If CYCLE or one of the explicit programming language names is specified, the current programming language setting is changed regardless of the currently suspended program or the current qualification.
  • The current programming language setting affects how commands are parsed, not how they are performed. Commands are always performed according to the programming language setting where they were parsed. For example, it is not possible for a z/OS Debugger procedure to contain a mixture of C and COBOL commands; there is no way for the programming language setting to be changed while the procedure is being parsed. Also, it is not possible for a command parsed with one programming language setting to reference variables, types, or labels in another programming language.
  • If SET PROGRAMMING LANGUAGE AUTOMATIC is in effect (that is, HOLD is not in effect), changing the qualification automatically sets the current programming language to the specified block or compile unit.
  • SET PROGRAMMING LANGUAGE can be used to set the programming language to any supported language in the current or parent enclaves.

Example

Specify that C or C++ is the current programming language.
SET PROGRAMMING LANGUAGE C;