I am trying to export data to a text file. I have a decimal field. I need to convert it to COMP-3(Packed Decimal). As i need to pass this file to mainframe.
You did not tell us from where the data is coming. The destination is a mainframe - aha.
For me it sounds like a COBOL-Program should be used to read the text file. If that is true then the very easy way is: export to ascii file with decimal values as 00234.66 or whatever and then in a short fine COBOL-Program read that file and move the data "PIC 9(5)V99" to a "PIC 9(5)V99 COMP-3" field for example...