Choosing TEST or NOTEST compiler suboptions for PL/I programs
This topic describes the combination of TEST compiler option and suboptions you need to specify to obtain the desired debugging scenario. This topic assumes you are compiling your PL/I program with Enterprise PL/I for z/OS®, Version 3.5, or later; however, the topics provide information about alternatives to use for older versions of the PL/I compiler.
The PL/I compiler provides the TEST
compiler option and its suboptions to
control the following actions:
- The generation and placement of statements and symbol tables.
- The placement of debug information into the program object or separate debug file.
- The placement of source file contents into the program object or not.
z/OS Debugger does not support debugging optimized PL/I programs. Do not use compiler options other than NOOPTIMIZE,
The following instructions help you choose the combination of TEST compiler suboptions that provide the functionality you need to debug your program:
- Choose a debugging scenario, keeping in mind your site's
resources, from the following list:
- Scenario A: If you are using Enterprise PL/I for z/OS, Version 6.1 or later with APAR PH50085,
and you want to access the source without providing the source location, use
TEST(NOSEPARATE,SOURCE)
andGOFF
. WithTEST(NOSEPARATE,SOURCE)
, the source content captured in theGOFF
object is controlled by theLISTVIEW
option in the same way as the source contents captured in the debug side file when you compile withTEST(SEPERATE)
. - Scenario B: If you are using Enterprise PL/I for z/OS, Version 3.8 or later, and you want to get the most z/OS Debugger functionality and a small program size, use
TEST(ALL,NOHOOK,SYM,SEPARATE)
and theLISTVIEW(SOURCE)
compiler option. If you need to debug programs that are loaded into protected storage, verify that your site installed the Authorized Debug Facility.Consider the following options:- If you are using Enterprise PL/I for
z/OS, Version 4 or later, you can specify the
GONUMBER(SEPARATE)
compiler option, which can help make the program size smaller. - You
can specify any of the
LISTVIEW
sub-options (SOURCE
,AFTERALL
,AFTERCICS
,AFTERMACRO
, orAFTERSQL
), as described in Enterprise PL/I for z/OS Programming Guide, to display either the original source or the source after the specified preprocessor.Note: If a sub-option other thanSOURCE
is specified forLISTVIEW
, thenTEST(SEPERATE)
also needs to be specified. - If you are
debugging in full-screen mode and you want to debug programs with INCLUDE files that have executable
code, specify the
LISTVIEW(AFTERMACRO)
compiler option and, if you do not specify theMACRO
compiler option, specify thePP(MACRO(INCONLY))
compiler option. - If you are debugging in remote debug mode and you want to automonitor variables in
INCLUDE files, specify the
LISTVIEW(AFTERMACRO)
compiler option and, if you do not specify theMACRO
compiler option, specify thePP(MACRO(INCONLY))
compiler option.
If you are using other Application Delivery Foundation for z/OS tools, see topic Enterprise PL/I Version 3.5 and Version 3.6 programs in IBM® Application Delivery Foundation for z/OS Common Components Customization Guide and User Guide to make sure you specify all the compiler options you need to create the files needed by all the Application Delivery Foundation for z/OS tools.
- If you are using Enterprise PL/I for
z/OS, Version 4 or later, you can specify the
- Scenario C: If you are using Enterprise PL/I for
z/OS, Version 3.7, and you want to get the most z/OS Debugger functionality and a small program size, use
TEST(ALL,NOHOOK,SYM,SEPARATE,SOURCE)
. If you need to debug programs that are loaded into protected storage, verify that your site installed the Authorized Debug Facility.Consider the following options:- You can substitute
SOURCE
withAFTERALL
,AFTERCICS
,AFTERMACRO
, orAFTERSQL
, as described in Enterprise PL/I for z/OS Programming Guide. - If you are
debugging in full-screen mode and you want to debug programs with INCLUDE files that have executable
code, specify the
TEST(ALL,NOHOOK,SYM,SEPARATE,AFTERMACRO)
compiler options and, if you do not specify theMACRO
compiler option, specify thePP(MACRO(INCONLY))
compiler option. - If you are debugging in remote debug mode and you want to automonitor variables in
INCLUDE files, specify the
TEST(ALL,NOHOOK,SYM,SEPARATE,AFTERMACRO)
compiler options and, if you do not specify theMACRO
compiler option, specify thePP(MACRO(INCONLY))
compiler option.
If you are using other Application Delivery Foundation for z/OS tools, see topic Enterprise PL/I Version 3.5 and Version 3.6 programs in IBM Application Delivery Foundation for z/OS Common Components Customization Guide and User Guide to make sure you specify all the compiler options you need to create the files needed by all the Application Delivery Foundation for z/OS tools.
- You can substitute
- Scenario D: If you are using Enterprise PL/I for
z/OS, Version 3.5 or 3.6, and you want to get most z/OS Debugger functionality and a small program size, use
TEST(ALL,NOHOOK,SYM,SEPARATE)
. If you need to debug programs that are loaded into protected storage, verify that your site installed the Authorized Debug Facility.If you are using other Application Delivery Foundation for z/OS tools, see topic Enterprise PL/I Version 3.5 and Version 3.6 programs in IBM Application Delivery Foundation for z/OS Common Components Customization Guide and User Guide to make sure you specify all the compiler options you need to create the files needed by all the Application Delivery Foundation for z/OS tools.
- Scenario E: If you are using Enterprise PL/I for z/OS,
Version 3.4, and you want to debug your program without compiled-in hooks, use
TEST(ALL,NOHOOK,SYM)
. If you need to debug programs that are loaded into protected storage, verify that your site installed the Authorized Debug Facility.If you are using other Application Delivery Foundation for z/OS tools, see topic Enterprise PL/I Version 3.4 and earlier programs in IBM Application Delivery Foundation for z/OS Common Components Customization Guide and User Guide to make sure you specify all the compiler options you need to create the files needed by all the Application Delivery Foundation for z/OS tools.
- Scenario F: If you are using Enterprise PL/I for z/OS,
Version 3.3 or earlier, and you want to get all z/OS Debugger functionality, use
TEST(ALL,SYM)
.If you are using other Application Delivery Foundation for z/OS tools, see topic Enterprise PL/I Version 3.4 and earlier programs or PL/I for MVS(tm) and VM and OS PL/I programs in IBM Application Delivery Foundation for z/OS Common Components Customization Guide and User Guide to make sure you specify all the compiler options you need to create the files needed by all the Application Delivery Foundation for z/OS tools.
- Scenario G: You can get some z/OS Debugger
functionality by compiling with the
NOTEST
compiler option. This requires that you debug your program in disassembly mode.If you are using other Application Delivery Foundation for z/OS tools, review the topic in IBM Application Delivery Foundation for z/OS Common Components Customization Guide and User Guide that corresponds to the compiler that you are using from the following list to make sure you specify all the compiler options you need to create the files needed by all the Application Delivery Foundation for z/OS tools:- Enterprise PL/I Version 3.5 and Version 3.6 programs
- Enterprise PL/I Version 3.4 and earlier programs
- PL/I for MVS™(tm) and VM and OS PL/I programs
- Scenario A: If you are using Enterprise PL/I for z/OS, Version 6.1 or later with APAR PH50085,
and you want to access the source without providing the source location, use
- For scenarios A, B, C, D, F, and G, do the following
steps:
- If you use the Dynamic Debug facility to place hooks into programs that reside in read-only storage, verify with your system administrator that the Authorized Debug facility has been installed and that you are authorized to use it.
- After you start z/OS Debugger, verify that you
have not deactivated the Dynamic Debug facility by
entering the
QUERY DYNDEBUG
command. - Verify that the separate debug file is a non-temporary file and is available during the debug session.
- Verify whether you need to do any of the following tasks:
-
When you compile a program, do not associate SYSIN with an in-stream data set (for example //SYSIN DD *) because z/OS Debugger requires access to a permanent data set for the source of the program you are debugging.
- If
you are compiling a PL/I for MVS & VM or
OS PL/I program and to be able to view your listing while debugging in full-screen mode, you must
compile the program with the
SOURCE
compiler option. TheSOURCE
compiler option is required to generate a listing file. You must direct the listing to a non-temporary file that is available during the debug session. During a debug session, z/OS Debugger displays the first file it finds nameduserid.pgmname.list
in the Source window. In addition, you must link your program with the Language Environment®SCEELKED
library; do not use the OS PL/IPLIBASE
orSIBMBASE
library.If z/OS Debugger cannot find the listing at this location, see Changing which file appears in the Source window.
-
After you have chosen the compiler options and suboptions, see Planning your debug session to determine the next task you must complete.
Name of compiler option or suboption | Description of the effect |
---|---|
NOTEST |
Some behaviors or features change when you debug a PL/I program compiled with the
|
NOHOOK |
Some behaviors or features change when you debug a PL/I program compiled with the
|
NONE |
When you compile a PL/I program with the |
SYM |
Some behaviors or features change when you debug a PL/I program compiled with the
|
NOSYM |
Some behaviors or features change when you debug a PL/I program compiled with the
|
BLOCK |
Some behaviors or features change when you debug a PL/I program compiled with the
|
STMT |
Some behaviors or features change when you debug a PL/I program compiled with the
|
ALL |
Some behaviors or features change when you debug a PL/I program compiled with the
|
Refer to the following topics for more information related to the material discussed in this topic.
- Related references
- Description of the
TEST
compiler option in Enterprise PL/I for z/OS Programming Guide.