Data queue for dynamic job debugging

The IBM® iIntegrated Debugger uses a data queue to communicate with the user application environment. The Dynamic Attach support allows you to start a debug session using the IBM i: Debug dynamic job configuration and a key. When the application environment writes the key for the job that you want to debug into this data queue, a debug session for this job starts. See topic "Dynamic Attach support from IBM i Integrated Debugger" for more details.

The location of this data queue is: Q5BTEMP/DYNAMICATT

When the debug server is started using the STRDBGSVR command, this data queue is created.

When the debug server is ended by using the ENDDBGSVR command, this data queue is deleted.

Your application or its helper needs to use the data queue API to write the key and the full name of the job that you want to debug to this data queue. The expected format is a buffer of length 26. The first 10 characters of this buffer contain the job name. The second 10 characters of this buffer contain the user name of this job. The last 6 characters contain the job number.

The following is a sample RPGLE program that gets its full job name, and writes the user id and the full job name to the debugger data queue:

     D psds           sds          1000    qualified
     D  jobinfo                      26    overlay(psds:244)

     D QSNDDTAQ_debug...
     D                 PR                  EXTPGM('QSNDDTAQ')
     D  data_queue_name...
     D                               10A   CONST
     D  library_name                 10A   CONST
     D  length_of_data...
     D                                5P 0 CONST
     D  data                         26A   CONST
     D                                     OPTIONS(*VARSIZE)
     D  length_of_key                 3P 0 CONST
     D  key_data                     64A   CONST

     D mykey           s             64A
      /free
        mykey =  'my_unique_key';
        monitor;
          QSNDDTAQ_debug ('Q5BDYNATT' : 'Q5BTEMP' : 26 : psds.jobinfo:
                        64 : mykey);
        on-error;
          //error occurred
        endmon;
        return;
      /end-free                   

Feedback