The magic value representation of data quality actually replaces the bad data value with a specific constant (which is machine dependent).
If you wish to export an ASTERIX dataset to a package like KAPPA which only handles magic values then you should first operate on the dataset with the command MAGIC.
In order to import a dataset containing magic values from a package such as KAPPA, you should use QUALITY in SET mode (ie. SETQUAL) with the selection keyword MAGIC.