Difference between LIKEREC and EXTNAME keyword in RPG AS400 |
LIKEREC vs EXTNAME
First of all we must know these two keywords LIKEREC and EXTNAME are used for defining Externally described data structure in RPGLE. Let's talk about the differences between them
LIKEREC | EXTNAME |
---|---|
Data Structure defined using LIKEREC keyword is always qualified. |
Data Structure defined using EXTNAME keyword is not qualified. However, we can make it qualified DS using QUALIFIED keyword. |
When using the LIKEREC keyword to define the Data structure, we need to define the file in the RPG program. However, we can still define the file as TEMPLATE so that the file definitions get used only not the actual file. |
When using EXTNAME keyword to define the Data structure, we do not need to define the file in the RPG program. |
Using the LIKEREC keyword we cannot add additional fields to the data structure. |
Using EXTNAME keyword we can add additional fields to the data structure. |
Using LIKEREC Keyword in Detail | Using EXTNAME Keyword in Detail |