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

AS400 Debug Batch Programs

Articles, Frontpage Article, News

To debug batch programs through command-line entry, use the following steps:

To debug batch programs through command-line entry

  1. If LAWENV is not called as part of your user profile’s sign-on program, you must call the LAWENV program to set the environment variables correctly.
    1. At the IBM i command line, type
      CALL LAWENV
    2. Type the name of an Environment and press Enter.
  1. Compile the program you want to debug. At the Qshell command line, type
    qcompile -D productline systemcode programcode

Note: If you need to include modules in the compile, use qcompile -Dm productline systemcode programcode .

  1. Submit the program to a job queue that is on hold or is not tied to a subsystem (so that the batch job does not execute).
  2. Start a service job for the program.
    1. Get the job information by typing at the IBM i command line,
      WRKJOBQ QueueName
      where QueueName is the job queue to which you submitted the batch program.Select option 5 (Work with) for the job queue and then write down the job, user, and job number information for the appropriate job.Note: You can also use the WRKUSRJOB command to find the job information, but this may yield a much longer list of jobs to view in order to find the one you need.
    2. At the IBM i command line, type:
      STRSRVJOB JobNumber/UserName/JobName
  1. Start debug. At the command line, type STRDBGand prompt it (F4). Make sure the library is the one where you compiled the source and that UPDPROD(*YES) is set. If the information is correct, press Enter.
  2. When source listing appears, press F12to resume.
  3. Start the batch program by changing the job to run in an active queue. On the “Work with Job Queue” screen, enter 2(Change) to change the job queue for the job. After typing in the job queue name, press Enter.The ILE debugger will display the “Start Serviced Job” screen with the following message: “The serviced job has been released from the job queue. Press Enter to start the job or F10 to enter debug commands for that job.”
  4. Press F10and then at the IBM i command line, type:DSPMODSRC
  1. Set break points (F6), then press F12, and then press F3 to return to the “Start Serviced Job” screen.
  2. Press Enterto run the program.
  3. After finished with debugging, end debug and the service job. At the IBM i command line, type:
    ENDDBG
    thenENDSRVJOB

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 →

01/20/2023
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/2023/01/AS400-Debug-Batch-Programs.jpg 470 470 Angeli Menta https://www.nogalis.com/wp-content/uploads/2013/04/logo-with-slogan-good.png Angeli Menta2023-01-20 08:17:122023-01-12 15:25:53AS400 Debug Batch Programs

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: How technology will shape healthcare in 2023 Link to: How technology will shape healthcare in 2023 How technology will shape healthcare in 2023 Link to: Weekly Patch Notification: January 21, 2023 Link to: Weekly Patch Notification: January 21, 2023 Weekly Patch Notification: January 21, 2023
Scroll to top Scroll to top Scroll to top