sysLib.convert( target ANY inOut, [direction ConvertDirection in, conversionTable STRING in] )
Variable-length records are converted for the length of the current record only. The length of the current record is calculated using numElementsItem from the record or is set from the lengthItem in the record. If the variable-length record ends in the middle of a numeric field or a DBCS character, a conversion error occurs and the program ends.
Record OrderRec 10 record_type char(3); 10 productName char(20); end Record NewOrderRec 10 record_type char(3); 10 productNumber bigint; 10 unitCost decimal(7); 10 skuNum char(8); end Program ProgramX type basicProgram myOrderRec OrderRec; myNewOrderRec NewOrderRec {redefines = "myOrderRec"}; myConvTable char(8); function main(); myConvTable = "CSOX850"; // conversion table for US English EBCDIC if (myOrderRec.record_type == "00A") sysLib.convert(myOrderRec, ConvertDirection.local, myConvTable); else sysLib.convert(myNewOrderRec, ConvertDirection.local, myConvTable); end call ProgramY myOrderRec; end end