2

I am having a Oracle concurrent program which calls a UNIX shell script which will execute SQL loader program. This is used for inserting flat file from legacy to Oracle Base tables.

My question here is,

How do I capture my custom messages, validation error messages etc in the Oracle log file of the concurrent program.

All help in this regards are much appreciated.

Vincent Malgrat
  • 66,725
  • 9
  • 119
  • 171
Arun Antony
  • 573
  • 4
  • 13
  • 26
  • Is this an Oracle Applications (EBS) question ? – Vincent Malgrat Nov 16 '10 at 11:19
  • No! This is UNIX Shell scripting question. I need to write all custom messages to Oracle Log file. – Arun Antony Nov 16 '10 at 11:43
  • By "Oracle log file" do you mean the database's Alert Log? Or some other file? – APC Nov 16 '10 at 13:47
  • When you run a concurrent program through SRS window in Oracle Application, An output file and Log file will get generated which will be in OUT and LOG directory respectively. Log file will contain the details such as parameters passed to the UNIX shell script, custom errors, messages etc. – Arun Antony Nov 16 '10 at 14:20

3 Answers3

1

How is your concurrent process defined? If it's using the "Host" execution method then the output should go into the concurrent log file. If it's being executed from a stored procedure, I'm not sure where it goes.

JOTN
  • 6,120
  • 2
  • 26
  • 31
  • Yes... correct. I am using a HOST executing method. using a unix shell script... which will connect to sql db and then retrieve/validate flat file records with db table. – Arun Antony Nov 17 '10 at 05:58
1

It looks like you are trying to launch SQL*Loader from Oracle Apps. The simplest way would be to use the SQL*Loader type of executables, this way you will get the output and log files right in the concurrent requests window.

If you want to write in the log file and the output file from a unix script, you can find them in the FND_CONCURRENT_REQUESTS table (column logfile_name and outfile_name). You should get the REQUEST_ID passed as a parameter to your script.

These files should be in $XX_TOP\log and should be called l{REQUEST_ID}.req and o{REQUEST_ID}.out (apps 11.5.10).

Vincent Malgrat
  • 66,725
  • 9
  • 119
  • 171
  • That shouldn't be necessary for the log file. Any output from the script should go into the log file. I did a quick through my concurrent log and found a couple cases to confirm this. – JOTN Nov 16 '10 at 14:56
  • @vincent - I appreciate your help. You have specified where and how to specify the log n out file. But how will I print into a log/output file from unix. What is the unix command which is used to do the same? – Arun Antony Nov 17 '10 at 05:49
  • Can you pls confirm the same. – Arun Antony Nov 17 '10 at 05:56
  • Can I write like this... Please confirm the same. echo "My message" $Value >> l_request_id.req – Arun Antony Nov 17 '10 at 06:00
  • @Arun: yes, you could write to the file using `echo` and `>>`. If you want to write to the output file, a simple `echo` should work (as per JOTN answer) – Vincent Malgrat Nov 17 '10 at 10:43
0

Have your script use sqlplus to sign into oracle, and insert/update the information you need.

EvilTeach
  • 28,120
  • 21
  • 85
  • 141