Abhay2012 wrote:Hi,
Can anyone please suggest how to define two record fields layout for a single input file.
I have a input file but have to read file from two different layouts, so if I read the file both the record fields layout should be populated.
e.g
FILE PERSNL VS
%PERSNL1
%PERSNL2
If have input file,PERSNL and having two layout PERSNL1 and PERSNL2(having same record format and record length). And if read file PERSNL both the filelds layout should populated.
Thanks!
That would be a way to define two record layouts for the same file.
However, I have no idea what you mean when you say "have to read file from two different layouts" or "if I read the file both the record fields layout should be populated".
You (or Easytrieve Plus) read the file. What the record-layouts do is "map" the data that is on the file. If you have two record-layouts, you have two "maps" (presumably you can identify which record is the current one from the data, so you know which "map" to use). Nothing gets "populated" into the layouts. You'll only have data on the file, and two different maps of that data (obviously, both maps are of the same storage location).
If you are trying to achieve something else, you'll have to describe as best you can what that is.