IBM Support

SE67058 - RPGLE-CMPL-INCORROUT INPUT FOR FILE WITH PREFIX('DS.') ALIAS
DOES NOT READ FIELDS WITH "DS.NAME" LONGER THAN 14 CHARS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when an APAR for this component changes.

 APAR (Authorized Program Analysis Report)

Abstract

RPGLE-CMPL-INCORROUT INPUT FOR FILE WITH PREFIX('DS.') ALIAS
DOES NOT READ FIELDS WITH "DS.NAME" LONGER THAN 14 CHARS

Error Description

When ILE RPG source has a file defined with the ALIAS keyword  
and the PREFIX keyword with a parameter in the form 'DS.',      
the generated Input specifications for the file are not        
processed correctly for fields whose qualified subfield        
names are longer than 14.                                      
                                                               
For example, if the file has a field whose alias is            
COMPANY_NAME, the qualified subfield name would be              
DS.COMPANY_NAME, which is longer than 14 characters. This      
subfield will not be affected by an input operation such        
as READ or CHAIN that does not have a data structure specified  
in the result field.                                            

Problem Summary

****************************************************************
* USERS AFFECTED: All ILE RPG programmers who use the ALIAS    *
*                 keyword on File definitions.                 *
****************************************************************
* PROBLEM DESCRIPTION: When ILE RPG source has a file defined  *
*                      with the ALIAS keyword and the PREFIX   *
*                      keyword with a parameter in the form    *
*                      'DS.', the generated Input specs for    *
*                      the file are not processed correctly    *
*                      for fields whose qualified subfield     *
*                      names are longer than 14.               *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
When ILE RPG source has a file defined with the ALIAS keyword  
and the PREFIX keyword with a parameter in the form 'DS.',      
the generated Input specifications for the file are not        
processed correctly for fields whose qualified subfield        
names are longer than 14.                                      
                                                               
For example, if the file has a field whose alias is            
COMPANY_NAME, the qualified subfield name would be              
DS.COMPANY_NAME, which is longer than 14 characters. This      
subfield will not be affected by an input operation such        
as READ or CHAIN that does not have a data structure specified  
in the result field.                                            

Problem Conclusion

The ILE RPG compiler will be changed so that input operations  
for files defined with ALIAS and PREFIX('MYDS.') will handle    
all the subfields of the data structure MYDS.                  

Temporary Fix

Comments

Circumvention


Do one of the following                                        

                                                               
1. Specify the data structure in the result field of the        
   operation                                                    
                                                               
   Change this:                                                
          READ myfile;                                          
   To this:                                                    
          READ myfile myds;                                    
                                                               
2. Remove the ALIAS keyword from the F specification, and      
   change the PREFIX keyword to refer to an additional data    
   structure that is defined without the ALIAS keyword. Define  
   the second data structure with the BASED keyword, and set    
   the basing pointer to point to the data structure defined    
   with the ALIAS keyword. When the input operation reads data  
   into the new data structure, it will also affect the        
   original data structure defined with the ALIAS keyword      
   because to the two data structures have the same address in  
   memory due to the basing pointer.                            
                                                               
   Change this                                                  
          DCL-F myfile ALIAS PREFIX('MYDS.');                  
                                                               
          DCL-DS myDs EXTNAME('MYFILE') ALIAS QUALIFIED;        
          END-DS;                                              
                                                               
          READ myfile;                                          
                                                               
   To this:                                                    
          DCL-F myfile PREFIX('D2.');                          
                                                               
          DCL-DS myDs EXTNAME('MYFILE') ALIAS QUALIFIED;        
          END-DS;                                              
                                                               
          DCL-DS d2 EXTNAME('MYFILE') QUALIFIED                
                    BASED(pMyDs);                              
          END-DS;                                              
          DCL-S pMyDs POINTER INZ(%ADDR(myDs));                
                                                               
          READ myfile;                                          

PTFs Available

R710 SI64482 PTF Cover Letter   7192
R720 SI64483 PTF Cover Letter   7290
R730 SI64484 PTF Cover Letter   7283

Affected Modules

         
         

Affected Publications

Summary Information

Status............................................ CLOSED PER
HIPER........................................... No
Component.................................. 5770WDS30
Failing Module.......................... NONE
Reported Release................... R710
Duplicate Of..............................




System i Support

IBM disclaims all warranties, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. By furnishing this document, IBM grants no licenses to any related patents or copyrights. Copyright © 1996,1997,1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 IBM Corporation. Any trademarks and product or brand names referenced in this document are the property of their respective owners. Consult the Terms of use link for trademark information

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.2.0"},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG15Q","label":"APARs - OS\/400 General"},"Component":"","ARM Category":[],"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"V7R1M0;V7R2M0;V7R3M0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
28 October 2017