Debugging scheduler user code
Follow these steps to create the project, add files to the project, modify the project settings, and run the project:
- Start Microsoft Visual Studio. Select File/New Project.
 - Select Win32 Project and give the new project a name.
 - Choose to create a new solution and click OK.
 - Choose to create an empty DLL project and then click on Finish.
 - Select Project/Add Existing Item.
 - Add your .C files.
 - Add the USER.DEF file from the same directory.
 - Add the following .LIB files from the USERCODE directory: aps_sim.lib, aps_susr.lib, aps_ulib.lib, and aps_util.lib
 - Select Project/Properties and then the C/C++ tab.
 - For the Category, select Preprocessor.
 - For the Additional include directories edit box, type in the full path to the USERCODE directory.
 - Add the following to the Preprocessor definitions: UNICODE,_UNICODE,_WIN32,SYTEAPS,_AFXDLL,_DLL.
 - Select the Link tab.
 - For the Category, select General.
 - For the Output file name edit box, type in the full path and USER.DLL. For example, if your database is called MYDB, you would type: C:\Program Files\Infor\APS\Scheduler\USERCODE\MYDB\USER.DLL .
 - Select the Debugging tab.
 - For the Category, select General.
 - For the Executable for debug session, enter the full path to APS_BATS.EXE. For example: C:\Program Files\Infor\APS\Scheduler\APS_BATS.EXE .
 - For the Working directory, specify the directory where APS_BATS.EXE is located. For example: C:\Program Files\Infor\APS\Scheduler .
 - For the Program Arguments, enter a line that looks like the following (substitute your User Id, Password, Server name, Database name, and the correct alternative number): The only space should be in front of the alternative number. For example: UID=me;PWD=mypassword;SERVER=myserve;DATABASE=mydb; 0 .
 - Select OK to accept changes.
 - To run the project, select Build/Build <project name>. You should not see any errors.
 - Click on the FileView tab and expand the Source Files item.
 - Double-click on the file name you want to debug.
 - Click on the line where you want the code to stop and then click on the hand icon to Insert/Remove Breakpoint(F9). This will set a breakpoint on this line.
 - Select Debug/Start Debugging. The Scheduler will start running and pause when it reaches your breakpoint.