Spool output into script
Hello,
I'm using dbms_metadata.getddl to generate a script to recreate a bunch of indexes for a schema. The SELECT command below works fine but I'm getting the SQL COMMAND and SPOOL OFF output in my spooled file.
Is there a way to turn something off so I DO NOT get the spool garbage at the beginning and end of my spool file? I swear I've done this before but I'm pulling my hair out trying to remember how.
Here's the command I'm running:
set pagesize 0
set long 90000
set feedback 0
set echo off
set heading off
set termout off
set verify off
set serveroutput 0ff
spool cr_indx.sql
SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name) || ';'
FROM USER_INDEXES u where table_owner='SFUSER' and index_name not like 'SYS%';
spool off;
I'm getting this at the top of my spool file (my SQL command):
SQL> SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name) || ';' FROM USER_INDEXES u where table_owner='SFUSER' and index_name not like 'SYS%';
and this at the bottom of my spool file:
SQL> spool off
Hi,
Put all these into a file name it some thing like test.sql
set pagesize 0
set long 90000
set feedback 0
set echo off
set heading off
set termout off
set verify off
set serveroutput 0ff
spool cr_indx.sql
SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name) || ';'
FROM USER_INDEXES u where table_owner='SFUSER' and index_name not like 'SYS%';
spool off;
and execute it
sql>@test.sql
then you will not get spool off and sql command.
Thanks,
G.
Similar Messages
-
Converting sap script output into pdf format?
Hi all,
I have modified the standard purchase order script form MEDRUCK . Now i need to generate the output into pdf format.
This is not only limited to spool requests , But also when the user creates the purchase order and clicks on print or print preview the output should be in pdf format.
Please help on where and what code has to be written for this requirement?
Thanks,
Aravind.Hi
I don't know which is your release, but I don't think it's possible to create a preview in pdf format, but u can create a pdf file instead of the spool and then open it automatically, this is an example:
- A) Open form
IF P_PDF = 'X'.
XDEVICE = 'PRINTER'.
* Get OTF
ITCPO-TDGETOTF = 'X'.
ENDIF.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = XDEVICE
DIALOG = 'X'
FORM = 'ZFI_CL_EC_MOVI'
OPTIONS = ITCPO
MAIL_SENDER = LVS_SENDER
MAIL_RECIPIENT = LVS_RECIPIENT
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
OTHERS = 11.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
B) Close FORM
CALL FUNCTION 'CLOSE_FORM'
TABLES
OTFDATA = T_OTF
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore chiusura stampa'(A02).
ELSE.
PERFORM DOWNLOAD_PDF.
ENDIF.
C) Create PDF and open it:
FORM DOWNLOAD_PDF.
DATA: BIN_FILESIZE TYPE I.
DATA: T_FILE_PDF TYPE STANDARD TABLE OF TLINE,
DOCTAB_ARCHIVE TYPE STANDARD TABLE OF DOCS.
DATA: FILE_TABLE TYPE FILETABLE WITH HEADER LINE.
DATA: RC TYPE I,
USER_ACTION TYPE I.
DATA: TITLE TYPE STRING,
FILENAME TYPE STRING.
CHECK P_PDF = 'X'.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
BIN_FILESIZE = BIN_FILESIZE
TABLES
OTF = T_OTF
DOCTAB_ARCHIVE = DOCTAB_ARCHIVE
LINES = T_FILE_PDF
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore conversione PDF'(A03).
EXIT.
ENDIF.
TITLE = 'Creare File'(T02).
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = TITLE
DEFAULT_EXTENSION = '*.pdf'
CHANGING
FILE_TABLE = FILE_TABLE[]
RC = RC
USER_ACTION = USER_ACTION
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
EXIT.
ELSE.
IF USER_ACTION = 9. EXIT. ENDIF.
IF RC = 1.
READ TABLE FILE_TABLE INDEX 1.
ENDIF.
ENDIF.
MOVE FILE_TABLE-FILENAME TO FILENAME.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
BIN_FILESIZE = BIN_FILESIZE
FILENAME = FILENAME
FILETYPE = 'BIN'
CHANGING
DATA_TAB = T_FILE_PDF
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
EXIT.
ELSE.
MESSAGE S208(00) WITH 'File creato con successo'(S01).
ENDIF.
CHECK P_OPEN = 'X'.
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
URL = FILE_TABLE-FILENAME
EXCEPTIONS
FRONTEND_NOT_SUPPORTED = 1
FRONTEND_ERROR = 2
PROG_NOT_FOUND = 3
NO_BATCH = 4
UNSPECIFIED_ERROR = 5
OTHERS = 6.
IF SY-SUBRC <> 0.
MESSAGE S208(00) WITH 'Impossibile aprire file'(A05).
ENDIF.
ENDFORM. " DOWNLOAD_PDF
Max -
How to put the alv output into the spool request?
Hi guys,
How to put the alv output into the spool request?
Thanks!Hi
Sending an ALV List screen output to SPOOL
Convert ALV list to PDF and send mails to respective persons
Regards
Pavan -
Convert spool output of ABAP list into excel and send email
Hello All,
I have a requirement where we need to
1. schedule a background job programtically
2. moniter backround job (if complete or not)
3. once its complete take spool output ,convert into excel and email.
I have following difficulties.
1. i have reached upto stage 3. However, i am not getting proper ouput of excel via mail. it contains junk characters. I searched SDN and tried various option but not successful.
2. AT last i have submited report and collected output in memory rather than submiting back ground job. Now excel out put is coming somewhat as required but while sending mail , i am getting limitation of 255 chars . My excel row has more than 255 line size.
Please suggest.
Thanks in advance,
jigs.
<<text removed>>
Edited by: Matt on Jul 1, 2009 3:52 PM - removed point offerI've edited your post. Please take the time to read the Rules of Engagement of these forums. Offering points is not permitted for reasons outline in the Rules of Engagement.
matt -
Hi Friends,
i want program output into spool..
mean.. when i am executing the zprogram...the program output into spools..
regards,Hi,
Create a Background job schedule it will runs in background automatically it will creates a spool.
To Create Background job schedule T-Code SM36
To Execute the Background job schedule T-code SM37
To see the spool T-code is SP01.
Thanks
Ganesh -
How can we assign the output of script pdf into input of function module
Hi Guru's
i have a query convert script output into pdf then assign this pdf file as a input of one function module.it is possible or not..
if yes how can we do it.
Thanks,
[email protected]Hi,
Search below thread
https://www.sdn.sap.com/irj/sdn/forumsearch
Regards
Pavan -
Need help reg. Conversion of report output into spool
Hi Experts,
I need to convert the report output into spool while report is executed in foreground not in background. Please let me know your inputs.
Thanks
GopalSUBMIT... TO SAP-SPOOL AND RETURN : Prints output of a report that you call with the SUBMIT keyword. As with NEW-PAGE PRINT ON, the list is printed during its generation, so that both PRINT-CONTROL and FORMAT keywords take effect. Also, SUBMIT... TO SAP-SPOOL AND RETURN allows the programmer to set the format and other printing parameters. As with NEW-PAGE PRINT ON, you can set printing and archiving parameters with the GET_PRINT_PARAMETERS function module.
CONVERT_ABAPSPOOLJOB_2_PDF convert abap spool output to PDF -
Need to split the output into files
Hi,
I have a query regarding splitting the output into different files. Please help to resolve that.
I have have select query query...
SELECT INDEX_NAME FROM DBA_INDEXES WHERE TABLE_NAME=<Table Name>;
If it returns less than 4 indexes then we have create one table and have to move those into the files.
For example...
File_1.sql
====
index1
index2
index3
If select statement returns more than 4 indexes then we have create 4 files and have to splict those indexes and has to move to those 4 files.
For example....
If select statement returns 13 records then...
File_1.sql File_2.sql File_3.sql File_4.sql
===== ====== ======= =======
index1 index4 index7 index10
index2 index5 index8 index11
index3 index6 index9 index12
index13
Index no need to be in order in any file and any file can I extra index in it.
Can be ok if we have any procedure or shell script. Please help me on this?
We are using 10.2.0.1 oracle db. Please let me know if you need any thing else?
Thanks
PathanAre you trying to put the output from SQL reports in different files?
Some reporting tools can do this.
You have a couple of options to do this.
Some reporting tools support the functinality to write to different files.
Another way is to write a PL/SQL procedure using UTL_FILE, which can open multiple files based on your conditions and to write to them as you need to.
An older, less elegant solution is to write nested SQL*PLUS scripts spooling to different files with the queries you need. A top level script would invoke the others, something like (untested)
--in first script
@subscript1
@subscript2
--in subscript1.sql
spool whatever.lst
select *
from dual;
... -
How to write stored procedure to spool data into file
Hi ,
We get differnt excel sheets of differnt products.
We upload data from excel sheet to database . After uploading data , I run Preprossor (sql script) to check the data
This preprocessor script contains several select statements that query different tables in database .the output is spooled into a cvs file .
I need to change this script into a stored procedure and spool the output to cvs file.
File spooling should be done inside the stored procedure so that if I call this stored procedure from java program ,or any concurrent program,its output is .cvs file and in parameter should be productname.
But inside the stored procedure , we cannot spool the data to some .cvs file . Is any way.I do not want to spool to file when calling.It should be inside stored procedure.
Or do I need to create a table and insert all the select statements output into it .
Here is the sample preprocessor script.
spool Graco_Product.csv
set head off
set feedback off
set Pagesize 100
SELECT '1. EVERY ASSEMBLY GROUP ADDED IN sys_PRODUCT TABLE MUST HAVE AT LEAST ONE ITEM IN WOC_ASSEMBLY_ITEM'
FROM DUAL;
SELECT 'ASSEMBLY_GROUP_NAME'
FROM DUAL;
SELECT
assembly_group_name
FROM association
WHERE product_model_name = 'Graco_Product'
AND assembly_group_name NOT IN (SELECT DISTINCT assembly_group_name FROM woc_assembly_item);
SELECT '2. A RULE SHOULD HAVE AT LEAST ONE EXPRESSION FOR ITS ACTION SIDE.'
FROM DUAL;
SELECT 'RELATION_ID , RELATION_TYPE'
FROM DUAL;
SELECT wr.Relation_ID ||','||
wr.Relation_Type
FROM WOC_Relation wr
WHERE NOT EXISTS (SELECT 'X' FROM WOC_Relation_Expression wre
WHERE wre.Relation_Side = 'Action'
AND wr.Relation_ID = wre.Relation_ID)
AND wr.Relation_Type NOT IN ( 'Rule Warning','Rule Resource','Rule Default');
SELECT '3. PROPERTIES USED IN RULES SHOULD EXIST IN WOC_PROPERTY_MASTER -- EXP_LHS_VALUE'
FROM DUAL;
SELECT
'RELATION_OWNER,EXP_LHS_OPERAND,RELATION_SIDE,RELATION_ID,EXP_LHS_VALUE,RELATION_TYPE'
FROM DUAL;
SELECT
b.relation_owner ||','||
a.exp_lhs_operand ||','||
a.relation_side ||','||
a.relation_id ||','||
a.exp_lhs_value ||','||
b.relation_type
FROM woc_relation_expression a, woc_relation b
WHERE a.exp_lhs_value IS NOT NULL
AND a.exp_lhs_value_type = 'Property'
AND a.exp_lhs_value NOT IN (SELECT property_name FROM woc_property)
AND b.product_model_name = 'Graco_Product'
AND a.relation_id = b.relation_id;
SELECT '--------------------------------------------------------------------------------'
from dual;
spool off
set head on
set feedback onHigh level description
Full documentation
Note that the UTL_ and DBMS_ packages are all covered in the PL/SQL Packages and Types Reference.
You may also want to read up on the CREATE DIRECTORY statement, which lets you refer to an actual OS directory (which you create separately) via a database object. -
How to eliminate SQL command in Spool output?
Hi,
I'm trying to Spool an output to a txtfile without the SQL command being at the top of the page. I've tried a number of ways, but I'm having no luck.Any Ideas?
Sorry for the long msg, but maybe if some saw what I'm trying to do it would be helpful.
Many thanks,
James
Also does anyone know if its possible to import straight into Excel from PL/SQL?
The following is the Script I'm running:
set echo off
set validate off
set termout off
set linesize 100
set feedback off
set verify off
set heading off
set serveroutput on;
SPOOL C:/test12.txt
spool on
alter session set NLS_DATE_FORMAT='DD-Mon-YYYY';
SET SERVEROUTPUT ON
declare
V_DATE_FILED DATE;
V_DATE_FILED_PREV DATE;
v_count_file_per_day NUMBER(10) := 0;
v_count_agents NUMBER(10);
v_count_farmers NUMBER(10);
v_count_total NUMBER(10);
V_AG_DATE_FILED DATE;
V_AG_DATE_FILED_PREV DATE;
v_AG_count_file_per_day NUMBER(10) := 0;
begin
DBMS_OUTPUT.ENABLE(1000000);
select count(*) into v_count_agents
from TDSP_SAVED_DRAFT_DATA
where syr_scheme_year_code =2007
and SDD_FORM_TYPE=330
and SDS_FORM_SUBMITTED_IND ='Y'
and SDD_AUDIT_USER LIKE 'aga%';
for rec in (select sph_sps_holding_id
from TDSP_SAVED_DRAFT_DATA
where syr_scheme_year_code =2007
and SDD_FORM_TYPE=330
and SDS_FORM_SUBMITTED_IND ='Y'
and SDD_AUDIT_USER LIKE 'aga%'
order by SDD_AUDIT_DATE)
Loop
select app.APP_DATE_OF_RECEIPT
INTO V_AG_DATE_FILED
from TDSP_APPLICATION app, TDSP_SAVED_DRAFT_DATA sdd
where app.syr_scheme_year_code =2007
and app.syr_scheme_year_code = sdd.syr_scheme_year_code
and app.sph_sps_holding_id = sdd.sph_sps_holding_id
and app.sph_sps_holding_id = rec.sph_sps_holding_id
and sdd.SDD_FORM_TYPE=330
and sdd.SDD_AUDIT_USER LIKE 'aga%'
and rownum =1;
if TO_CHAR(V_AG_DATE_FILED_PREV, 'dd/mm/yyyy') <> TO_CHAR(V_AG_DATE_FILED, 'dd/mm/yyyy') then
DBMS_OUTPUT.PUT_LINE(V_AG_DATE_FILED_PREV || '/' || v_AG_count_file_per_day);
v_AG_count_file_per_day := 0;
end if;
V_AG_DATE_FILED_PREV := V_AG_DATE_FILED;
if TO_CHAR(SYSDATE, 'dd/mm/yyyy') = TO_CHAR(V_AG_DATE_FILED, 'dd/mm/yyyy') then
select count(*)
INTO v_AG_count_file_per_day
from TDSP_APPLICATION app, TDSP_SAVED_DRAFT_DATA sdd
where app.syr_scheme_year_code =2007
and app.syr_scheme_year_code = sdd.syr_scheme_year_code
and app.sph_sps_holding_id = sdd.sph_sps_holding_id
and sdd.SDD_FORM_TYPE=330
and sdd.SDD_AUDIT_USER LIKE 'aga%'
and TO_CHAR(app.APP_DATE_OF_RECEIPT, 'dd/mm/yyyy') = TO_CHAR(SYSDATE, 'dd/mm/yyyy');
DBMS_OUTPUT.PUT_LINE(SYSDATE || '/' || v_AG_count_file_per_day);
exit;
end if;
end loop;
select count(*) into v_count_farmers
from TDSP_SAVED_DRAFT_DATA
where syr_scheme_year_code =2007
and SDD_FORM_TYPE=330
and SDS_FORM_SUBMITTED_IND ='Y'
and SDD_AUDIT_USER LIKE 'P%';
for rec in (select sph_sps_holding_id
from TDSP_SAVED_DRAFT_DATA
where syr_scheme_year_code =2007
and SDD_FORM_TYPE=330
and SDS_FORM_SUBMITTED_IND ='Y'
and SDD_AUDIT_USER LIKE 'P%'
ORDER BY SDD_AUDIT_DATE)
Loop
select app.APP_DATE_OF_RECEIPT
INTO V_DATE_FILED
from TDSP_APPLICATION app, TDSP_SAVED_DRAFT_DATA sdd
where app.syr_scheme_year_code =2007
and app.syr_scheme_year_code = sdd.syr_scheme_year_code
and app.sph_sps_holding_id = sdd.sph_sps_holding_id
and app.sph_sps_holding_id = rec.sph_sps_holding_id
and sdd.SDD_FORM_TYPE=330
and sdd.SDD_AUDIT_USER LIKE 'P%'
and rownum =1;
if TO_CHAR(V_DATE_FILED_PREV, 'dd/mm/yyyy') <> TO_CHAR(V_DATE_FILED, 'dd/mm/yyyy') then
DBMS_OUTPUT.PUT_LINE(V_DATE_FILED_PREV || '/' || v_count_file_per_day);
v_count_file_per_day := 0;
end if;
V_DATE_FILED_PREV := V_DATE_FILED;
if TO_CHAR(SYSDATE, 'dd/mm/yyyy') = TO_CHAR(V_DATE_FILED, 'dd/mm/yyyy') then
select count(*)
INTO v_count_file_per_day
from TDSP_APPLICATION app, TDSP_SAVED_DRAFT_DATA sdd
where app.syr_scheme_year_code =2007
and app.syr_scheme_year_code = sdd.syr_scheme_year_code
and app.sph_sps_holding_id = sdd.sph_sps_holding_id
and sdd.SDD_FORM_TYPE=330
and sdd.SDD_AUDIT_USER LIKE 'P%'
and TO_CHAR(app.APP_DATE_OF_RECEIPT, 'dd/mm/yyyy') = TO_CHAR(SYSDATE, 'dd/mm/yyyy');
DBMS_OUTPUT.PUT_LINE(SYSDATE || '/' || v_count_file_per_day);
exit;
end if;
end loop;
end;
spool offi use to use this kinda spooling..
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SET LINESIZE 32000
SET PAGESIZE 0
SET TERMOUT OFF
SET TRIMSPOOL ON
spool c:\test.csv
PROMPT employeename,emp_id
select employeename||','||emp_id
from employees;
SPOOL OFF
SET ECHO ON
SET FEEDBACK ON
SET HEADING ON
SET LINESIZE 80
SET PAGESIZE 24
SET TERMOUT ON
SET TRIMSPOOL OFF
to spool data into .csv file -
ALV list display in a Background job - Spool output
Hi,
We are currently working on a report scheduled to be run in the background job, and the ALV list is displayed in the spool output.
ALV list in the spool does not look the same as front run job, the column headers are all crowded together, and there is no grid in-between different columns or rows. It's hard to read.
Is there a way to add grid for this kind of output?
Thanks!Hi Deepak:
I expanded your report into two rows display, and the grid in the spool display simply gone!
report zzscratch line-size 120 no standard page heading.
type-pools slis.
tables pa0001.
data : li_field type standard table of slis_fieldcat_alv,
gi_events type standard table of slis_alv_event,
gr_layout_bck type slis_layout_alv,
gr_save like disvariant,
gr_events type slis_alv_event.
types : begin of gtt_emp,
pernr type persno,
ename like pa0001-ename,
uname like pa0001-UNAME,
end of gtt_emp.
data : lr_field type slis_fieldcat_alv.
data : lc_rep like syst-repid.
data : li_emp type standard table of gtt_emp,
lr_emp type gtt_emp.
data : gv_ref_table type lvc_rtname.
gv_ref_table = 'CATSDB'.
lr_field-fieldname = 'PERNR'.
lr_field-ref_tabname = gv_ref_table.
lr_field-inttype = 'N'.
lr_field-outputlen = 8.
lr_field-seltext_l = 'EMPLOYEE Number'.
append lr_field to li_field.
lr_field-fieldname = 'ENAME'.
lr_field-ref_tabname = 'PA0001'.
lr_field-inttype = 'C'.
lr_field-outputlen = 40.
lr_field-seltext_l = 'EMPLOYEE Name'.
append lr_field to li_field.
lr_field-fieldname = 'UNAME'.
lr_field-ref_tabname = 'PA0001'.
lr_field-inttype = 'C'.
lr_field-outputlen = 12.
lr_field-seltext_l = 'User Name'.
lr_field-row_pos = 2.
lr_field-col_pos = 1.
append lr_field to li_field.
lc_rep = sy-repid.
gr_layout_bck-edit_mode = 'D'.
gr_save-report = sy-repid.
lr_emp-pernr = '00000001'.
lr_emp-ename = 'abc'.
lr_emp-uname = 'testus'.
append lr_emp to li_emp.
lr_emp-pernr = '00000002'.
lr_emp-ename = 'def'.
append lr_emp to li_emp.
lr_emp-pernr = '00000003'.
append lr_emp to li_emp.
lr_emp-pernr = '00000004'.
append lr_emp to li_emp.
lr_emp-pernr = '00000005'.
append lr_emp to li_emp.
lr_emp-pernr = '00000006'.
append lr_emp to li_emp.
lr_emp-pernr = '00000007'.
append lr_emp to li_emp.
lr_emp-pernr = '00000008'.
append lr_emp to li_emp.
end-of-selection.
Function module for ALV grid display
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = 'X'
i_callback_program = lc_rep
is_layout = gr_layout_bck
it_fieldcat = li_field
i_save = 'A'
is_variant = gr_save
it_events = gi_events
TABLES
t_outtab = li_emp[]
EXCEPTIONS
program_error = 1
others = 2.
if sy-subrc <> 0.
clear gr_messages.
message e023 into gr_messages.
append gr_messages to gi_messages.
endif. -
Hello, How do I tell sql+ to spool output file from windows to Unix server?
Hello, How do I tell sql+ to spool output file from windows to Unix server?
I am new to SQL+ and just learned how to spool the file. But file is saved in my local windows enviroment and since it's 2GB in size...I want to spool it directly to another remote unix server.
Pls answer in detail... I have been to most of the thread and didn't see relevant answer to above question.
Am I suppose to develope some script which FTP the spool file directly to the server I want to
or
i Have to use UTL_FILE Package ?
Thanks for replyYou may not be able to...
SQL*Plus can only spool to the local machine. If you have mapped a directory on the Unix server from your Windows machine, you can specify that directory in your SPOOL command.
You could telnet to the Unix server, run SQL*Plus there, and spool the file to a local (Unix) directory.
If the Unix server is also the Oracle database server, you could use the UTL_FILE package rather than using SQL*Plus to spool a file.
If the Unix server is also an FTP server, you could also FTP the file from your local machine to the server.
Of course, I would tend to re-examine a requirement to regularly generate a 2 GB text file. It seems likely that there is a better way...
Justin -
How to export spool file into HTML file
Hi,
I have one Oracle procedure which meets our business requirement. I am keeping the output data into a log file and I am sharing that log file to the users.
Sample Code:
spool path\logile.log
declare
begin
dbms_output.Put_line('output will come here');
end;
Now I want to spool the same output data into a HTML file and need to share with the users.
Can any one please guide me, how to export our spool data into HTML format?
Thanks in advance.Hello 909127,
welcome to the forum.
This is the forum for the tool Oracle Reports, not a general forum for reporting. Your question might be better posted in {forum:id=75} or {forum:id=144}.
Nevertheless you need to give us more information, how your output looks like now and what you expect in HTML.
Regards
Marcus -
We are currently scheduling some standard reports in jobs. We would like to convert the spool output to PDF. Is there a way to parameterize the network location such that I can use the same PDF print driver to print to different locations specified in the print specifications in the job ? Is there such a PDF print driver for Windows which would allow me to pass the print location instead of a pop-up ?
Thanks
SridharHi,
Use the FM convert_otfspooljob_2_pdf
see this link for example Re: Download in PDF format
"Do not use CONVERT_ABAPSPOOLJOB_2_PDF for script or Smartforms
Prabhudas -
Print priview and spool output are different
Hi Friends,
i am facing a problem......for a output type (script realted)
when i am giving print priview for per a PO .. in this priview
2 tax values are showing right.
But when i am generating SPOOL in this that 2 tax values are Showing WRONG..
why different is coming in SPOOL..compare to Print Priview??
anybody explain..
regards,make this setting change:
in SPAD > In the menu Settings -> Spool System
In the others tab check the first check box in the Output Controller block, SAVE and exit
Maybe you are looking for
-
Getting SLiM to restart after ctrl-alt-backspace
I recently installed SLiM (Simple Login Manager) and it's quite nice. My only problem with it is that if I do a ctrl-alt-backspace at the log-in prompt it will drop me into text-mode log-in without restarting X or SLiM. Can it be configured to respaw
-
Getting rid of extra white space/margins on the left & right
Hi. I have two problems. 1.) When I create a Muse template at 1024 px wide, the document creates extra margins of about 150-200 pixels on the left and right. No matter what I do, I cannot get rid of this. I have set margins to "0" as well. I need the
-
Quark Xpress, Photoshop & Illustrator - Major Issues
I have recently loaded Leopard and ever since i have, Quark Xpress 7.3.1, Photoshop CS2, and Illustrator CS2. I have had issues with all of these programs closing unexpectedly and the only way to get them to open again is by restarting! this is very
-
CDs distributed on Developer's Day
Hello, I attended last developer day at Oracle Conference Center. There I got free CDs distributed (Jdeveloper 10g, and database 10g). Unfortunately I lost those CDs. I am curious whether I can get another set of CDs. I am ready to pay shipping cost.
-
Finding multiple occurences of a char in a string
So I am trying to make a check to see if there is more than one comma in an entry such as the following. "Johnson, Mr. Derrik J." I figured out that to make sure it has a comma can be... if (stringHolder[1].indexOf(",") > 0 == false) System.out.print