Rob,

This whole thing is confusing. Here are some
steps and a program to duplicate what I am
seeing. Create the following TSTAUT module
and program in another library:

      * CRTRPGMOD SRCFILE(SRCLIB/QRPGLESRC) SRCMBR(TSTAUT)
MODULE(OBJLIB/TSTAUT)
      * CRTPGM PGM(OBJLIB/TSTAUT)
(QSECOFR)
     DTSTAUT           PR
      * Set effective Group ID
     DqsySetEGID       PR            10I 0 EXTPROC('qsysetegid')
     D PR_GID                        10I 0 value
      * Get effective group ID for a given group name (group profile)
     DGetGrNam         PR              *   EXTPROC('getgrnam')
     D PR_pName                        *   value options(*string)
      ************************************************
      * Group structure as defined in QSYSINC/H(GRP) *
      ************************************************
     Dgroup            DS                  BASED(pGroup)
     D pGr_name                        *
     D Gr_gid                        10I 0
     D ppGr_mem                        *
     DRtnCod           S             10I 0
     C                   EVAL      pGroup = GetGrNam('TSTGRPPRF')
     C                   EVAL      RtnCod = qsySetEGID(gr_gid)
     C                   EVAL      *INLR = *ON
     C                   RETURN

Now run the following using an *ALLOBJ
profile replacing objlib with the
library where you created the TSTAUT
program:

CRTUSRPRF USRPRF(TSTGRPPRF) GID(*GEN)

CRTLIB LIB(TSTAUT) TYPE(*TEST)

CHGOBJOWN OBJ(TSTAUT) OBJTYPE(*LIB) NEWOWN(TSTGRPPRF)

RVKOBJAUT OBJ(TSTAUT) OBJTYPE(*LIB) USER(*PUBLIC) AUT(*ALL)

CRTDUPOBJ OBJ(TSTAUT) FROMLIB(objlib) OBJTYPE(*PGM) TOLIB(TSTAUT)
NEWOBJ(TSTAUT2)

CHGOBJOWN OBJ(TSTAUT/TSTAUT2) OBJTYPE(*PGM) NEWOWN(TSTGRPPRF)

RVKOBJAUT OBJ(TSTAUT/TSTAUT2) OBJTYPE(*PGM) USER(*ALL) AUT(*ALL)

CRTSRVPGM SRVPGM(TSTAUT/TSTAUT3) MODULE(objlib/TSTAUT) EXPORT(*ALL)

CHGOBJOWN OBJ(TSTAUT/TSTAUT3) OBJTYPE(*SRVPGM) NEWOWN(TSTGRPPRF)

RVKOBJAUT OBJ(TSTAUT/TSTAUT3) OBJTYPE(*SRVPGM) USER(*ALL) AUT(*ALL)

CHGPGM PGM(objlib/TSTAUT) USRPRF(*OWNER)

CHGOBJOWN OBJ(objlib/TSTAUT) OBJTYPE(*PGM) NEWOWN(QSECOFR)

In a job running under a profile with no
group, limited capability *NO, and no
special authorities:

CALL PGM(objlib/TSTAUT)

STRDBG PGM(TSTAUT/TSTAUT2)
(this will fail)

STRDBG SRVPGM(TSTAUT/TSTAUT3)
(this works)

ENDDBG

STRDBG

DSPMODSRC

F14 option 1 TSTAUT *PGM
(this works)

Hopefully being able to run this on your own
system will help explain what I am seeing.

David Morris



>>> rob@dekko.com 03/18/02 12:17 PM >>>

Are you trying to debug a *PGM or a *SRVPGM?
If you are doing a *SRVPGM are you doing it with
STRDBG SRVPGM(ROUTINES/SRVPGM)
STRDBG PGM(ROUTINES/SRVPGM)

Because if you try to debug a service program with
STRDBG PGM(ROUTINES/SRVPGM)
It tells you that you cannot.  You have to do a DSPMODSRC first and all
sorts of rot.

Does this sound familiar?

Rob Berendt


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