The best practice for this scenario is to create mapping tables (containing two fields, the code and the description). This can be done 3 ways:
- From your system database (if the mappings exist in the database). This has the advantage of no additional maintenance, but depends on the system.
- From an external source, such as Excel files. These mappings could be maintained by a data administrator.
- From inline tables. Simplest, but maintenance implies fiddling with the load script and could break the document.
Use Mapping Load.... statements into named mapping tables, one for each mapping, eg:
Mapping Load ItemTypeID, ItemTypeName
Then use ApplyMap during your load to bring the descriptions in:
ApplyMap('MapItemType', ItemTypeID) As ItemType,
You probably dont actually need the ItemTypeID after you have loaded, in which case you can omit the ItemTypeID line. Now the table contains the ItemType Descriptions.
Hope that helps
Sorry for the awful delay in asnwering and indeed thank you for the replies of you all, much appreciated!
Hinestly, I still do not understand what would be the difference between a "simple" solution like
names: LOAD * INLINE [ SCONL, Names AA, Warehouse 1 AB, Warehouse 2 ];
and going through the ApplyMap function, linked to an inline table.
Is it just a matter of "script developing etiquette"? Or are there real advantages connected to it?
Many thanks again for your support!