In the ILE RPG reference manual the follwoing is listed:
If file name refers to an externally-described file or a record format from an externally described file, the data structure must be a data structure defined with EXTNAME(…:*INPUT) or LIKEREC(…:*INPUT).
You don’t show these keywords on your DS definition.
There is no need for any additional keywords; the additional keywords are all optional. Nor does it matter if the file reference is for input, output or update — the file format is the same regardless of I/O operation and the DS is based on format, not operation.
The default is *INPUT which means that only fields defined as input-capable will be declared in your DS. Note that you would probably be better off specifying *ALL explicitly since you’re working with an ‘U’pdate file.
The problem appears to be due to this from the RPG Reference:
<li>The first parameter for keyword LIKEREC is a record name in the program. If the record name has been renamed, it is the internal name for the record.</li>
You say both RENAME(REC:arec) and extname(aaal21). Try coding extname(arec). If you’re going to rename a record format in your program, then you need to use the name that you assigned.