Fernando Martinez , en una ocaci�n me colaboro con el siguiente programa y
funciona perfactamente

/*********************************************************************/
/*                                                                   */
/* Create as user with *ALLOBJ and *SECADM                           */
/* CRTCLPGM PGM(lib/SWAP) USRPRF(*OWNER) AUT(*EXCLUDE)               */
/*                                                                   */
/*                                                                   */
/* PURPOSE: SWAP -- This program will swap the user profile of       */
/* a job but prevents swap to a user profile                         */
/* the with *ALLOBJ *SERVICE *SECADM OR *SPLCTL                      */
/* special authority                                                 */
/*********************************************************************/
RESETPWD: PGM (&USERID)

            DCL &USERID *CHAR 10

            /*********************************************************/
            /* Variables for API to retrieve user profile attributes */
            /*********************************************************/

            DCL &RTNDTA *CHAR 83

            /***********************************************/
            /* API work area USRI0200 data returned        */
            /***********************************************/
            /*   Type      Field                           */
            /* 1 BINARY(4) Bytes returned                  */
            /* 5 BINARY(4) Bytes available                 */
            /* 9 CHAR(10)  User profile name               */
            /* 19 CHAR(10) User class name                 */
            /* 29 CHAR(15) Special authority               */
            /* 29 CHAR(1 )   ALLOBJ                        */
            /* 30 CHAR(1 )   SECADM                        */
            /* 31 CHAR(1 )   JOBCTL                        */
            /* 32 CHAR(1 )   SPLCTL                        */
            /* 33 CHAR(1 )   SAVSYS                        */
            /* 34 CHAR(1 )   SERVICE                       */
            /* 35 CHAR(1 )   AUDIT                         */
            /* 36 CHAR(1 )   IOSYSCFG                      */
            /* 38 CHAR(7 ) future expansion                */
            /* 44 CHAR(10) Group profile name              */
            /* 54 CHAR(10) Owner                           */
            /* 64 CHAR(10) Group authority name            */
            /* 74 CHAR(10) Limit capabilities              */
            /***********************************************/

            DCL &OUTVARD *DEC (5 0) VALUE(83)
            DCL &OUTLEN *CHAR 4
            DCL &FMT *CHAR 8 VALUE(USRI0200)
            DCL &ERRCDE *CHAR 80
            DCL &ERRLEND *DEC (5 0) VALUE(80)
            DCL &HANDLE *CHAR 12

            /******************************************************/
            /* Retrieve the special authority of the user profile */
            /* Do not allow reset if user has special authority   */
            /* *ALLOBJ *SECADM *SPLCTL or *SERVICE                */
            /******************************************************/

            CHGVAR VAR(%BIN(&OUTLEN)) VALUE(&OUTVARD)
            CHGVAR VAR(%BIN(&ERRCDE 1 4)) VALUE(&ERRLEND)

            CALL QSYRUSRI +
            (&RTNDTA &OUTLEN &FMT &USERID &ERRCDE)

            IF ( (%SST(&RTNDTA 29 1 )='Y') *OR /*check *ALLOBJ*/ +
                 (%SST(&RTNDTA 30 1 )='Y') *OR /*check *SECADM*/ +
                 (%SST(&RTNDTA 32 1 )='Y') *OR /*check *SPLCTL*/ +
                 (%SST(&RTNDTA 34 1 )='Y')) DO /*check *SERVICE */
               SNDPGMMSG MSGID(CPF9801) MSGTYPE(*ESCAPE) +
               MSGDTA('Swap of this user profile not allowed.')
            ENDDO
/************************************************************/
/* Swap user profile                                        */
/************************************************************/

/*            CALL QSYGETPH (&USER '*NOPWD' &HANDLE)        */
            CALL QSYGETPH (&USERID '*NOPWD' &HANDLE)
            CALL QWTSETP  ( &HANDLE)
            CALL QSYRLSPH ( &HANDLE)

ENDPGM

Jaime Villa T.
----- Mensaje original -----
De: "Jos� Manuel L�pez Gestal (CC)" <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviado: Lunes, 14 de Julio de 2003 09:32 a.m.
Asunto: duda ... alguien nos puede aconsejar ??


> Tenemos una tarea c�clica que env�a informaci�n a las carpetas compartidas
> del AS/400
> Al final de nuestro programa de arranque hemos a�adido una llamada a dicha
> tarea.
> El problema es que quien somete esa tarea en la IPL es el usuario QPGMR,
el
> cual no est� incorporado en el directorio de distribuci�n del sistema
> (WRKDIRE), con lo que no se realiza exitosamente el trabajo ("imposible
> utilizar los recursos de las carpetas")
>
> Podemos incorporar el QPGMR al directorio de distribuci�n, o bien crear
una
> tarea programada (WRKJOBSCDE) que se ejecute "X" minutos despu�s de que
> finalice la IPL semanal, o bien otra opci�n que se nos escape ...
>
> Qu� nos pueden aconsejar los "gur�s" del foro ?? ;-)
>
> Graci�as.
>
> **************************************
> Jos� Manuel L�pez Gestal
> Dpto. Sistemas de Informaci�n
> Hospital Modelo
> http://www.hospitalmodelo.com
> **************************************
>
>
> Este mensaje puede contener Informaci�n Privilegiada o Confidencial. Si
Vd.
> no es el destinatario indicado en este mensaje (o el responsable de la
> entrega del mensaje a dicha persona), no debe copiar o entregar este
> mensaje a ninguna persona. Por el contrario, debe destruir este mensaje y
> notific�rnoslo inmediatamente.
>
>
> This e-mail and any attachment contains information which is private and
> confidential and is intended for the addressee only. If you are not an
> addressee, you are not authorised to read, copy or use the e-mail or any
> attachment. If you have received this e-mail in error, please notify the
> sender by return e-mail and then destroy it.
>
>
>
> _____________________________________________________
> Forum.HELP400 es un servicio m�s de NEWS/400.
> � Publicaciones Help400, S.L. - Todos los derechos reservados
> http://www.help400.es
> _____________________________________________________
>
> Para darte de baja, env�a el mensaje resultante de pulsar
> mailto:[EMAIL PROTECTED]



_____________________________________________________
Forum.HELP400 es un servicio m�s de NEWS/400.
� Publicaciones Help400, S.L. - Todos los derechos reservados
http://www.help400.es
_____________________________________________________

Para darte de baja, env�a el mensaje resultante de pulsar
mailto:[EMAIL PROTECTED]

Responder a