What OS level are you on. I seem to recall this happening a while ago.

When environment variable are you trying to retrieve? Or is it any
that it does this on.

CGIDEV2 does use this API so it's odd that you wouldn't have similar problems.

Brad
www.bvstools.com

On Thu, Jun 14, 2012 at 4:43 PM, Darryl Freinkel
<dfreinkel@xxxxxxxxxxxxxxxxx> wrote:
I am writing my first program calling this procedure directly. It is part of
a simple CGI program I am developing.



    d CGI_GetEnv      PR                  extproc('QtmhGetEnv')

     /copy a4g10xsfs/qxscpy,CGI_GetEnv

    d a4g_GetEnv      PI         32767a   varying

     /copy a4g10xsfs/qxscpy,a4gGetEnv

     *------------------------------------------------

     * Local Variables

     *------------------------------------------------

    d wCGI_EnvVal     s          32767a   varying

    d wCGI_EnvValLen  s             10i 0

    d wCGI_EnvLen     s                   like(wCGI_EnvValLen)

    d wCGI_EnvName    s             20a

    d wCGI_EnvNameLen...

    d                 s                   like(wCGI_EnvValLen)

    d                                     inz(%size(wCGI_EnvName))

    d



    *------------------------------------------------



     /free

        clear wCGI_EnvVal;

        clear wCGI_EnvValLen;

        clear wCGI_EnvNameLen;

        clear dsCGI_Error;

        wCGI_EnvName   = pGetEnv;

        wCGI_EnvValLen = %len(%trim(wCGI_EnvName));

        CGI_GetEnv(wCGI_EnvVal : wCGI_EnvValLen : wCGI_EnvLen :

                                 wCGI_EnvName :

                    wCGI_EnvNameLen : dsCGI_Error );

        Return wCGI_EnvVal;

        *inlr = *on;

        /End-free

    p a4g_GetEnv      e



When the program executes, I am getting the following authority errors:

    Attempt to use permanent system object QTEMDBSV without authority.

    Attempt to use permanent system object QWTPECTL without authority.

    Attempt to use permanent system object QTEVSIRF without authority.

    Attempt to use permanent system object QTEVINVR without authority.

    Error occurred with input data parameter.

    Attempt to use permanent system object QMHPDEH without authority.

    Attempt to use permanent system object QMHUNMSG without authority.

    Attempt to use permanent system object QWCSCVTR without authority.

    Attempt to use permanent system object QMHRTMSS without authority.



I have used CGIDEV2 and it does not get this error.



v5.4

User = QTMHHTP1.



The solution may be to change the user id in the program before the call.



Can anyone help with the reason for this?



TIA

Darryl Freinkel | Assignment 400 Group, Inc.

Tel: 770.321.8562 ext 111 | Fax 770.321.8562

E-mail: dfreinkel@xxxxxxxxxxxxxxxxx

Web: www.assignment400.com



--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


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.