844-NOGALIS (844-664-2547)
Nogalis, Inc.
  • Link to Facebook
  • Link to X
  • Link to LinkedIn
  • Link to Mail
  • Company
    • News, Events and Articles
    • About Us
  • Products
    • Infor Lawson Data Archive
    • PeopleSoft Data Archive
    • Oracle Data Archive
  • Services
    • Infor Lawson Support
    • Infor Lawson / CloudSuite Consulting
  • Education & Training
  • Support
  • Contact Us
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

Debugging 4GL forms in Visual Studio

Articles, Frontpage Article, News

Sometimes compiling for trace, or adding display statements to a 4GL program, just doesn’t quite get you far enough with debugging.  Lawson is installed on a MicroFocus COBOL for Visual Studio, which can be debugged using Visual Studio.  Here are the steps to set up the debugger for a Lawson form:

  1. First, compile your program for debug (i.e. lawcmp -D <pdl> <system> <program>)
  2. Create a new Windows Application project for COBOL.
  3. Configure the application for Output Type INT/GNT, and open the “Environment…” to set a Path variable. This variable should contain <GENDIR>\bin;<JAVA_HOME>\jre\bin\server;<LAWDIR>\<pdl>\obj;<LUU_DIR>

  4. Under Debug, set the project to launch an executable. The executable should be <MF_HOME>/bin64/run.exe, and the Application Arguments should be <LAWDIR>/<pdl>/obj/<debug program>.int <pdl>
  5. On the COBOL tab, set the configuration to Active (Debug) and the platform and platform target to your current server platform. Set the COBOL dialect to Micro Focus.  Set the output path to .\bin\x64\Debug
  6. Add the “.cbl” file to the Visual Studio project that was generated from your compile in debug mode (step 1).
  7. You can set break points in that cbl file
  8. Now, it’s time to debug your form. Open the application using LID (lapm <pdl> <program code>)
  9. In a separate LID session, run the command tmmon and make note of the pid for your Lacobrts process.
  10. Now, in Visual Studio, select Debug > Attach to Process
  11. Select the process you identified in tmmon (it should be a run.exe). Now you can perform the process that you were trying to debug, and Visual Studio will stop at the break point you set.

 

Retiring Lawson, PeopleSoft, or Oracle? APIX archives the entire application — every table, every year, attachments and security included — into your own AWS account in about 30 days, so you can decommission the legacy system and keep full access to the history.

See how the APIX ERP archive works →

08/09/2024
Share this entry
  • Share on Facebook
  • Share on X
  • Share on WhatsApp
  • Share on LinkedIn
  • Share on Reddit
  • Share by Mail
https://www.nogalis.com/wp-content/uploads/2024/08/Debugging-4GL-forms-in-Visual-Studio.jpg 470 470 Angeli Menta https://www.nogalis.com/wp-content/uploads/2013/04/logo-with-slogan-good.png Angeli Menta2024-08-09 08:53:322024-08-08 11:35:16Debugging 4GL forms in Visual Studio
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

You must be logged in to post a comment.

LEGACY ERP DATA ARCHIVE SOLUTION



Discover how our clients are leveraging AWS services to archive their Legacy ERP data and provide ubiquitous access to users via a light-weight, secure, and read-only web interface. Secure, Fast, Reliable, and Cost Effective. That is the promise of APIX. Follow the link below to find out more and book a discovery call with our data archive specialist.

BOOK DEMO

© Copyright - Nogalis, Inc. 2026
  • Legal
  • Privacy
  • Contact Us
Link to: The Four Keys To A Successful ERP Implementation Link to: The Four Keys To A Successful ERP Implementation The Four Keys To A Successful ERP Implementation Link to: Weekly Patch Notification: August 10, 2024 Link to: Weekly Patch Notification: August 10, 2024 Weekly Patch Notification: August 10, 2024
Scroll to top Scroll to top Scroll to top