the QtmhGetEnv api is returning blanks for the CGIConvMode environment
variable in a CGI program. I also get blanks when I use the getenv api.
Why would that be? CGIConvMode is specified in the httpd.conf file used
for the instance of apache server.

-- portion of the httpd.conf file
ServerRoot /cgidev/conf
DocumentRoot /cgidev/conf/hotdocs
Listen 8014
DefaultType text/html
# CGI
CGIConvMode %%EBCDIC/EBCDIC%%
# CGIConvMode BINARY
ThreadsPerChild 53
MaxCGIJobs 100
StartCGI 2 QTMHHTP1
Timeout 120

-- my code that gets the environment variable:

convMode = hGetEnvVlu( 'CGIConvMode' ) ;

** ---------------------- hGetEnvVlu -----------------------------
** hGetEnvVlu - get environment variable value
** sVlu = hGetEnvVlu( VarName ) ;
dhGetEnvVlu pr 1024a varying
d extproc('hGetEnvVlu')
d InVarName 80a const varying

** ---------------------- hGetEnvVlu -----------------------------
** hGetEnvVlu - get environment variable value
** sVlu = hGetEnvVlu( VarName ) ;
phGetEnvVlu b export
dhGetEnvVlu pi 1024a varying
d InVarName 80a const varying

d Error ds likeds(refApiError)
d inz(*Likeds)
d buf s 9999a
d ActDataLx s 10i 0
/free

pr_QtmhGetEnv( buf: %size(buf): ActDataLx:
InVarName: %len(InVarName): Error ) ;
if ActDataLx > 1024 ;
return x'01' ;
else ;
return %subst( buf: 1: ActDataLx ) ;
endif ;

/end-free
p e

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.