<?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"
	>
<channel>
	<title>Comments for RPG and Programming</title>
	<atom:link href="http://www.rpgandprogramming.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rpgandprogramming.com</link>
	<description>Not Role Playing Games, but the RPG programming language and the craft of programming.</description>
	<pubDate>Thu, 11 Mar 2010 20:13:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>Comment on Adventure in Modernization by Buck</title>
		<link>http://www.rpgandprogramming.com/2010/01/adventure-in-modernization/#comment-597</link>
		<dc:creator>Buck</dc:creator>
		<pubDate>Tue, 02 Feb 2010 16:26:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.rpgandprogramming.com/?p=208#comment-597</guid>
		<description>Brian's comment about hiding complexity with a subprocedure reflects one of the major breakthroughs in my own personal development as a programmer.  I tend to naturally think in terms of functions rather than in code, so the idea of taking a complicated bit of code and converting it to a function / subprocedure was one of those AHA! moments for me.

Not everyone will see it that way, of course, but I thought I'd throw that out there :-)</description>
		<content:encoded><![CDATA[<p>Brian&#8217;s comment about hiding complexity with a subprocedure reflects one of the major breakthroughs in my own personal development as a programmer.  I tend to naturally think in terms of functions rather than in code, so the idea of taking a complicated bit of code and converting it to a function / subprocedure was one of those AHA! moments for me.</p>
<p>Not everyone will see it that way, of course, but I thought I&#8217;d throw that out there <img src='http://www.rpgandprogramming.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adventure in Modernization by Curtis Barron</title>
		<link>http://www.rpgandprogramming.com/2010/01/adventure-in-modernization/#comment-595</link>
		<dc:creator>Curtis Barron</dc:creator>
		<pubDate>Sun, 24 Jan 2010 03:50:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.rpgandprogramming.com/?p=208#comment-595</guid>
		<description>I appreciate your response, Buck. Actually, using a data structure is the least obscure way of doing it. I may have been thinking that I didn't want to rely upon a data structure to do the formatting, since that would force the maintenance programmer to leave his C calculations and look up to the D specs to find out what the data structure was all about.

But then, he would have to go up there to see what the other fields looked like anyway, so why would that be a problem? One data structure. one calculation line, and we're done.

Thanks a lot.</description>
		<content:encoded><![CDATA[<p>I appreciate your response, Buck. Actually, using a data structure is the least obscure way of doing it. I may have been thinking that I didn&#8217;t want to rely upon a data structure to do the formatting, since that would force the maintenance programmer to leave his C calculations and look up to the D specs to find out what the data structure was all about.</p>
<p>But then, he would have to go up there to see what the other fields looked like anyway, so why would that be a problem? One data structure. one calculation line, and we&#8217;re done.</p>
<p>Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adventure in Modernization by Curtis Barron</title>
		<link>http://www.rpgandprogramming.com/2010/01/adventure-in-modernization/#comment-594</link>
		<dc:creator>Curtis Barron</dc:creator>
		<pubDate>Sun, 24 Jan 2010 03:30:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.rpgandprogramming.com/?p=208#comment-594</guid>
		<description>I appreciate your response, Brian. I not sure why I didn't think of that.

Perhaps I didn't think of the %editw BIF as effectively making it a string issue. I've been a little gun-shy of the EVAL statement ever since I first attempted to multiply a number by another (using EVAL) to create a number that would overflow and truncate the high end digits (as with the famous "magic number" method of flipping dates), and got a runtime error.

I was, of course, aware of the possibility of creating a subprocedure in a service program, but when it came to creating a subprocedure or an inline calculation, it really didn't make any difference. In either case, the nested BIFs would be ugly - even if I was the only one that knew it.

Again, thanks for reading and responding.</description>
		<content:encoded><![CDATA[<p>I appreciate your response, Brian. I not sure why I didn&#8217;t think of that.</p>
<p>Perhaps I didn&#8217;t think of the %editw BIF as effectively making it a string issue. I&#8217;ve been a little gun-shy of the EVAL statement ever since I first attempted to multiply a number by another (using EVAL) to create a number that would overflow and truncate the high end digits (as with the famous &#8220;magic number&#8221; method of flipping dates), and got a runtime error.</p>
<p>I was, of course, aware of the possibility of creating a subprocedure in a service program, but when it came to creating a subprocedure or an inline calculation, it really didn&#8217;t make any difference. In either case, the nested BIFs would be ugly - even if I was the only one that knew it.</p>
<p>Again, thanks for reading and responding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adventure in Modernization by Buck</title>
		<link>http://www.rpgandprogramming.com/2010/01/adventure-in-modernization/#comment-591</link>
		<dc:creator>Buck</dc:creator>
		<pubDate>Thu, 21 Jan 2010 19:48:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.rpgandprogramming.com/?p=208#comment-591</guid>
		<description>I'm not overly fond of the numeric conversion / editing trick myself.  I'm with you - I think it's a bit on the ugly side, and somewhat a stumbling block as I try to read it.  I'm far more pleased with self-documenting code; code that's so straight forward, it doesn't require a complex comment to explain it.  

Programmers from other languages (like C) will find the data structure example fairly easy, although using QUALIFIED will help that even more.  People from a pure RPG II environment might have an easier time with the explicit %subst()

For the record, I am an RPG II programmer, System/3.  I don't have much of a problem with the newer stuff in general.  MOVE almost always had some head scratcher.  A simple mis-definition of either the source or target and something odd would occur.  And that old code was loaded with MOVE and MOVELs.  Variables were defined wherever and looking up the definition of the variables involved invariably meant having a printed copy of the compiler listing handy (cross reference at the bottom.)

Of course, I'm talking about maintenance.  Writing new code wasn't nearly as stressful because one keeps all the variables straight.  But walking into someone else's code... I can't tell you how many times I scratched out the variables on scrap paper as I tried to decipher MOVE-laden code.

Kudos for doing this blog.  There aren't any other RPG programmers doing what you do, and I hope this spurs discussion about the peculiarities of our craft.  My comments are not intended as a criticism; my opinion is only one among many, and I have learnt much by being exposed to others - like yours.

H DFTACTGRP(*NO)   ACTGRP('QILE')                        
                                                         
d                 ds                                     
d  BACTNO                       11  0                    
d  ACC6                          6    overlay(bactno: 6) 
d  ACC_co                        2    overlay(bactno: 6) 
d  ACC_maj                       3    overlay(bactno: 8) 
d  ACC_min                       1    overlay(bactno: 11)
                                                         
d formatted       S              8    INZ                
                                                         
C/FREE                                                   
  eval bactno = 99999012345;                             
                                                         
  // explicit movement of data elements                  
  eval formatted = %subst(acc6: 1: 2) +                  
                   '-' +                                 
                   %subst(acc6: 3: 3) +                  
                   '-' +                                 
                   %subst(acc6: 6: 1);                   
  dsply formatted;                                       
                                                         
  // implicit movement of data elements                  
  eval formatted = acc_co +              
                   '-' +                 
                   acc_maj +             
                   '-' +                 
                   acc_min;              
  dsply formatted;                       
                                         
 /END-FREE                               
C                   EVAL      *INLR= *ON</description>
		<content:encoded><![CDATA[<p>I&#8217;m not overly fond of the numeric conversion / editing trick myself.  I&#8217;m with you - I think it&#8217;s a bit on the ugly side, and somewhat a stumbling block as I try to read it.  I&#8217;m far more pleased with self-documenting code; code that&#8217;s so straight forward, it doesn&#8217;t require a complex comment to explain it.  </p>
<p>Programmers from other languages (like C) will find the data structure example fairly easy, although using QUALIFIED will help that even more.  People from a pure RPG II environment might have an easier time with the explicit %subst()</p>
<p>For the record, I am an RPG II programmer, System/3.  I don&#8217;t have much of a problem with the newer stuff in general.  MOVE almost always had some head scratcher.  A simple mis-definition of either the source or target and something odd would occur.  And that old code was loaded with MOVE and MOVELs.  Variables were defined wherever and looking up the definition of the variables involved invariably meant having a printed copy of the compiler listing handy (cross reference at the bottom.)</p>
<p>Of course, I&#8217;m talking about maintenance.  Writing new code wasn&#8217;t nearly as stressful because one keeps all the variables straight.  But walking into someone else&#8217;s code&#8230; I can&#8217;t tell you how many times I scratched out the variables on scrap paper as I tried to decipher MOVE-laden code.</p>
<p>Kudos for doing this blog.  There aren&#8217;t any other RPG programmers doing what you do, and I hope this spurs discussion about the peculiarities of our craft.  My comments are not intended as a criticism; my opinion is only one among many, and I have learnt much by being exposed to others - like yours.</p>
<p>H DFTACTGRP(*NO)   ACTGRP(&#8217;QILE&#8217;)                        </p>
<p>d                 ds<br />
d  BACTNO                       11  0<br />
d  ACC6                          6    overlay(bactno: 6)<br />
d  ACC_co                        2    overlay(bactno: 6)<br />
d  ACC_maj                       3    overlay(bactno: <img src='http://www.rpgandprogramming.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /><br />
d  ACC_min                       1    overlay(bactno: 11)</p>
<p>d formatted       S              8    INZ                </p>
<p>C/FREE<br />
  eval bactno = 99999012345;                             </p>
<p>  // explicit movement of data elements<br />
  eval formatted = %subst(acc6: 1: 2) +<br />
                   &#8216;-&#8217; +<br />
                   %subst(acc6: 3: 3) +<br />
                   &#8216;-&#8217; +<br />
                   %subst(acc6: 6: 1);<br />
  dsply formatted;                                       </p>
<p>  // implicit movement of data elements<br />
  eval formatted = acc_co +<br />
                   &#8216;-&#8217; +<br />
                   acc_maj +<br />
                   &#8216;-&#8217; +<br />
                   acc_min;<br />
  dsply formatted;                       </p>
<p> /END-FREE<br />
C                   EVAL      *INLR= *ON</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adventure in Modernization by Brian May</title>
		<link>http://www.rpgandprogramming.com/2010/01/adventure-in-modernization/#comment-590</link>
		<dc:creator>Brian May</dc:creator>
		<pubDate>Thu, 21 Jan 2010 15:04:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.rpgandprogramming.com/?p=208#comment-590</guid>
		<description>I'll be happy to help on this one.  First, instead of 

EVALR ACC6 = %EDITW(%DEC(%SUBST(%EDITC(BACTNO:'X'):6:6):6:0):ACCW);

I suggest:

D ACCW            C                   '     0  -   - '

EvalR = %EditW(BActNo:ACCW);

Using the EvalR will truncate the leading 5 numbers anyway.

Secondly, when you do encounter a nasty situation like your original nested BIF's, wrap it in a subprocedure in a service program and no one will have to know exactly how it works.  That's the whole point behind "Modern" RPG.</description>
		<content:encoded><![CDATA[<p>I&#8217;ll be happy to help on this one.  First, instead of </p>
<p>EVALR ACC6 = %EDITW(%DEC(%SUBST(%EDITC(BACTNO:&#8217;X'):6:6):6:0):ACCW);</p>
<p>I suggest:</p>
<p>D ACCW            C                   &#8216;     0  -   - &#8216;</p>
<p>EvalR = %EditW(BActNo:ACCW);</p>
<p>Using the EvalR will truncate the leading 5 numbers anyway.</p>
<p>Secondly, when you do encounter a nasty situation like your original nested BIF&#8217;s, wrap it in a subprocedure in a service program and no one will have to know exactly how it works.  That&#8217;s the whole point behind &#8220;Modern&#8221; RPG.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on RPG In Isolation by Buck</title>
		<link>http://www.rpgandprogramming.com/2009/11/rpg-in-isolation/#comment-427</link>
		<dc:creator>Buck</dc:creator>
		<pubDate>Tue, 10 Nov 2009 17:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.rpgandprogramming.com/?p=201#comment-427</guid>
		<description>No doubt the success of RPG in the S/3 days left us with a glut of pre-existing home grown tool kits written in RPG.  Tool kits that got converted again and again and are still in use today.  How many RPG programmers just this year will learn to program in RPG by looking at that essentially 30 year old code?

As for replacing us geezers, I fear the answer is going to be a canned package on commodity hardware.</description>
		<content:encoded><![CDATA[<p>No doubt the success of RPG in the S/3 days left us with a glut of pre-existing home grown tool kits written in RPG.  Tool kits that got converted again and again and are still in use today.  How many RPG programmers just this year will learn to program in RPG by looking at that essentially 30 year old code?</p>
<p>As for replacing us geezers, I fear the answer is going to be a canned package on commodity hardware.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on And the #1 reason why freeform RPG is best is: by RPG and Programming &#187; Blog Archive &#187; RPG In Isolation</title>
		<link>http://www.rpgandprogramming.com/2008/06/and-the-1-reason-why-freeform-rpg-is-best-is/#comment-424</link>
		<dc:creator>RPG and Programming &#187; Blog Archive &#187; RPG In Isolation</dc:creator>
		<pubDate>Sat, 07 Nov 2009 04:40:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.rpgandprogramming.com/?p=12#comment-424</guid>
		<description>[...] C or Java or Rexx, they are easy enough to call. I have expressed myself in earlier posts about my ambivalent feelings about freeform [...]</description>
		<content:encoded><![CDATA[<p>[...] C or Java or Rexx, they are easy enough to call. I have expressed myself in earlier posts about my ambivalent feelings about freeform [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Education and Programming Style by Bill</title>
		<link>http://www.rpgandprogramming.com/2009/10/education-and-programming-style/#comment-367</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Thu, 15 Oct 2009 15:34:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.rpgandprogramming.com/?p=194#comment-367</guid>
		<description>This is an excellent blog site on RPG and programming.
I was in the field from 1983 to 2003 -- first as computer operator on a System 38; then programmer; programmer analyt; technical help desk analyst, all on AS400 systems ; in warehouse distribution, insurance, software development, retail, and others.
Your high level reflections on the art and craft of programming, are a breath of fresh air!
My education was a BA in Philosophy; later an MLS (library and info. science). I wanted to study Inforamtion Science.
I think you are right: most RPG programmers generally have lower education levels, but they are intelligent in logical thinking, analysis, and creativity.</description>
		<content:encoded><![CDATA[<p>This is an excellent blog site on RPG and programming.<br />
I was in the field from 1983 to 2003 &#8212; first as computer operator on a System 38; then programmer; programmer analyt; technical help desk analyst, all on AS400 systems ; in warehouse distribution, insurance, software development, retail, and others.<br />
Your high level reflections on the art and craft of programming, are a breath of fresh air!<br />
My education was a BA in Philosophy; later an MLS (library and info. science). I wanted to study Inforamtion Science.<br />
I think you are right: most RPG programmers generally have lower education levels, but they are intelligent in logical thinking, analysis, and creativity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Education and Programming Style by Buck</title>
		<link>http://www.rpgandprogramming.com/2009/10/education-and-programming-style/#comment-356</link>
		<dc:creator>Buck</dc:creator>
		<pubDate>Mon, 05 Oct 2009 17:07:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.rpgandprogramming.com/?p=194#comment-356</guid>
		<description>High School was and is my highest formal level of education.

Today I use RPG IV, free-form, BIFs, multi-language (C, RPG) ILE service programs and many hundreds of APIs.

I agree with the general thesis but disagree on the cause.  I believe that the midrange habit of being exposed to one language (RPG) is the cause.  Lack of formal computer education might be considered a contributing factor...</description>
		<content:encoded><![CDATA[<p>High School was and is my highest formal level of education.</p>
<p>Today I use RPG IV, free-form, BIFs, multi-language (C, RPG) ILE service programs and many hundreds of APIs.</p>
<p>I agree with the general thesis but disagree on the cause.  I believe that the midrange habit of being exposed to one language (RPG) is the cause.  Lack of formal computer education might be considered a contributing factor&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on &#8220;Subfiles in RPGIV&#8221; and Me by Curtis Barron</title>
		<link>http://www.rpgandprogramming.com/2009/05/subfiles-in-rpgiv-and-me/#comment-315</link>
		<dc:creator>Curtis Barron</dc:creator>
		<pubDate>Fri, 10 Jul 2009 23:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.rpgandprogramming.com/?p=165#comment-315</guid>
		<description>If I understand your question correctly, you have created a subfile that consists of one or more screens of data, then scrolled to the end of the subfile. 
For the sake of discussion, let's say you created a subfile of 48 records, consisting of 16 records per screen. When you roll back, you are in within the subfile. You can scroll back and forth within these three screens. The operating system itself, not the program, is in control of the roll keys. Assuming you have input capable fields, you can update the data within the subfile with either of the methods mentioned in my post. In this case, the roll keys will kick in when you scroll forward (roll up) at the end of the subfile.
If you are at the first screen, you can go no lower; you will probably get a keyboard error if you attempt to roll back. 
I'm not sure I've answered your question. If I haven't, let me know.</description>
		<content:encoded><![CDATA[<p>If I understand your question correctly, you have created a subfile that consists of one or more screens of data, then scrolled to the end of the subfile.<br />
For the sake of discussion, let&#8217;s say you created a subfile of 48 records, consisting of 16 records per screen. When you roll back, you are in within the subfile. You can scroll back and forth within these three screens. The operating system itself, not the program, is in control of the roll keys. Assuming you have input capable fields, you can update the data within the subfile with either of the methods mentioned in my post. In this case, the roll keys will kick in when you scroll forward (roll up) at the end of the subfile.<br />
If you are at the first screen, you can go no lower; you will probably get a keyboard error if you attempt to roll back.<br />
I&#8217;m not sure I&#8217;ve answered your question. If I haven&#8217;t, let me know.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
