Difference between LIKEREC and EXTNAME keyword in RPG AS400

Difference between LIKEREC and EXTNAME keyword in RPG AS400
Difference between LIKEREC and EXTNAME keyword in RPG AS400, LIKEREC vs EXTNAME, EXTNAME, LIKEREC, Externally described data structure, external ds in rpg, data structure, ds,external ds using LIKEREC keyword, create, make, about, introduction, what
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

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain