I ran into something weird yesterday. I wonder if anybody here has seen this, and even better, knows what causes it.
I have an RPG program with an externally described printer file in it. The printer file has two record formats (page headers and detail line) and the RPG program has two WRITE’s. If I call the RPG program from a command line or under SBMJOB, it runs normally.
I need to put a call to this program in a new CL program. I compiled both programs to run in the same named activation group. However, the RPG program doesn’t work correctly. It writes the page headers, but when it tries to execute the second WRITE, it immediately cancels and returns to the CL caller at the label referred to in the global MONMSG. The RPG program has a global monitor too, but the global monitor code never kicks in.
However, if I compile the CL program and RPG program to run in different named activation groups, the RPG program runs normally when called by the CL program.
Any idea what could cause this strange behavior?
I have an RPG program with an externally described printer file in it. The printer file has two record formats (page headers and detail line) and the RPG program has two WRITE’s. If I call the RPG program from a command line or under SBMJOB, it runs normally.
I need to put a call to this program in a new CL program. I compiled both programs to run in the same named activation group. However, the RPG program doesn’t work correctly. It writes the page headers, but when it tries to execute the second WRITE, it immediately cancels and returns to the CL caller at the label referred to in the global MONMSG. The RPG program has a global monitor too, but the global monitor code never kicks in.
However, if I compile the CL program and RPG program to run in different named activation groups, the RPG program runs normally when called by the CL program.
Any idea what could cause this strange behavior?
Comment