 




<?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: How can I list users whose status is disabled on AS/400 ?</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/how-can-i-list-users-whose-status-is-disabled-on-as400/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/how-can-i-list-users-whose-status-is-disabled-on-as400/</link>
	<description></description>
	<lastBuildDate>Thu, 23 May 2013 05:15:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: The Most-Watched IT Questions: May 24, 2011 - ITKE Community Blog</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-can-i-list-users-whose-status-is-disabled-on-as400/#comment-92543</link>
		<dc:creator>The Most-Watched IT Questions: May 24, 2011 - ITKE Community Blog</dc:creator>
		<pubDate>Tue, 24 May 2011 06:41:24 +0000</pubDate>
		<guid isPermaLink="false">#comment-92543</guid>
		<description><![CDATA[[...] 3. Deepu9321, CharlieBrowne, and TomLiotta came together with some tips for listing users whose status is disabled on AS/400. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 3. Deepu9321, CharlieBrowne, and TomLiotta came together with some tips for listing users whose status is disabled on AS/400. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-can-i-list-users-whose-status-is-disabled-on-as400/#comment-91949</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 09 May 2011 19:54:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-91949</guid>
		<description><![CDATA[I&#039;m not sure what kinds of tips you need. This is a pretty straightforward process. Here&#039;s a trivial sample CL program that prints such a list:&lt;pre&gt;
/* +
   CRTCLMOD MODULE( mylib/LSTUSRDSE )            +
            SRCFILE( mylib/QCLSRC )              +
            SRCMBR( LSTUSRDSE )                  +
            LOG( *NO )                           +
                                                 +
   CRTPGM PGM( mylib/LSTUSRDSE )                 +
          BNDDIR( QC2LE )                        +
          ACTGRP( *NEW )                         +
          USRPRF( *OWNER )                       +
*/
pgm  ( +
     )

   dcl   &amp;msgdta      *char  128

   dcl   &amp;NL          *char    1     value( x&#039;15&#039; )
   dcl   &amp;x00         *char    1     value( x&#039;00&#039; )

   dcl   &amp;rc          *int

   dcl   &amp;eofUSRDSE   *lgl           value( &#039;0&#039; )


/* Compile over the IBM-supplied model file... */
   dclf  QADSPUPB

/* List user profiles to a temporary file... */
   dspusrprf   *ALL  output( *OUTFILE ) outfile( QTEMP/LSTUSRDSE )

/* ...and point the compiled file to our temporary one... */
   ovrdbf      QADSPUPB  tofile( QTEMP/LSTUSRDSE )

/* Set a trivial page heading... */
   chgvar           &amp;msgdta       ( +
                                    &#039;List Disabled Profiles&#039; *cat  +
                                    &amp;NL          *cat  +
                                    &amp;NL          *cat  +
                                    &amp;x00               +
                                  )

/* Assign our printed output to QPRINT... */
   ovrdbf      STDOUT  +
                 tofile( QPRINT )  +
                 ovrscope( *JOB ) +
                 share( *YES )

/* Print our trivial heading... */
   callprc        &#039;printf&#039;            ( +
                                        &amp;msgdta        +
                                      ) +
                                rtnval( &amp;rc )



/* Now loop through our temporary file until EOF... */

   dountil  ( &amp;eofUSRDSE )

      rcvf
      monmsg ( cpf0864 )  exec( do )
         chgvar &amp;eofUSRDSE   &#039;1&#039;
         iterate
      enddo

   /* If this one is &#039;*DISABLED&#039;, print a line... */
      if ( &amp;UPSTAT *eq &#039;*DISABLED&#039; )  do
         chgvar     &amp;msgdta       ( +
                                    &amp;UPUPRF      *cat  +
                                    &#039;  &#039;         *cat  +
                                    &amp;UPTEXT      *cat  +
                                    &amp;NL          *cat  +
                                    &amp;x00               +
                                  )
         callprc  &#039;printf&#039;            ( +
                                        &amp;msgdta        +
                                      ) +
                                rtnval( &amp;rc )
      enddo
   enddo

/* Clear away our override... */
   dltovr      STDOUT  lvl( *JOB )

/* ...and get out of here... */
   return

endpgm&lt;/pre&gt;
One specific thing to beware of is that this editor kind of trashes single- and double-quote marks under various circumstances. If you put this into a source member, look it over carefully to catch where single-quotes need to be manually typed over.

If the printed report is longer than a single page, you might consider adding a &quot;page-heading&quot; subroutine.

You can compile the module and create the program in any library you wish. Just be sure to use the example CRTCLMOD and CRTPGM parameters at the least. You can add additional parms, but you&#039;ll have to debug oddities that will arise if you want to remove any from the minimum suggested parms.

Tom]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure what kinds of tips you need. This is a pretty straightforward process. Here&#8217;s a trivial sample CL program that prints such a list:
<pre>
/* +
   CRTCLMOD MODULE( mylib/LSTUSRDSE )            +
            SRCFILE( mylib/QCLSRC )              +
            SRCMBR( LSTUSRDSE )                  +
            LOG( *NO )                           +
                                                 +
   CRTPGM PGM( mylib/LSTUSRDSE )                 +
          BNDDIR( QC2LE )                        +
          ACTGRP( *NEW )                         +
          USRPRF( *OWNER )                       +
*/
pgm  ( +
     )

   dcl   &amp;msgdta      *char  128

   dcl   &amp;NL          *char    1     value( x'15' )
   dcl   &amp;x00         *char    1     value( x'00' )

   dcl   &amp;rc          *int

   dcl   &amp;eofUSRDSE   *lgl           value( '0' )


/* Compile over the IBM-supplied model file... */
   dclf  QADSPUPB

/* List user profiles to a temporary file... */
   dspusrprf   *ALL  output( *OUTFILE ) outfile( QTEMP/LSTUSRDSE )

/* ...and point the compiled file to our temporary one... */
   ovrdbf      QADSPUPB  tofile( QTEMP/LSTUSRDSE )

/* Set a trivial page heading... */
   chgvar           &amp;msgdta       ( +
                                    'List Disabled Profiles' *cat  +
                                    &amp;NL          *cat  +
                                    &amp;NL          *cat  +
                                    &amp;x00               +
                                  )

/* Assign our printed output to QPRINT... */
   ovrdbf      STDOUT  +
                 tofile( QPRINT )  +
                 ovrscope( *JOB ) +
                 share( *YES )

/* Print our trivial heading... */
   callprc        'printf'            ( +
                                        &amp;msgdta        +
                                      ) +
                                rtnval( &amp;rc )



/* Now loop through our temporary file until EOF... */

   dountil  ( &amp;eofUSRDSE )

      rcvf
      monmsg ( cpf0864 )  exec( do )
         chgvar &amp;eofUSRDSE   '1'
         iterate
      enddo

   /* If this one is '*DISABLED', print a line... */
      if ( &amp;UPSTAT *eq '*DISABLED' )  do
         chgvar     &amp;msgdta       ( +
                                    &amp;UPUPRF      *cat  +
                                    '  '         *cat  +
                                    &amp;UPTEXT      *cat  +
                                    &amp;NL          *cat  +
                                    &amp;x00               +
                                  )
         callprc  'printf'            ( +
                                        &amp;msgdta        +
                                      ) +
                                rtnval( &amp;rc )
      enddo
   enddo

/* Clear away our override... */
   dltovr      STDOUT  lvl( *JOB )

/* ...and get out of here... */
   return

endpgm</pre>
<p>One specific thing to beware of is that this editor kind of trashes single- and double-quote marks under various circumstances. If you put this into a source member, look it over carefully to catch where single-quotes need to be manually typed over.</p>
<p>If the printed report is longer than a single page, you might consider adding a &#8220;page-heading&#8221; subroutine.</p>
<p>You can compile the module and create the program in any library you wish. Just be sure to use the example CRTCLMOD and CRTPGM parameters at the least. You can add additional parms, but you&#8217;ll have to debug oddities that will arise if you want to remove any from the minimum suggested parms.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kilizan</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-can-i-list-users-whose-status-is-disabled-on-as400/#comment-91944</link>
		<dc:creator>kilizan</dc:creator>
		<pubDate>Mon, 09 May 2011 17:30:11 +0000</pubDate>
		<guid isPermaLink="false">#comment-91944</guid>
		<description><![CDATA[Thanks a lot, I&#039;ll try tomorow]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot, I&#8217;ll try tomorow</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/8 queries in 0.011 seconds using memcached
Object Caching 297/298 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-23 06:19:59 -->