<?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: Need to write a CL program to track user logins</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/how-to-know-user-logged-in-or-not/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-know-user-logged-in-or-not/</link>
	<description></description>
	<lastBuildDate>Wed, 19 Jun 2013 19:19:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-know-user-logged-in-or-not/#comment-78843</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Sat, 03 Jul 2010 06:01:17 +0000</pubDate>
		<guid isPermaLink="false">#comment-78843</guid>
		<description><![CDATA[If that&#039;s the only information that you needed from the system, it&#039;s much better to after it directly. Here&#039;s the source for a CHKUSRACT (Check User Active?) command:&lt;pre&gt;
 CHKUSRACT:  CMD        PROMPT(&#039;Check user active?&#039;)

             PARM       KWD(USRPRF) TYPE(*NAME) LEN(10) MIN(1) +
                          EXPR(*YES) PROMPT(&#039;User activity to check +
                          for&#039;)&lt;/pre&gt;
Compile this CL as the command processing program:&lt;pre&gt;
pgm    ( +
         &amp;pChkUsr      +
       )


   dcl   &amp;pChkUsr       *char       10


   dcl   &amp;usrspc        *char      10  VALUE( &#039;#$CHKUSRAC&#039; )
   dcl   &amp;usrspclib     *char      10  VALUE( &#039;QTEMP     &#039; )

   dcl   &amp;qusrspc       *char      20

   dcl   &amp;us_hdr        *char     150   /* Space header      */


/* Number of list entries: Listed jobs...                           */

   dcl   &amp;NbrLstE       *dec      (7)


/*  The qualified search job name...                                */
   dcl   &amp;SchJob        *char     26


   chgvar    &amp;qusrspc        ( &amp;usrspc *cat &amp;usrspclib )


/*  Create a usrspc to hold the job list data from this usrprf...   */

   call  QUSCRTUS         ( +
                            &amp;qusrspc                +
                            &#039;TMPLST    &#039;            +
                            x&#039;00001000&#039;             +
                            X&#039;00&#039;                   +
                            &#039;*ALL      &#039;            +
                            &#039;Temp list usr jobs     &#039; +
                            &#039;*YES      &#039;            +
                            x&#039;0000000000000000&#039;     +
                          )



/*                                                                  */
/*  Populate the usrspc with appropriate job list data...           */
/*                                                                  */

   chgvar    &amp;SchJob         ( +
                               &#039;*ALL      &#039; *cat         +
                               &amp;pChkUsr     *cat         +
                               &#039;*ALL      &#039;              +
                             )

   call  QUSLJOB          ( +
                            &amp;qusrspc                +
                            &#039;JOBL0100&#039;              +
                            &amp;SchJob                 +
                            &#039;*ACTIVE   &#039;            +
                            x&#039;0000000000000000&#039;     +
                            &#039;I&#039;                     +
                            x&#039;00000000&#039;             +
                            x&#039;00000000&#039;             +
                          )


/*  Retrieve the header data...                                     */

   call  QUSRTVUS         ( +
                            &amp;qusrspc                +
                            x&#039;00000001&#039;             +
                            x&#039;00000096&#039;             +
                            &amp;us_hdr                 +
                          )

   chgvar    &amp;NbrLstE        %bin( &amp;us_hdr    133 4 )


   if ( &amp;NbrLstE *eq 0 )  do
      sndpgmmsg  msgid( CPF9898 ) msgf( QCPFMSG ) +
                   msgdta( &#039;No active jobs found&#039; )
   enddo

   else  if ( &amp;NbrLstE *eq 1 )  do
      sndpgmmsg  msgid( CPF9898 ) msgf( QCPFMSG ) +
                   msgdta( &#039;Exactly one job found&#039; )
   enddo

   else  +
      sndpgmmsg  msgid( CPF9898 ) msgf( QCPFMSG ) +
                   msgdta( &#039;Multiple jobs found&#039; )


Clean_up:

   dltusrspc   &amp;usrspclib/&amp;usrspc

   return

endpgm&lt;/pre&gt;
The command accepts a user profile name. The program asks the system for a list of *ACTIVE jobs for that user, restricting the list to &#039;I&#039;nteractive jobs only. When the list is returned, the number of list entries is extracted.

The number is tested for zero, 1 or more jobs, and a message is sent based on the result. Just be aware that the count isn&#039;t a count of &quot;logins&quot;. The WRKACTJOB command won&#039;t tell you about logins either, so it doesn&#039;t matter.

Tom]]></description>
		<content:encoded><![CDATA[<p>If that&#8217;s the only information that you needed from the system, it&#8217;s much better to after it directly. Here&#8217;s the source for a CHKUSRACT (Check User Active?) command:
<pre>
 CHKUSRACT:  CMD        PROMPT('Check user active?')

             PARM       KWD(USRPRF) TYPE(*NAME) LEN(10) MIN(1) +
                          EXPR(*YES) PROMPT('User activity to check +
                          for')</pre>
<p>Compile this CL as the command processing program:
<pre>
pgm    ( +
         &amp;pChkUsr      +
       )


   dcl   &amp;pChkUsr       *char       10


   dcl   &amp;usrspc        *char      10  VALUE( '#$CHKUSRAC' )
   dcl   &amp;usrspclib     *char      10  VALUE( 'QTEMP     ' )

   dcl   &amp;qusrspc       *char      20

   dcl   &amp;us_hdr        *char     150   /* Space header      */


/* Number of list entries: Listed jobs...                           */

   dcl   &amp;NbrLstE       *dec      (7)


/*  The qualified search job name...                                */
   dcl   &amp;SchJob        *char     26


   chgvar    &amp;qusrspc        ( &amp;usrspc *cat &amp;usrspclib )


/*  Create a usrspc to hold the job list data from this usrprf...   */

   call  QUSCRTUS         ( +
                            &amp;qusrspc                +
                            'TMPLST    '            +
                            x'00001000'             +
                            X'00'                   +
                            '*ALL      '            +
                            'Temp list usr jobs     ' +
                            '*YES      '            +
                            x'0000000000000000'     +
                          )



/*                                                                  */
/*  Populate the usrspc with appropriate job list data...           */
/*                                                                  */

   chgvar    &amp;SchJob         ( +
                               '*ALL      ' *cat         +
                               &amp;pChkUsr     *cat         +
                               '*ALL      '              +
                             )

   call  QUSLJOB          ( +
                            &amp;qusrspc                +
                            'JOBL0100'              +
                            &amp;SchJob                 +
                            '*ACTIVE   '            +
                            x'0000000000000000'     +
                            'I'                     +
                            x'00000000'             +
                            x'00000000'             +
                          )


/*  Retrieve the header data...                                     */

   call  QUSRTVUS         ( +
                            &amp;qusrspc                +
                            x'00000001'             +
                            x'00000096'             +
                            &amp;us_hdr                 +
                          )

   chgvar    &amp;NbrLstE        %bin( &amp;us_hdr    133 4 )


   if ( &amp;NbrLstE *eq 0 )  do
      sndpgmmsg  msgid( CPF9898 ) msgf( QCPFMSG ) +
                   msgdta( 'No active jobs found' )
   enddo

   else  if ( &amp;NbrLstE *eq 1 )  do
      sndpgmmsg  msgid( CPF9898 ) msgf( QCPFMSG ) +
                   msgdta( 'Exactly one job found' )
   enddo

   else  +
      sndpgmmsg  msgid( CPF9898 ) msgf( QCPFMSG ) +
                   msgdta( 'Multiple jobs found' )


Clean_up:

   dltusrspc   &amp;usrspclib/&amp;usrspc

   return

endpgm</pre>
<p>The command accepts a user profile name. The program asks the system for a list of *ACTIVE jobs for that user, restricting the list to &#8216;I&#8217;nteractive jobs only. When the list is returned, the number of list entries is extracted.</p>
<p>The number is tested for zero, 1 or more jobs, and a message is sent based on the result. Just be aware that the count isn&#8217;t a count of &#8220;logins&#8221;. The WRKACTJOB command won&#8217;t tell you about logins either, so it doesn&#8217;t matter.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kiran9sdr</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-know-user-logged-in-or-not/#comment-78767</link>
		<dc:creator>kiran9sdr</dc:creator>
		<pubDate>Thu, 01 Jul 2010 10:29:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-78767</guid>
		<description><![CDATA[thanks for all.But i have done this earliar.Using wrkactjob to generate spool file and copy that spool file into a database file using cpysplf command in cl propgramme.take the help of substring operation choos the user values.........]]></description>
		<content:encoded><![CDATA[<p>thanks for all.But i have done this earliar.Using wrkactjob to generate spool file and copy that spool file into a database file using cpysplf command in cl propgramme.take the help of substring operation choos the user values&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-know-user-logged-in-or-not/#comment-78552</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 25 Jun 2010 04:50:36 +0000</pubDate>
		<guid isPermaLink="false">#comment-78552</guid>
		<description><![CDATA[&lt;i&gt;...I’ve been using it for just that purpose for a couple of years now and it works flawlessly.&lt;/i&gt;

...As far as you know.

Granted, it is possible to have it work nearly flawlessly; but if it&#039;s true for you, then you have an extremely atypical system and your method won&#039;t work for most other systems.

You must:&lt;ul&gt;
	&lt;li&gt;,,,nor run any host servers (or reject every logon attempt through them),&lt;/li&gt;&lt;li&gt;not run any TCP servers except telnet (or reject every logon through them)&lt;/li&gt;&lt;li&gt;don&#039;t allow logons through Windows networking,&lt;/li&gt;&lt;li&gt;no DDM nor remote SQL,&lt;/li&gt;&lt;li&gt;no Management Central,&lt;/li&gt;&lt;li&gt;no iSeries Navigator,&lt;/li&gt;&lt;li&gt;strict menu security, so only green-screen processing with no or extremely limited command-line access and tight control over commands, eliminating group jobs and a couple others,&lt;/li&gt;&lt;li&gt;and all users running in QINTER.&lt;/li&gt;
&lt;/ul&gt;
It&#039;s certainly possible, but I&#039;d guess you&#039;re close to unique.

If any of those are used, then your system is handing out logons and you&#039;re missing them.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>&#8230;I’ve been using it for just that purpose for a couple of years now and it works flawlessly.</i></p>
<p>&#8230;As far as you know.</p>
<p>Granted, it is possible to have it work nearly flawlessly; but if it&#8217;s true for you, then you have an extremely atypical system and your method won&#8217;t work for most other systems.</p>
<p>You must:
<ul>
<li>,,,nor run any host servers (or reject every logon attempt through them),</li>
<li>not run any TCP servers except telnet (or reject every logon through them)</li>
<li>don&#8217;t allow logons through Windows networking,</li>
<li>no DDM nor remote SQL,</li>
<li>no Management Central,</li>
<li>no iSeries Navigator,</li>
<li>strict menu security, so only green-screen processing with no or extremely limited command-line access and tight control over commands, eliminating group jobs and a couple others,</li>
<li>and all users running in QINTER.</li>
</ul>
<p>It&#8217;s certainly possible, but I&#8217;d guess you&#8217;re close to unique.</p>
<p>If any of those are used, then your system is handing out logons and you&#8217;re missing them.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rayj1031</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-know-user-logged-in-or-not/#comment-78457</link>
		<dc:creator>rayj1031</dc:creator>
		<pubDate>Tue, 22 Jun 2010 22:50:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-78457</guid>
		<description><![CDATA[The audit journal should contain any information that need about job&#039;s starting and ending.  I created a report for a bank to show all users that signed on or off between the hours of 7:00 pm and 5:00 am using only the audit journal entry type &#039;JS&#039;.  The audit journal entry type &#039;JS&#039; includes Start, End, Job type, job name, user, and number, real user, effective user and LOTS of other parameters.  There are over 30 fields of information about job changes in the JS audit journal entry.  

Can you be more specific about what you are tyring to accomplish?]]></description>
		<content:encoded><![CDATA[<p>The audit journal should contain any information that need about job&#8217;s starting and ending.  I created a report for a bank to show all users that signed on or off between the hours of 7:00 pm and 5:00 am using only the audit journal entry type &#8216;JS&#8217;.  The audit journal entry type &#8216;JS&#8217; includes Start, End, Job type, job name, user, and number, real user, effective user and LOTS of other parameters.  There are over 30 fields of information about job changes in the JS audit journal entry.  </p>
<p>Can you be more specific about what you are tyring to accomplish?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teandy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-know-user-logged-in-or-not/#comment-78439</link>
		<dc:creator>teandy</dc:creator>
		<pubDate>Tue, 22 Jun 2010 18:48:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-78439</guid>
		<description><![CDATA[&lt;i&gt;Note that QIBM_QWT_JOBNOTIFY reports when jobs start or end. Job starts do not indicate “logons” and job ends do not indicate “logoffs”.
&lt;/i&gt;

Funny, I&#039;ve been using it for just that purpose for a couple of years now and it works flawlessly.]]></description>
		<content:encoded><![CDATA[<p><i>Note that QIBM_QWT_JOBNOTIFY reports when jobs start or end. Job starts do not indicate “logons” and job ends do not indicate “logoffs”.<br />
</i></p>
<p>Funny, I&#8217;ve been using it for just that purpose for a couple of years now and it works flawlessly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-know-user-logged-in-or-not/#comment-78393</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 21 Jun 2010 22:29:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-78393</guid>
		<description><![CDATA[Note that QIBM_QWT_JOBNOTIFY reports when jobs start or end. Job starts do not indicate &quot;logons&quot; and job ends do not indicate &quot;logoffs&quot;.

Tom]]></description>
		<content:encoded><![CDATA[<p>Note that QIBM_QWT_JOBNOTIFY reports when jobs start or end. Job starts do not indicate &#8220;logons&#8221; and job ends do not indicate &#8220;logoffs&#8221;.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-know-user-logged-in-or-not/#comment-78276</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 17 Jun 2010 17:53:57 +0000</pubDate>
		<guid isPermaLink="false">#comment-78276</guid>
		<description><![CDATA[Define &quot;login&quot;.

Do you want users who are logged into the *DATABASE server? The *DTAQ server? The *FILE server? FTP? Telnet? There are a lot of ways to &quot;login&quot; as a user.

Tom]]></description>
		<content:encoded><![CDATA[<p>Define &#8220;login&#8221;.</p>
<p>Do you want users who are logged into the *DATABASE server? The *DTAQ server? The *FILE server? FTP? Telnet? There are a lot of ways to &#8220;login&#8221; as a user.</p>
<p>Tom</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.011 seconds using memcached
Object Caching 352/355 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-20 01:06:59 -->