|
Distinguish between Record Types without Indicators
Published: October 28, 2009
Hey, Ted:
I have an RPG question. Now that indicators are verboten, how does an RPG program distinguish between record types when reading a multi-format logical file? That is, what do I use instead of record identifying indicators?
--Tricia
Define a file information data structure for the logical file. The system will place the record format name in positions 261-270. Here's some sample source code to get you started.
FSomeLF if e k disk
F infds(SomeInfo)
D SomeInfo ds
D RecordFormat 10 overlay(SomeInfo: 261)
/free
if RecordFormat = 'CURRENT';
// do one thing
elseif RecordFormat = 'LASTYEAR';
// do something else
--Ted
Post this story to del.icio.us
Post this story to Digg
Post this story to Slashdot
|