[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with using QtmhGetEnv



   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. This will be a first for me.


   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: [1]dfreinkel@xxxxxxxxxxxxxxxxx

   Web: [2]www.assignment400.com

References

   1. mailto:dfreinkel@xxxxxxxxxxxxxxxxx
   2. http://www.assignment400.com/
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------