COBOL'er posting in the RPG area (no surprise there...lol).
I'm trying to define a work area laid out identically to an inbound file I am reading. The physical file is named IV021F and its record format name is RIV021F. All of the fields are named I21field01, I21field02, I21field03, etc. etc. etc.
So after looking at the manual...it seemed simple enough. Use the LIKEREC keyword to define a DS that is identical to the record layout and then use the PREFIX keyword to change all of the field names from I21xxxx to Z21xxxx.
Unfortunately...this doesn't work...I'm receiving an error in SEU indicating that this is not allowed (The keyword is not allowed following keyword LIKEREC; keyword is ignored).
Does anyone have a smarter way to do this?
I'm trying to define a work area laid out identically to an inbound file I am reading. The physical file is named IV021F and its record format name is RIV021F. All of the fields are named I21field01, I21field02, I21field03, etc. etc. etc.
So after looking at the manual...it seemed simple enough. Use the LIKEREC keyword to define a DS that is identical to the record layout and then use the PREFIX keyword to change all of the field names from I21xxxx to Z21xxxx.
Unfortunately...this doesn't work...I'm receiving an error in SEU indicating that this is not allowed (The keyword is not allowed following keyword LIKEREC; keyword is ignored).
Does anyone have a smarter way to do this?






Comment