Retrieving the library that contains the currently running program [email protected] (Simon Hutchinson)

​[[{“value”:”The idea for this post came from a question. The questioner had a situation where, due to a mixed-up library list, someone had run the wrong version of a program from another library. They already had the program’s name on their display files, and they asked was it possible to retrieve the library the current executing program is in, and add that to the their display files.
After some discussion we decided that any change would be needed in both RPG and CL programs. Fortunately, this is simple in both languages.
Before I start explaining my RPG and CL code I need to have a display file within which are fields for the program and the program’s library. I created a simple display file to do this, called TESTDSPF:

01 A DSPSIZ(24 80 *DS3)
02 A R SCREEN
03 A 3 2’Program name . :’
04 A PGMNAME 10 O 3 20
05 A 4 2’Program library :’
06 A PGMLIB R O 4 20REFFLD(PGMNAME *SRC)

Read more »”}]] Read More 

QSH advice regarding maxed out subsystem manofsticks

​[[{“value”:”The current workaround has been to submit qsh commands to a separate jobq on a separate subsystem, but that makes error handling tricky when it happens in a separate job.
Currently when trying to run a QSH job from an RPG program, if the subsystem is maxed out, it will error due to the qsh script spawning off another job.”}]] Read More 

READP Opcode In IBMi Programmers IO

​In this session we will learn about the READP opcode in RPGLE.For detailed description and explanation refer the E-Book.EBook Link: https://programmers.io/ibmi-ebook/Programmers.io is a registered IBM business partner and a global IT services and consulting firm, providing on-demand software development expertise to clients worldwide. Read More 

Verified by MonsterInsights