• Subject: RPG IV data structure and LIKE keyword
  • From: <jonp@xxxxxxxxxxxx>
  • Date: 6 Oct 1997 16:11:51 EDT

To: List)              <RPG400-L@midrange.com>

From: Jon Paris                                                                
Subject: RPG IV data structure and LIKE keyword                                

What you are seeing is a "feature" of RPG that has existed for many            
years.                                                                         

Because 'Zoned' is included in a DS, RPG retains the original file's           
data type. 'Zoned2' on the other hand is not included in a DS and              
therefore (since it is numeric) automatically is assigned an internal          
data type of packed. You can see this if you comment out your                  
'LIKE(Zoned2)' line and then look at the data definitions at the end of        
the compile listing. You'll see that the field is packed. Similarly if         
you comment out the 'Zoned' entry in the DS you'll see that it's type          
reverts to packed.                                                             

Because of the necessity to maintain compatibility with RPG III, this          
was something we had to live with for RPG IV. There is a case to be made       
for allowing you to specify a data type on items defined with LIKE - we        
can take a look at that.                                                       

.                                                                              
Jon Paris  -  AS/400 AD Market Support  -  jonp@vnet.ibm.com                   
Dept 723  IBM Canada Lab        T/L 8-778-4019   (416) 448-4019                
>> FAX Number:                      8-778-4414   (416) 448-4414                
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].