Debugging a Business Function on an WIN NT/2000 Server

Debugging a Business Function on an WIN NT/2000 Server

Title: Debugging a Business Function on a WIN NT/2000 Server

Abstract: This document outlines how to debug a Business Function (BSFN) while it is running on a Win NT or 2000 Server.

Table of Contents

  1. Overview
  2. Instructions for Building the Business Functions in Debug Mode
  3. Instruction for Debugging Call Objects
  4. Differences of Debugging UBE's with Runube.exe or Runbatch.exe
  5. Instructions for Debugging with Runube.exe
  6. Instructions for Debugging with Runbatch.exe

Note to Reader: This information is provided to assist the debug process. It is not intended to be a PeopleSoft supported process.

Overview

Debugging a business function (BSFN) on any enterprise server requires a high level of skill with both the server's operating system and the C programming language. This document is written from the perspective that the user is skilled in both of these areas.

Back to Top

Instructions for Building the Business Functions in Debug Mode

  1. Server jde.ini settings required:

System\bin32

[BSFN BUILD] section

  • Turn off optimization (/Od; that is the capital letter “oh”).
  • OptimizationFlags=/Gz /Od /MD /W4 /GX /Gy
  • Include debugging information (/Z7).
  • DebugFlags=/Gz /Od/Z7 /MDd /Yd /W4 /GX /Gy /D "_DEBUG“
  1. Server Package Build:
  • To rebuild the business functions in debug assemble, build, and deploy a partial package. While defining the server package in the package build app, set the Build Mode = Debug. This needs to be a partial package build, not a full package. Full debug packages may cause problems with memory usage on the server.
  1. Deploy Server Package.

Back to Top

Instructions for Debugging Call Objects

  • A BSFN being processed by a kernel (jdenet_k.exe).
  • Steps in jdeCallObject function:
  • BSFN name is passed into jdeCallObject.
  • Parent DLL is loaded into memory.
  • Address of function is retrieved via GetProcAddress.
  • Function is called via its address.
  1. Increase client jde.ini’s JDENETTimeout in [NETWORK QUEUE SETTINGS].
  2. Limit number of kernels running (if possible).
  3. Auto-start Call Object kernel (if possible).

Jde.ini

[JDENET_KERNEL_DEF6]

–dispatchDLLFunction=_JDEK_DispatchCallObjectMessage@28

–maxNumberOfProcesses=1

–numberOfAutoStartProcesses=1

  1. If the kernel cannot be auto-started, run the client application that you are troubleshooting. Stop after the application runs the first BSFN on the enterprise server.
  2. Determine the jdenet_k.exe to debug.

Use the Server Administration Wokbench (SAW )

Examine the jde_xxx.log and jdedebug_xxx.log files (“xxx” is the Process ID of jdenet_k)

  1. Attach Visual C++ to jdenet_k.exe via Task Manager.

  1. In Visual C++, load BSFN DLL if not already loaded via Project->Settings.

  1. Load BSFN source file.

  1. Set breakpoints.

  1. Continue with application until breakpoint is reached.
  1. Debug as usual.

Back to Top

Differences of Debugging UBE's with Runube.exe or Runbatch.exe

Runube.exe

  • Can execute UBEs.
  • Can use when no processing options, data selection, or data sequencing are needed.
  • Quick.
  • Can run directly from Visual C++ debugger.

Runbatch.exe

  • Runs queued jobs.
  • Can automatically start in Visual C++ debugger.

Back to Top

Instructions for Debugging with Runube.exe

1. Run Visual C++.

2. Open Runube.exe.

3. In Project->Settings set working directory to system\bin32.

4. Enter program arguments.

§ User ID

§ Password

§ Environment

§ Report name

§ Version name

§ Queue name

§ Interactive/Batch (I/B)

§ Interactive (I) causes runube to process UBE.

§ Batch (B) causes job to be queued up for jdequeue to pick up. Jdequeue will then start runbatch which will process UBE.

§ Print/Hold (P/H)

o Print (P) causes UBE to be printed when complete.

o Hold (H) causes UBE to not print.

§ Save/Delete (S/D)

o Save (S) causes UBE record to be saved in F986110.

o Delete (D) causes UBE record to be deleted from F986110.

§ Printer name (optional)

o Printer on which to print UBE (only if Print flag is specified).

o If not specified, enterprise server’s default printer will be used.

5. Load BSFN DLL.

6. Load BSFN source file.

7. Set breakpoints, run, and debug.

8. PDF file will be in PrintQueue directory.

Name will be in format:

ReportName_Version_JobNumber_PDF.PDF

E.g., R0006P_XJDE0001_643_PDF.PDF

Back to Top

Instructions for Debugging with Runbatch.exe

1. Run the PeopleSoft EnterpriseOne software from the command prompt.

  1. Cd to system\bin32
  2. Jdenet_n.exe
  3. Jdequeue.exe <user> <password> <environment> <QueueName> UBE <QueueDelay>

Parameters can usually be gotten from the [Network Queue Settings] section of the server’s jde.ini

QueueDelay is the number of seconds between fetches from the F986110 (usually 15 or 30).

2. Add flag to server’s jde.ini so Visual C++ will start automatically and attach to runbatch.exe.

  1. [UBE] section
  2. UBEDebug=1 turns on automatic start of Visual C++.
  3. Do NOT confuse this with UBEDebugLevel which is used to set the level of logging detail
  4. Delete when through.

3. Submit UBE from client.

4. Visual C++ starts with “OK” pop-up window. Do not click the button yet.

5. In Project, Settings Load BSFN DLL.

6. Load BSFN source file.

7. Set breakpoints.

8. Click OK button.

9. Debug.

10. PDF file will be in PrintQueue directory.

Name will be in format:

ReportName_Version_JobNumber_PDF.PDF

E.g., R0006P_XJDE0001_643_PDF.PDF

11. Be sure to remove UBEDebug from jde.ini.

12. Stop processes via NT’s Task Manager.

Back to Top

Bottom of Form