• Subject: Re: system state program call within user state
  • From: "Leif Svalgaard" <leif@xxxxxxxx>
  • Date: Mon, 16 Oct 2000 14:18:13 -0500

Ray,
Chapters 7 and 15 in my eBook (http://iSeries400.org) explain this in great
detail.
Here I have to be reasonably short (IBM manuals also explain this well,
RTFM).
Objects that are visible to you are either in the user domain or in the
system domain.
Executable objects are either in the user state or the system state (or can
inherit state,
but forget about that little detail).

Briefly:  user state programs can only call other programs if they are in the
user
domain. QQUDC is in the system domain. Your RPG program can therefore not
call QQUDC as long as it itself is a user state program. With me so far?
you can't do it, period.

Now, if you change your program to have the system state attribute (set the
byte
at offset 15C1 to x'80' instead of what it was: x'01' - using SST, if you are
authorized
to do that), then you CAN call QQUDC. Changing your program to system state
may have other ramifications preventing you from calling other user state
programs
if you pass them parameters, so you may not wish to do this.

Is it absolutely mandatory that you call QQUDC? what is it that QQUDC does
that has business value to you?

Sorry to sound so negative, but you are getting in deep if you mess with
system state
stuff without knowing exactly what you are doing and having a good reason for
it.

Leif


----- Original Message -----
From: Ray, Spencer <Spencer.Ray@AB-AdventureParks.com>
To: <MI400@midrange.com>
Sent: Monday, October 16, 2000 1:39 PM
Subject: Re: system state program call within user state


> I appreciate the information, however I must admit to being a MI newbie,
and
> would appreciate more details.  My existing program is just a basic list
panel
> written in ILE RPG with an option to perform a program call to the QQUDC
object
> and one to build a SBMJOB\RUNQRY command.
>
>
> Date: Wed, 11 Oct 2000 08:27:47 -0500
> From: "Leif Svalgaard" <leif@leif.org>
> Subject: Re: system state program call within user state
>
> - ----- Original Message -----
> From: Ray, Spencer <Spencer.Ray@AB-AdventureParks.com>
> Subject: system state program call within user state
>
>
> > Hi All,
> > I was wondering if anyone had any information on calling a system state
> program
> > from the user state.  What I'm trying to do is give my general end-users
a
> list
> > panel similar to that seen in the WRKQRY command except I only want to
provide
> > options 5=Display and 8=Run in batch.  The problem I'm having is
displaying
> the
> > details of the query.  I'd like to call the program QQUDC out of the
QQRYLIB
> > product library, however since I'm running at security level 40, the
system
> > gives me a big smack on the wrist.  Any information that would get me
closer
> > would be greatly appreciated.
>
> Your problem is not that QQUDC is a system state program, almost all
programs
> beginning with Q are system state programs. Your problem is that QQUDC is
in
> the system DOMAIN and therefore cannot be called from a user state program.
> Change your program to be system state and you'll do fine.
>
>
> +---
> | This is the MI Programmers Mailing List!
> | To submit a new message, send your mail to MI400@midrange.com.
> | To subscribe to this list send email to MI400-SUB@midrange.com.
> | To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: dr2@cssas400.com
> +---

+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2020 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].