 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Get user id in CGI RPG program</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/get-user-id-in-cgi-rpg-program/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/get-user-id-in-cgi-rpg-program/</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2013 12:30:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: littlepd</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/get-user-id-in-cgi-rpg-program/#comment-66919</link>
		<dc:creator>littlepd</dc:creator>
		<pubDate>Fri, 14 Aug 2009 03:51:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-66919</guid>
		<description><![CDATA[Has the user already logged in at this point?

After you call the API, the user id of the current session user can be found in the InBuffer variable.]]></description>
		<content:encoded><![CDATA[<p>Has the user already logged in at this point?</p>
<p>After you call the API, the user id of the current session user can be found in the InBuffer variable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lenny2113</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/get-user-id-in-cgi-rpg-program/#comment-66907</link>
		<dc:creator>lenny2113</dc:creator>
		<pubDate>Thu, 13 Aug 2009 19:33:34 +0000</pubDate>
		<guid isPermaLink="false">#comment-66907</guid>
		<description><![CDATA[Michael,  I appeciate your feedback on this one.
Please let me know what I am doing wrong here.
My field that expects userid input is called UserName.
We want to make it default to the current user instead of allowing users to type whatever they want..

I have included this code as part of my CGI program under process  ( C     $ProcInput    Begsr  )
C                   Eval      EnVarName = &#039;REMOTE_USER&#039;           
C                   Eval      EnVarLen = %Len(%Trim(EnVarName))   
C                   CallP     APIEnVar(InBuffer:InBufLen:InActLen:
C                             EnVarName:EnVarLen:apiError)  
      
Can I now set my UserName field to EnVarName ?

I tried this code : 
D   UserID              358    367 
and assigned  UserID to UserName, but instead of real user id I displayed the name of server instance QTMHHTTP1 
These are my jobs related to the process.... (Current User = &quot;QTMHHTTP&quot;)

                          Current                                        
Subsystem/Job  User        Type  CPU %  Function        Status
 QHTTPSVR       QSYS        SBS      .0                   DEQW 
  ADMIN        QTMHHTTP    BCH      .0  PGM-QZHBMAIN     SIGW 
  ADMIN        QTMHHTTP    BCI      .0  PGM-QZSRLOG      SIGW 
  ADMIN        QTMHHTTP    BCH      .0  PGM-QLWISVR      JVAW 
  ADMIN        QTMHHTTP    BCI      .0  PGM-QZSRHTTP     SIGW 
  ADMIN        &lt;b&gt;LENNY &lt;/b&gt;           BCI      .0  PGM-QZSRCGI      TIMW 
  ADMIN2       QLWISVR     BCI      .0  JVM-com.ibm.lw   THDW 
IBMTEST      QTMHHTTP    BCH      .0  PGM-QZHBMAIN     SIGW 
IBMTEST      QTMHHTTP    BCI      .0  PGM-QZSRLOG      SIGW 
IBMTEST      QTMHHTTP    BCI      .0  PGM-QZSRLOG      SIGW 
IBMTEST      QTMHHTTP    BCI      .0  PGM-QZSRHTTP     SIGW 
IBMTEST      QTMHHTTP    BCI      .0  PGM-QZSRHTTP     DEQW 
IBMTEST      QTMHHTP1    BCI      .0  PGM-QZSRCGI      TIMW]]></description>
		<content:encoded><![CDATA[<p>Michael,  I appeciate your feedback on this one.<br />
Please let me know what I am doing wrong here.<br />
My field that expects userid input is called UserName.<br />
We want to make it default to the current user instead of allowing users to type whatever they want..</p>
<p>I have included this code as part of my CGI program under process  ( C     $ProcInput    Begsr  )<br />
C                   Eval      EnVarName = &#8216;REMOTE_USER&#8217;<br />
C                   Eval      EnVarLen = %Len(%Trim(EnVarName))<br />
C                   CallP     APIEnVar(InBuffer:InBufLen:InActLen:<br />
C                             EnVarName:EnVarLen:apiError)  </p>
<p>Can I now set my UserName field to EnVarName ?</p>
<p>I tried this code :<br />
D   UserID              358    367<br />
and assigned  UserID to UserName, but instead of real user id I displayed the name of server instance QTMHHTTP1<br />
These are my jobs related to the process&#8230;. (Current User = &#8220;QTMHHTTP&#8221;)</p>
<p>                          Current<br />
Subsystem/Job  User        Type  CPU %  Function        Status<br />
 QHTTPSVR       QSYS        SBS      .0                   DEQW<br />
  ADMIN        QTMHHTTP    BCH      .0  PGM-QZHBMAIN     SIGW<br />
  ADMIN        QTMHHTTP    BCI      .0  PGM-QZSRLOG      SIGW<br />
  ADMIN        QTMHHTTP    BCH      .0  PGM-QLWISVR      JVAW<br />
  ADMIN        QTMHHTTP    BCI      .0  PGM-QZSRHTTP     SIGW<br />
  ADMIN        <b>LENNY </b>           BCI      .0  PGM-QZSRCGI      TIMW<br />
  ADMIN2       QLWISVR     BCI      .0  JVM-com.ibm.lw   THDW<br />
IBMTEST      QTMHHTTP    BCH      .0  PGM-QZHBMAIN     SIGW<br />
IBMTEST      QTMHHTTP    BCI      .0  PGM-QZSRLOG      SIGW<br />
IBMTEST      QTMHHTTP    BCI      .0  PGM-QZSRLOG      SIGW<br />
IBMTEST      QTMHHTTP    BCI      .0  PGM-QZSRHTTP     SIGW<br />
IBMTEST      QTMHHTTP    BCI      .0  PGM-QZSRHTTP     DEQW<br />
IBMTEST      QTMHHTP1    BCI      .0  PGM-QZSRCGI      TIMW</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.016 seconds using memcached
Object Caching 282/285 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-24 14:31:13 -->