View previous topic :: View next topic
|
Author |
Message |
barathirajavb
New User
Joined: 15 Feb 2008 Posts: 3 Location: chennai
|
|
|
|
Hi
I'm running some 10 manual reports in oracle db (windows) daily, now i need to automate this process by running a batch job which will query against the oracle database and generate reports in flat files.
Could anyone suggest me an idea how to connect the job with oracle db ?
thanx
barathi |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Use the Oracle SQL*Plus utlity. |
|
Back to top |
|
|
barathirajavb
New User
Joined: 15 Feb 2008 Posts: 3 Location: chennai
|
|
|
|
kevin
Currently i'm running this reports with Sql Plus utility, i need to automate this process by submitting a batch job which will query the oracle db and it should generate reports.
i have to run some 10 reports daily , so i thought of automating it. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Maybe I'm missing something here. The only reason I originally responsed is because I was working on a very similar project a few weeks ago before I gave up on it.
SQL*Plus should exist as a PROC (ORASQL at my site) that you can use in your JCL. Provide it with the correct input for the TNSNAMES and SYSIN DD's and you should be able to do what you want:
Code: |
//ORASQL EXEC ORASQL,SSN=PGEN
//SYSERR DD SYSOUT=*
//ORAPRINT DD SYSOUT=*
//TNSNAMES DD *
....
/*
//SYSIN DD *
...
/*
|
|
|
Back to top |
|
|
barathirajavb
New User
Joined: 15 Feb 2008 Posts: 3 Location: chennai
|
|
|
|
hi kevin
i have done a search at my system libraries , but no such proc's or utilities were found , could u please let me know what were the utilities used in that proc...
thanx
barathi |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
That ORASQL proc executes the program PGM=SQLPLUS. |
|
Back to top |
|
|
|