Set Debug Attribute (QteSetDebugAttribute) API


  Required Parameter Group:

1 Debug attribute Input Char(10)
2 Attribute value Input Char(10)
3 Error code I/O Char(*)

  Default Public Authority: *USE

  Service Program: QTEDBGS

  Threadsafe: No

The Set Debug Attribute (QteSetDebugAttribute) API is used to set the attributes of the source debug session.

The attributes of the debug session cannot be set unless the job is currently in debug mode. The job is put in debug mode by a call to the Start Source Debug (QteStartSourceDebug) API.

The *UPDPROD value on the debug attribute parameter sets the update production files attribute of the debug session.

You can use files in production libraries while you are in debug mode. To prevent database files in production libraries from being changed unintentionally, you can specify a value of *NO. Then, only files in test libraries can be opened for updating or adding new records. If you want to open database files in production libraries for updating or adding new libraries, or if you want to delete members from production physical files, you can specify *YES. The initial setting when the Start Source Debug API is issued is *NO. However, this value can be changed at any time while in debug mode.

You can use this function with the library list. In the library list for your debug job, you can place a test library before a production library. In the test library, you should have copies of the production files that might be updated by the program being debugged. Then, when the program runs, it uses the files in the test library. Therefore, production files cannot be unintentionally updated.

The *OPMSRC value on the debug attribute parameter sets the OPM source debug attribute of the debug session. It is used to enable or disable the OPM source debug support. When this support is enabled, OPM RPG, OPM COBOL, and OPM CL programs can be debugged by using the ILE debug APIs if they were compiled with the *SRCDBG or *LSTDBG option on the following CL commands:

The initial value of the *OPMSRC attribute is set by the Start Debug (STRDBG) command, and can also be changed by the Change Debug (CHGDBG) command. Changing the *OPMSRC value has no effect on programs that are already under debug. They remain in the debug environment (ILE or OPM) that they are currently added to.


Authorities and Locks

None.


Required Parameter Group

Debug attribute
INPUT; CHAR(10)

The name of the debug session that is to be set. The value of the debug attribute must be:

*UPDPROD Set the value of the update production files attribute.
*OPMSRC Set the value of the OPM source debug attribute.

Attribute value
INPUT; CHAR(10)

The value of the attribute specified in the debug attribute parameter.

When the debug attribute parameter specifies *UPDPROD, the attribute value parameter can have one of the following values:

*YES Allow the updating of production files while in debug mode.
*NO Do not allow the updating of production files while in debug mode.

When the debug attribute parameter specifies *OPMSRC, the attribute value parameter can have one of the following values:

*YES Allow OPM programs that have source debug data to be debugged by using the ILE debug APIs.
*NO Do not allow OPM programs to be debugged by using the ILE debug APIs.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.


Error Messages

Message ID Error Message Text
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF9541 E Not in debug mode.
CPF9549 E Error addressing API parameter.
CPF9550 E Value for debug attribute not valid.
CPF9559 E Debug attribute parameter not valid.


API introduced: V3R1
Top | Debugger APIs | APIs by category