Hi Buck, I tried IBM's Info Center and searched for "debug thread" and found the following: Multithreaded job debugging --------------------------- The spawn() API provides a mechanism to allow you to start a debugging session before actually calling the multithreaded program to be debugged. Setting the QIBM_CHILD_JOB_SNDINQMSG environment variable to 1 controls this capability. Refer to the usage notes for the spawn() API in the System API Reference , for details about the use of this environment variable. An example SPAWN command is available for your use and modification as part of OS/400 option 7, the OS/400 Example Tools Library, QUSRTOOL. Member TP0ZINFO in the file QATTINFO in the QUSRTOOL library contains information on how to create the SPAWN CL command. You can also find more information on using the SPAWN command in SPAWN CL command, QUSRTOOL example . You can also simplify the process of starting a job that runs the multithreaded program and the debugging session by creating a command (such as the SPAWN command) that performs the necessary steps. These steps include the following: -Signing on to a display station session -Starting a job to run the multithreaded program -Using the Start Service Job (STRSRVJOB) command to service the job running the multithreaded program -Calling the Start Debug (STRDBG) command, adding programs to debug, and setting breakpoints -Notifying the servicing job when the thread hits a breakpoint so that it stops the thread -Stopping all threads with the debugger support -Issuing valid debug commands from the debug screen that is displayed -Resuming the thread that hit the breakpoint and then all other threads -Repeating the above cycle until debugging is complete -Calling the End Debug (ENDDBG) command The System API Reference , ILE C for AS/400 Programmer's Guide, SC09-2712 , VisualAge C++ for OS/400 C++ User's Guide, SC09-2116 , and ILE Concepts, SC41-5606 publications contain additional information about thread debugging capabilities. HTH, Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax ----- Original Message ----- From: "Buck Calabro" <firstname.lastname@example.org> > After visiting the archives, the SQL reference manual, the IBM DB2 web site, > the AS/400 newsgroup and the April 2000 Midrange Computing article I am > still stuck trying to debug a UDF. I can't get it to break when I put it in > debug mode, and a DUMP operation tells me that "Variable data is not > available in a secondary thread. " > I also tried setting my QAQQINI to PARALLEL_DEGREE *NONE to no avail. In > debug I get the message "Breakpoint received in secondary thread." > For what it's worth, the return value shows as 55 on my interactive SQL: > select strlen(name) from master where name like 'B%' so I know the program > works. I just want to see it in debug! > +--- > | This is the Midrange System Mailing List! > | To submit a new message, send your mail to MIDRANGE-L@midrange.com. > | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. > | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: email@example.com > +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: firstname.lastname@example.org +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.