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



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;


On Thursday 12 February 2004 13:48, Paul Jackson wrote:
> Is there a way to set the MI program attribute to say "MI"? I think this
> would be more informative than blank.
>
> Thanks
>
> |-----------------------------------
> | Paul Jackson
> |-----------------------------------
> | iSeries 400 Technical Programming Analyst
> | Costco Wholesale, Inc.
> | 999 Lake Drive
> | Issaquah, WA  98027-8990
> |-----------------------------------
> | Phone:  425-313-8594
> | Fax:    425-313-6800
> | Email:  mailto:pjackson@xxxxxxxxxx
> |-----------------------------------


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.