× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 11/19/2014 5:11 AM, Frank Broome wrote:
I know that the initial command is only running when connection is established.
As I said, running a command like e.g. CHGLIBL works fine, running a CALL to a program that changes the library list does NOT work.

After running the CALL to the program the job that has executed it ends, whilst if I run command CHGLIBL the job stays and the lib list is changed accordingly.

I have now been able to catch the joblog and see what happens and when I run the call to the program the job ends with:
"Tried to refer to an object that no longer exists"
From program . . . . . . . . . : QZRCSRVS
From library . . . . . . . . : QSYS
From module . . . . . . . . : QZRCSRVS
From procedure . . . . . . . : ProcessExitPt
From statement . . . . . . . : 14

To program . . . . . . . . . . : QZRCSRVS
To library . . . . . . . . . : QSYS
To module . . . . . . . . . : QZRCSRVS
To procedure . . . . . . . . : ProcessExitPt
To statement . . . . . . . . : 14

I have made sure that I am NOT doing any RCLACTGRP or RCLRSC in my program, so I am not sure which object it's trying to refer to??

Any clues would be appreciated!

I have a standard CLP that I call in every one of my connexions. That
CLP sets my base library list; after that, each connexion will add any
extras via the Properties > Subsystems > Library list. I've never had
the server job that executes this CLP terminate. Can you post the
source for your program? If it issues any interactive command, it might
fall over because the server job is a batch job. One can reuse the user
profile initial program if one wraps the interactive bits in a test for
interactive mode:

pgm

dcl &mode *char 1

addlible cgiprod *last
monmsg cpf2103 /* already in list */
addlible qdevtools *last
monmsg cpf2103 /* already in list */

rtvjoba type(&mode)
ovrprtf *prtf hold(*yes)

if (&mode *eq '1') do
call qcmd
monmsg cpf0000 exec(do)
dmpclpgm
return
enddo
enddo

endpgm

I generally don't issue any CL command in my initial program / RSE
program without a matching MONMSG.

When it comes to debugging a server job CLP, I usually go for the brute
force approach. CHGJOB LOG(4 0 *SECLVL), DMPJOB, DSPLIBL
OUTPUT(*PRINT), and DSPJOB OUTPUT(*PRINT) tend to generate enough
diagnostic information that I usually get a hint about what's happening
in the server job. If I get really stuck, I'll sprinkle SNDMSG commands
at various places so I can be sure the code has reached a certain point.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.