× 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.



What is your QSECURITY system value?

The QPRCRTPG API documentation says:

"Note: MI instructions that reference system-domain or write-protected objects 
fail at security levels 40 and 50.  At those levels, you must use APIs to 
work with the objects."

We could add "...or run system state" :-)

--Dave

On Wednesday 18 February 2004 06:29, stephen.hunt@xxxxxxxxxxxxx wrote:
> I've just copied this program to our 400 (v5r2), compiled it, and ran it
> successfully without having to change it to system state.
>
> Is this normal at v5r2?
>
> I used the compiler from Leif Svalgaard's web site (listed in the "MI
> COMMON handout.doc" document).
>
> Cheers,
> Steve
>
>
>
>
> Dave McKenzie <davemck@xxxxxxxxxxxxx>@midrange.com on 13/02/2004 02:05:00
>
> Please respond to MI Programming on the AS400 / iSeries
>        <mi400@xxxxxxxxxxxx>
>
> Sent by:    mi400-bounces@xxxxxxxxxxxx
>
>
> To:    MI Programming on the AS400/iSeries <mi400@xxxxxxxxxxxx>
> cc:
> Subject:    Re: [MI400] MI Program attribute?
>
>
> Here's a little MI pgm that changes a pgm's attribute by calling
> QSYS/QLIMROIR
> "Modify/retrieve OIR", which is the pgm used by other QSYS pgms to get or
> modify the OIR.
>
> Since QLIMROIR is system domain (not an API), this pgm must be system
> state.
>
> Notice that you could change the pgm to modify OIR info other than
> attributes
> by using the other OIRPTR, OIRFROM and OIRTO fields.
>
> --Dave
>
>          ENTRY .ENTRY(*ENTRY) EXT;
>          DCL SPCPTR P1P PARM;
>          DCL SPCPTR P2P PARM;
>          DCL OL *ENTRY (P1P, P2P) EXT PARM MIN(2);
>
>          DCL DD  $PGM     CHAR( 20) BAS(P1P);
>          DCL DD  $PGMNAM  CHAR( 10) DEF($PGM) POS(  1);
>          DCL DD  $PGMLIB  CHAR( 10) DEF($PGM) POS( 11);
>
>          DCL DD  $ATTR    CHAR( 10) BAS(P2P);
>
>          DCL SPCPTR QINSEPTP BASPCO POS(1);
>          DCL SPCPTR QINSEPT(9999) BAS(QINSEPTP);
>
>          DCL DD OBJDESC CHAR(34) AUTO;
>          DCL DD TYPESUB CHAR(2)  DEF(OBJDESC) POS(1);
>          DCL DD OBJNAM  CHAR(30) DEF(OBJDESC) POS(3);
>          DCL DD *       CHAR(2)  DEF(OBJDESC) POS(33) INIT(X'0000');
>
>          DCL SYSPTR LIBRSYP AUTO;
>
>          DCL DD MORR     CHAR(  1) AUTO;
>          DCL DD OIOBJ    CHAR( 30) AUTO;
>          DCL DD OITYSUB  CHAR(  2) AUTO;
>          DCL DD OIRPARMS CHAR(224) AUTO BDRY(16);
>
>          DCL SPCPTR OIRPTR1  DEF(OIRPARMS) POS(  1)  /* TEXT       */;
>          DCL SPCPTR OIRPTR2  DEF(OIRPARMS) POS( 17)  /* SAV/RST    */;
>          DCL SPCPTR OIRPTR3  DEF(OIRPARMS) POS( 33)  /* SERVICE    */;
>          DCL SPCPTR OIRPTR4  DEF(OIRPARMS) POS( 49)  /* WHERE USED */;
>          DCL SPCPTR OIRPTR5  DEF(OIRPARMS) POS( 65)  /* ATTR       */;
>          DCL SPCPTR OIRPTR6  DEF(OIRPARMS) POS( 81)  /*            */;
>          DCL SPCPTR OIRPTR7  DEF(OIRPARMS) POS( 97)  /* USAGE      */;
>          DCL SPCPTR OIRPTR8  DEF(OIRPARMS) POS(113)  /* EXTENDED   */;
>          DCL DD OIRFROM(8) BIN(4) DEF(OIRPARMS) POS(129);
>          DCL DD OIRTO  (8) BIN(4) DEF(OIRPARMS) POS(161);
>          DCL DD OIRRETL(8) BIN(4) DEF(OIRPARMS) POS(193);
>          DCL DD NORY      CHAR(  1) AUTO;
>          DCL OL MROIROL (MORR, OIOBJ, OITYSUB, LIBRSYP, OIRPARMS,
>                          NORY);
>
>          CPYBLA     TYPESUB, X'0401';
>          CPYBLAP    OBJNAM, $PGMLIB,' ';
>          RSLVSP     LIBRSYP, OBJDESC, *, *;
>
>          CPYBLA     MORR, 'M'                       /* Modify  */;
>          CPYBLAP    OIOBJ, $PGM, ' ';
>          CPYBLA     OITYSUB, X'0201';
>          CPYBLAP    OIRPARMS, X'00',X'00';
>          SETSPP     OIRPTR5, $ATTR;
>          CPYNV      OIRFROM(5), 1;
>          CPYNV      OIRTO(5), 10;
>          CPYBLA     NORY, 'N';
>
>          CALLX      QINSEPT(374), MROIROL,*         /* QLIMROIR  */;
>
>          PEND;


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.