1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Nak charecter is printing in utl_file

Discussion in 'Oracle Apps Technical' started by RG Hegde, Oct 13, 2015.

  1. RG Hegde

    RG Hegde Forum Advisor

    Messages:
    185
    Likes Received:
    35
    Trophy Points:
    310
    Location:
    Pune
    Hello ,
    We are extracting data to Excel/csv file using UTL_FILE . But it is printing NAK character at the end like Below .

    upload_2015-10-13_18-23-43.png

    Code (SQL):
    DECLARE
      f_handle                      UTL_FILE.file_type;
      l_filename                    VARCHAR2 (100);
    BEGIN
      l_filename := REPLACE ('test', '.', '_') || '.xls';
      f_handle := UTL_FILE.fopen ('/usr/tmp', l_filename, 'w', 32767);
          UTL_FILE.put_line (f_handle,'hello');
      UTL_FILE.fclose (f_handle);
    EXCEPTION
      WHEN OTHERS
      THEN
    --  retcode:=2;
        fnd_file.put_line (fnd_file.LOG, 'Error Occured while creating  ' || l_filename || '  ' || SQLERRM);
    END;
    Please find the below DB version
    upload_2015-10-13_18-26-43.png

    Could you please assist how to resolve this issue ...