Posts

Showing posts from October, 2023

IBMi (AS400) fans only : DEBUGGING - How to use the STRSRVJOB and STRDBG commands on IBMi to debug a program in another user's session

Image
How to use the STRSRVJOB and STRDBG commands on IBMi to debug a program in another user's session. Programming also means, always, debugging. But when a program is installed in a production environment , and an end-user calls to report an issue, sometimes it's useful to connect directly to the user's session in DEBUG mode and step through the program itself. To do this, the STRSRVJOB command comes to our aid. First, let me give a brief summary of what a Service Job is and what the debugging activity on IBMi entails. Service job : In the context of IBMi (formerly known as AS/400 or iSeries) and RPG programming, a service job refers to a separate job that is started to perform specific tasks or services related to a program. These service jobs are often used for debugging, monitoring, or other specialized purposes. Debugging : One common use of service jobs is for debugging RPG programs. When you want to debug a program interactively, you typically start a service job to run