8 Replies Latest reply on Dec 8, 2016 6:49 AM by AndrewSayer

    Copy the Output file (PDF) of Concurrent Program to a different directory and rename the file?

    SOUVIK.GHOSH

      Hi All,

       

      I have a concurrent program which is generating PDF outputs in the $APPLOUT directory. I want to copy the PDF file and store it in a different directory (say, TEMP directory) and then rename it.

       

      Can I use UTL_FILE.FCOPY operation for the same? Both the OUT directory and TEMP directory have entries in the DBA_DIRECTORIES table. So can I use the below:-

       

      BEGIN

      UTL_FILE.fcopy('APPS_OUTPUT_FILE_DIR', 'XX_GEN_DEF_216079239_1.PDF', 'ODPDIR', '251432-401-20-T.PDF');

      END;

       

      This operation is throwing error so I am not sure where am I doing wrong. Can you please help?

       

      Also, I tried the option of using a unix host concurrent program to copy and move the file. But I am getting a permission denied error at the copy statement:-

       

      /trndshr/tsoadev2/applcsf/out

      File Exist XX_GEN_DEF_216080232_1.PDF

      cp: cannot create regular file `/trndshr/tsoadev2/temp/251432-401-20-T.PDF': Permission denied

       

      Can you throw some light here?

       

      Thanks for any help.