3 Replies Latest reply: Jul 27, 2010 1:41 AM by 787570 RSS

    FND_FILE

    479017
      Hi,

      I want to know where oracle maintains (table) data when following is statement is executed.

      FND_FILE.PUT_LINE(FND_FILE.LOG, 'THIS IS A TEST')

      Thanks in advance.

      Regards,
      Jagadeesh Tata
        • 1. Re: FND_FILE
          YuryVelikanov
          Jagadeesh,
          FND_FILE.PUT_LINE(FND_FILE.LOG, 'THIS IS A TEST')
          Isn't something that Oracel stores in a DB.
          Oracle puts this message in File System on Apps server in the directory $APPLCSF/$LOG.

          Yury
          • 2. Re: FND_FILE
            306078
            Having just worked through the extremely painful process of debugging some concurrent request output issues, I can let you know it is more complicated than this.

            The FND_FILE.PUT_LINE() calls use the UTL_FILE package to write the line to a temporary file in the $APPLPTMP directory.

            If you are using the FND_FILE.PUT_LINE() from within a concurrent program, the actual temporary files used can be found with the following query (directory, output temporary file, log temporary file):

            select cp.plsql_dir, cp.plsql_out, cp.plsql_log
            from fnd_concurrent_requests cr, fnd_concurrent_processes cp
            where cr.request_id = <running request id>
            and cp.concurrent_process_id = cr.controlling_manager;

            Once the concurrent request completes, the data in the temporary files is copied to the concurrent request output and log files (for example $APPLCSF/out/<SID>_<node>/o<requestid>.out and $APPLCSF/log/<SID>_<node>/l<requestid>.log)

            If you are not using this from inside a concurrent request, you would need to be file handling yourself (ie set file names, open, fetch contents once complete, close, etc) - you would need to trawl through FND_FILE and FND_FILE_PRIVATE to work out exactly how to do that.
            • 3. Re: FND_FILE
              787570
              Sets the temporary log and out filenames and the temp directory to the user-specified values. DIR must be a directory to which the database can write. FND_FILE.PUT_NAMES should be called before calling any other FND_FILE function, and only once per session.

              Attention: FND_FILE.PUT_NAMES is meant for testing and debugging from SQL*Plus; it does nothing if called from a concurrent program.

              Arguments (input)


              p_log Temporary log filename.
              p_out Temporary output filename.
              p_dir Temporary directory name.

              Example


              BEGIN
                   fnd_file.put_names('test.log', 'test.out',
                        '/local/db/8.0.4/db-temp-dir/');      
                   fnd_file.put_line(fnd_file.output,'Called stored                          procedure');
                   /* Some logic here... */
                   fnd_file.put_line(fnd_file.output, 'Reached point A');
                   /* More logic, etc... */
                   fnd_file.close;
              END;