 




<?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: AS400 Subfile position to fields</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/</link>
	<description></description>
	<lastBuildDate>Sat, 25 May 2013 23:02:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: The Most-Watched IT Questions: December 6, 2011 - ITKE Community Blog</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/#comment-99859</link>
		<dc:creator>The Most-Watched IT Questions: December 6, 2011 - ITKE Community Blog</dc:creator>
		<pubDate>Tue, 06 Dec 2011 14:48:01 +0000</pubDate>
		<guid isPermaLink="false">#comment-99859</guid>
		<description><![CDATA[[...] 5. NickHutcheson1 asks another question about a AS/400 sub program not working properly. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 5. NickHutcheson1 asks another question about a AS/400 sub program not working properly. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nickhutcheson1</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/#comment-99356</link>
		<dc:creator>nickhutcheson1</dc:creator>
		<pubDate>Wed, 23 Nov 2011 16:32:07 +0000</pubDate>
		<guid isPermaLink="false">#comment-99356</guid>
		<description><![CDATA[Thanks Tom. 
Great minds think alike.  I had already incorporated that after reviewing the code.  Trying to K.I.S.S.  Remember that?   My first boss preached that.  Keep It Simple Stupid.
&lt;Sigh&gt;  Another great person gone is my first boss.  R.I.P. Daniel Moffat.]]></description>
		<content:encoded><![CDATA[<p>Thanks Tom.<br />
Great minds think alike.  I had already incorporated that after reviewing the code.  Trying to K.I.S.S.  Remember that?   My first boss preached that.  Keep It Simple Stupid.<br />
&lt;Sigh&gt;  Another great person gone is my first boss.  R.I.P. Daniel Moffat.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/#comment-99323</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Wed, 23 Nov 2011 02:31:05 +0000</pubDate>
		<guid isPermaLink="false">#comment-99323</guid>
		<description><![CDATA[It looks like the basic logic can be restated this way without any difference in result (/free):&lt;pre&gt; // Simulate a wild card search
 If pospart &lt;&gt; *blanks ;
    len = %len(%trimr(pospart)) ;
    If %subst(avpart:1:len) &lt;&gt; %subst(pospart:1:len) ;
       Iter ;
    Endif ;
 Endif ;

 If posdesc &lt;&gt; *blanks ;
    len = %len(%trimr(posdesc)) ;
    If %subst(avdes1:1:len) &lt;&gt; %subst(posdesc:1:len) ;
       Iter ;
    Endif ;
 Endif ;

 ExSr $mov2sfl;  ...etc.&lt;/pre&gt;

Tom]]></description>
		<content:encoded><![CDATA[<p>It looks like the basic logic can be restated this way without any difference in result (/free):
<pre> // Simulate a wild card search
 If pospart &lt;&gt; *blanks ;
    len = %len(%trimr(pospart)) ;
    If %subst(avpart:1:len) &lt;&gt; %subst(pospart:1:len) ;
       Iter ;
    Endif ;
 Endif ;

 If posdesc &lt;&gt; *blanks ;
    len = %len(%trimr(posdesc)) ;
    If %subst(avdes1:1:len) &lt;&gt; %subst(posdesc:1:len) ;
       Iter ;
    Endif ;
 Endif ;

 ExSr $mov2sfl;  ...etc.</pre>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nickhutcheson1</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/#comment-99318</link>
		<dc:creator>nickhutcheson1</dc:creator>
		<pubDate>Tue, 22 Nov 2011 22:07:45 +0000</pubDate>
		<guid isPermaLink="false">#comment-99318</guid>
		<description><![CDATA[Maybe I should make some of these different posts but this is all related.
I am &#039;simulating&#039; a wild card search with logicals and RPGLE.  
The user can enter all or the first part of part# and/or description.
Here is what I am doing, I am open for any suggestions on how to do it better/cleaner.  SQL is not an option with large data base file.  
After reading a record from the file (routine will read from LF by part or LF by Desc), I check the EOF indicator.  Then....
&lt;/pre&gt;
 * Simulate a wild card search                              
C                   If        pospart &lt;&gt; *blanks            
C                   eval      len = %scan(&#039; &#039;:pospart:1) -1 
C                   If        len &lt; 1                       
C                   eval      len = 1                       
C                   endif                                   
C                   If        %subst(avpart:1:len) &lt;&gt;       
C                             %trimR(%subst(pospart:1:len)) 
C                   Iter                                    
C                   Endif                                   
C                   If        posdesc &lt;&gt; *blanks            
C                   eval      len = %scan(&#039; &#039;:posdesc:1) -1 
C                   If        len &lt; 1                       
C                   eval      len = 1                       
C                   endif                                   
C                   If        %subst(avdes1:1:len) &lt;&gt;       
C                             %trimR(%subst(posdesc:1:len)) 
C                   Iter                                    
C                   Endif                                   
C                   Endif                                   
C                   Endif                                  
 *                                                         
C                   If        posdesc &lt;&gt; *blanks           
C                   eval      len = %scan(&#039; &#039;:posdesc:1) -1
C                   If        len &lt; 1                      
C                   eval      len = 1                      
C                   endif                                  
C                   If        %subst(avdes1:1:len) &lt;&gt;      
C                             %trimR(%subst(posdesc:1:len))
C                   Iter                                   
C                   Endif                                  
C                   Endif                                  
 *                                                         
C                   ExSr      $mov2sfl                     
C                   EVAL      RRN = RRN + 1                
C                   EVAL      Cnt = Cnt + 1                
C                   WRITE     sflrcd                       
 *                                                         
C                   ENDDO]]></description>
		<content:encoded><![CDATA[<p>Maybe I should make some of these different posts but this is all related.<br />
I am &#8216;simulating&#8217; a wild card search with logicals and RPGLE.<br />
The user can enter all or the first part of part# and/or description.<br />
Here is what I am doing, I am open for any suggestions on how to do it better/cleaner.  SQL is not an option with large data base file.<br />
After reading a record from the file (routine will read from LF by part or LF by Desc), I check the EOF indicator.  Then&#8230;.</p>
<p> * Simulate a wild card search<br />
C                   If        pospart &lt;&gt; *blanks<br />
C                   eval      len = %scan(' ':pospart:1) -1<br />
C                   If        len &lt; 1<br />
C                   eval      len = 1<br />
C                   endif<br />
C                   If        %subst(avpart:1:len) &lt;&gt;<br />
C                             %trimR(%subst(pospart:1:len))<br />
C                   Iter<br />
C                   Endif<br />
C                   If        posdesc &lt;&gt; *blanks<br />
C                   eval      len = %scan(' ':posdesc:1) -1<br />
C                   If        len &lt; 1<br />
C                   eval      len = 1<br />
C                   endif<br />
C                   If        %subst(avdes1:1:len) &lt;&gt;<br />
C                             %trimR(%subst(posdesc:1:len))<br />
C                   Iter<br />
C                   Endif<br />
C                   Endif<br />
C                   Endif<br />
 *<br />
C                   If        posdesc &lt;&gt; *blanks<br />
C                   eval      len = %scan(' ':posdesc:1) -1<br />
C                   If        len &lt; 1<br />
C                   eval      len = 1<br />
C                   endif<br />
C                   If        %subst(avdes1:1:len) &lt;&gt;<br />
C                             %trimR(%subst(posdesc:1:len))<br />
C                   Iter<br />
C                   Endif<br />
C                   Endif<br />
 *<br />
C                   ExSr      $mov2sfl<br />
C                   EVAL      RRN = RRN + 1<br />
C                   EVAL      Cnt = Cnt + 1<br />
C                   WRITE     sflrcd<br />
 *<br />
C                   ENDDO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nickhutcheson1</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/#comment-99317</link>
		<dc:creator>nickhutcheson1</dc:creator>
		<pubDate>Tue, 22 Nov 2011 21:55:59 +0000</pubDate>
		<guid isPermaLink="false">#comment-99317</guid>
		<description><![CDATA[SFLHead is just headings.  SFLCTL is all of the SFL keywords plus the positioning fields at the bottom.  

Yeah, they looked at me funny the first time I did a subfile here with position to fields.  They were at the top of the screen.  They said, uh, let&#039;s make it like the other programs that were developed in the 80&#039;s.  
Ok, it pays the same....and you guys have to look at it every day.]]></description>
		<content:encoded><![CDATA[<p>SFLHead is just headings.  SFLCTL is all of the SFL keywords plus the positioning fields at the bottom.  </p>
<p>Yeah, they looked at me funny the first time I did a subfile here with position to fields.  They were at the top of the screen.  They said, uh, let&#8217;s make it like the other programs that were developed in the 80&#8242;s.<br />
Ok, it pays the same&#8230;.and you guys have to look at it every day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/#comment-99315</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 22 Nov 2011 20:31:08 +0000</pubDate>
		<guid isPermaLink="false">#comment-99315</guid>
		<description><![CDATA[&lt;i&gt;This is why I seperated the SFLCTL from the Headings.&lt;/i&gt;

With positioning at the bottom, that would explain it. The name SFLHEAD was misleading me.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>This is why I seperated the SFLCTL from the Headings.</i></p>
<p>With positioning at the bottom, that would explain it. The name SFLHEAD was misleading me.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nickhutcheson1</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/#comment-99309</link>
		<dc:creator>nickhutcheson1</dc:creator>
		<pubDate>Tue, 22 Nov 2011 19:16:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-99309</guid>
		<description><![CDATA[Tom,
and the answer is,,,,
CPD7812      30        1      Message . . . . :   Subfile control record overlaps subfile record.

This environment is different than most places.  They like and are used to having the positioning fields at the bottom instead of the top of the screen.  This is why I seperated the SFLCTL from the Headings.]]></description>
		<content:encoded><![CDATA[<p>Tom,<br />
and the answer is,,,,<br />
CPD7812      30        1      Message . . . . :   Subfile control record overlaps subfile record.</p>
<p>This environment is different than most places.  They like and are used to having the positioning fields at the bottom instead of the top of the screen.  This is why I seperated the SFLCTL from the Headings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nickhutcheson1</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/#comment-99307</link>
		<dc:creator>nickhutcheson1</dc:creator>
		<pubDate>Tue, 22 Nov 2011 18:06:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-99307</guid>
		<description><![CDATA[Yet one more challenge.  This program reads a join logical to load by part number, and reads another join logical to load by description.  Isn&#039;t there a &#039;newer&#039; / neater way to do this?
&lt;pre&gt;
ISTKMPR                                           
I              AWpart                      AVpart 
I              AWDES1                      AVDES1 
I              AWDES2                      AVDES2 
 *                                                
ISTKMP9                                           
I              AWpart                      AVpart 
I              AWDES1                      AVDES1 
I              AWDES2                      AVDES2&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Yet one more challenge.  This program reads a join logical to load by part number, and reads another join logical to load by description.  Isn&#8217;t there a &#8216;newer&#8217; / neater way to do this?</p>
<pre>
ISTKMPR                                           
I              AWpart                      AVpart 
I              AWDES1                      AVDES1 
I              AWDES2                      AVDES2 
 *                                                
ISTKMP9                                           
I              AWpart                      AVpart 
I              AWDES1                      AVDES1 
I              AWDES2                      AVDES2</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: nickhutcheson1</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/#comment-99306</link>
		<dc:creator>nickhutcheson1</dc:creator>
		<pubDate>Tue, 22 Nov 2011 18:03:17 +0000</pubDate>
		<guid isPermaLink="false">#comment-99306</guid>
		<description><![CDATA[Another quirk I just noticed is after positioning, and rolling to the end of the records, then rolling down(page up) the subfile rolls back through.  It goes back to the start, hit page up once more, shows the last page again, page up once more, shows the page above that, then back to the last page, all over again.  
I don&#039;t remember how or if I can make it stop.   This is loading a page at a time, &#039;dynamic grow&#039;.    So I write 5 records, display, page down is hit, I try to load 5 more, etc.  CPF handles rolldown.]]></description>
		<content:encoded><![CDATA[<p>Another quirk I just noticed is after positioning, and rolling to the end of the records, then rolling down(page up) the subfile rolls back through.  It goes back to the start, hit page up once more, shows the last page again, page up once more, shows the page above that, then back to the last page, all over again.<br />
I don&#8217;t remember how or if I can make it stop.   This is loading a page at a time, &#8216;dynamic grow&#8217;.    So I write 5 records, display, page down is hit, I try to load 5 more, etc.  CPF handles rolldown.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nickhutcheson1</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-subfile-position-to-fields/#comment-99305</link>
		<dc:creator>nickhutcheson1</dc:creator>
		<pubDate>Tue, 22 Nov 2011 17:53:06 +0000</pubDate>
		<guid isPermaLink="false">#comment-99305</guid>
		<description><![CDATA[Tom, it seems that I tried that before and it didn&#039;t work.  I could give it another shot and refresh my memory as to why.

Charlie Brown, enjoy...

&lt;pre&gt;
A                                      DSPSIZ(24 80 *DS3)
A****                                  CHGINPDFT         
A                                      PRINT             
A                                      CF01(01 &#039;PROCEED&#039;)
A                                      CF07(07 &#039;GO BACK&#039;)
A                                      CF12(12 &#039;GO BACK&#039;)
A                                      CF24(84 &#039;EXIT&#039;)   
A                                      ROLLUP            
A                                      ROLLDOWN          
A          R SFLRCD                    SFL                    
A*%%TS  SD  20111121  135705  NICKH       REL-V5R4M0  5722-WDS
A  94                                  SFLNXTCHG              
 * Line 1                                                     
A            FMSEL          1A  B  8  3DSPATR(UL)             
A            FMPART        20A  O  8  6                       
A            FMDESC        30A  O  8 37                       
 * Line 2                                                     
A            FMDESC2       30A  O  9 37                       
A*----------------------------------------------              
A          R SFLCTL                    SFLCTL(SFLRCD)         
A*%%TS  SD  20111121  155748  NICKH       REL-V5R4M0  5722-WDS
A                                      SFLSIZ(0006)           
A                                      SFLPAG(0005)           
A                                      OVERLAY                
A                                      CF05(05 &#039;SELECT ALL&#039;)  
A N72                                  SFLDSP                 
A N71                                  SFLDSPCTL              
A  71                                  SFLCLR                 
A  73                                  SFLEND(*MORE)          
A            RRN            4S 0H      SFLRCDNBR(CURSOR)      
A            RECNO          5S 0H                             
A  88        MESSAGE       75A  O 19  5DSPATR(UL)             
A  88                                  DSPATR(RI)             
A  88                                  COLOR(RED)             
A                                 20  2&#039;Begin At:&#039;            
A            POSPART       20A  B 21  6                       
A            POSDESC       30A  B 21 37                       
A*----------------------------------------------              
A          R SFLHEAD                                          
A                                      OVERLAY                
A                                  1  3DATE                   
A                                      EDTCDE(Y)              
A                                  1 70TIME                                
A            A4USER        10A  O  2  3                                    
A                                  2 29&#039;Warranty Reporting Tool&#039;           
A            A4PNAM        10A  O  2 70                                    
A                                  3 32&#039;Part Selections&#039;                   
A                                  6  3&#039;Selection Criteria:&#039;               
A                                      DSPATR(HI)                          
A                                      DSPATR(UL)                          
A                                  7  2&#039;Sel Part                          -
A                                       Desc                              -
A                                           &#039;                              
A                                      DSPATR(UL)                          
A                                      DSPATR(RI)                          
A          R CMDKEY                                                        
A                                 22  2&#039;                                  -
A                                                                         -
A                                              &#039;                           
A                                      DSPATR(UL)                          
A                                      DSPATR(HI)                          
A                                 23  2&#039;F1=Proceed  &#039;                      
A                                      DSPATR(HI)                          
A                                 23 15&#039;            &#039;                      
A                                      DSPATR(HI)                          
A                                 23 28&#039;            &#039;                      
A                                      DSPATR(HI)                          
A                                 23 42&#039;            &#039;                      
A                                      DSPATR(HI)                          
A                                 23 55&#039;F5=SelectAll&#039;                      
A                                      DSPATR(HI)                          
A                                 23 68&#039;            &#039;                      
A                                      DSPATR(HI)                          
A                                 24  2&#039;F7=Go Back  &#039;                      
A                                      DSPATR(HI)                          
A                                 24 15&#039;            &#039;
A                                      DSPATR(HI)    
A                                 24 28&#039;            &#039;
A                                      DSPATR(HI)    
A                                 24 42&#039;            &#039;
A                                      DSPATR(HI)    
A                                 24 55&#039;            &#039;
A                                      DSPATR(HI)    
A                                 24 68&#039;F24=End     &#039;
A                                      DSPATR(HI)&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Tom, it seems that I tried that before and it didn&#8217;t work.  I could give it another shot and refresh my memory as to why.</p>
<p>Charlie Brown, enjoy&#8230;</p>
<pre>
A                                      DSPSIZ(24 80 *DS3)
A****                                  CHGINPDFT         
A                                      PRINT             
A                                      CF01(01 'PROCEED')
A                                      CF07(07 'GO BACK')
A                                      CF12(12 'GO BACK')
A                                      CF24(84 'EXIT')   
A                                      ROLLUP            
A                                      ROLLDOWN          
A          R SFLRCD                    SFL                    
A*%%TS  SD  20111121  135705  NICKH       REL-V5R4M0  5722-WDS
A  94                                  SFLNXTCHG              
 * Line 1                                                     
A            FMSEL          1A  B  8  3DSPATR(UL)             
A            FMPART        20A  O  8  6                       
A            FMDESC        30A  O  8 37                       
 * Line 2                                                     
A            FMDESC2       30A  O  9 37                       
A*----------------------------------------------              
A          R SFLCTL                    SFLCTL(SFLRCD)         
A*%%TS  SD  20111121  155748  NICKH       REL-V5R4M0  5722-WDS
A                                      SFLSIZ(0006)           
A                                      SFLPAG(0005)           
A                                      OVERLAY                
A                                      CF05(05 'SELECT ALL')  
A N72                                  SFLDSP                 
A N71                                  SFLDSPCTL              
A  71                                  SFLCLR                 
A  73                                  SFLEND(*MORE)          
A            RRN            4S 0H      SFLRCDNBR(CURSOR)      
A            RECNO          5S 0H                             
A  88        MESSAGE       75A  O 19  5DSPATR(UL)             
A  88                                  DSPATR(RI)             
A  88                                  COLOR(RED)             
A                                 20  2'Begin At:'            
A            POSPART       20A  B 21  6                       
A            POSDESC       30A  B 21 37                       
A*----------------------------------------------              
A          R SFLHEAD                                          
A                                      OVERLAY                
A                                  1  3DATE                   
A                                      EDTCDE(Y)              
A                                  1 70TIME                                
A            A4USER        10A  O  2  3                                    
A                                  2 29'Warranty Reporting Tool'           
A            A4PNAM        10A  O  2 70                                    
A                                  3 32'Part Selections'                   
A                                  6  3'Selection Criteria:'               
A                                      DSPATR(HI)                          
A                                      DSPATR(UL)                          
A                                  7  2'Sel Part                          -
A                                       Desc                              -
A                                           '                              
A                                      DSPATR(UL)                          
A                                      DSPATR(RI)                          
A          R CMDKEY                                                        
A                                 22  2'                                  -
A                                                                         -
A                                              '                           
A                                      DSPATR(UL)                          
A                                      DSPATR(HI)                          
A                                 23  2'F1=Proceed  '                      
A                                      DSPATR(HI)                          
A                                 23 15'            '                      
A                                      DSPATR(HI)                          
A                                 23 28'            '                      
A                                      DSPATR(HI)                          
A                                 23 42'            '                      
A                                      DSPATR(HI)                          
A                                 23 55'F5=SelectAll'                      
A                                      DSPATR(HI)                          
A                                 23 68'            '                      
A                                      DSPATR(HI)                          
A                                 24  2'F7=Go Back  '                      
A                                      DSPATR(HI)                          
A                                 24 15'            '
A                                      DSPATR(HI)    
A                                 24 28'            '
A                                      DSPATR(HI)    
A                                 24 42'            '
A                                      DSPATR(HI)    
A                                 24 55'            '
A                                      DSPATR(HI)    
A                                 24 68'F24=End     '
A                                      DSPATR(HI)</pre>
]]></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.014 seconds using memcached
Object Caching 394/397 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-25 23:04:33 -->