UNIQUE R FORMAT01 FNO 5S TEXT('FOUNDATION NUMBER') NAME 50A TEXT('FOUNDATION NAM') ADD1 25A TEXT('ADDRESS 1') ADD2 25A TEXT('ADDRESS 2') CITY 30A TEXT('CITY') STATE 2A TEXT('STATE') ZIP 12A TEXT('ZIP CODE') COUNTRY 25A TEXT('COUNTRY') TEL 20A TEXT('TELEPHONE NO') EMAIL 45A TEXT('EMAIL') WEBSITE 70A TEXT('WEBSITE NAME') K FNO R FORMAT02 FNO 5S TEXT('FOUNDATION NUMBER') NAME 50A TEXT('FOUNDATION NAM') BACKRND 50A TEXT('BACKRND') K FNOThis isn't compiling correctly. What am I doing wrong?
Discuss This Question: 4  Replies
On the AS/400 we see two physical files that are delivered by a single "multi-format" logical. This technique isn't necessary for modern RPG programming and it isn't useful for SQL.
We could. perhaps provide a better approach if you described your issue.
I think you're already beyond this question ..
You would create two physical files
File1 - your format1 above
File2 - your fomat2 above
You can, if you wish Join these file by creating a join logical file.
The Join file is not actually necessary for any processing on the AS/400,
You could also go the SQL route creating your File 1 with a foreign key relationship into File2. That would mean that no record could be added to File1 unless there was a related value in File2.