As a decode or lookup operation in your programs

Visual LANSA Framework

As a decode or lookup operation in your programs 

Code tables may be accessed by programs operating in non-visual contexts. For example a batch reporting programming may need to convert the currency code "USD" to the description "US Dollars" before printing it on a report. 

Only tables with data that is stored in a physical file are accessible by such functions. 

*Use the logical view (nma) keyed by: 

*Table name, field name, AKey1, Nkey1, AKey2, Nkey 2, Akey3, Nkey3 ...  

 

FETCH fields(#FP_EPTVAL)  from_file(FPTABnma) with_key('VF_CURRENCY' 'DESCRIPTN' #MyCurrencyCodeField) 

 

Change #MyDescriptionField #FP_EPTVAL

 

For more examples, refer to Frequently asked Questions about Code Tables