PDF File as Attachment thru Shell Script
Hello there,
there is a requirement that we need to send the output(PDF format) of an RDF as an attachment to the concerned users. I have taken one Main Concurrent program from which i am submitting another concurrent program for the RDF. Once the output is generated into its respective path, i am passing that path to the UNIX HOst Concurrent program (which is also submitted from the main Concurrent program after the report's one).
HOst Concurrent program is picking the file (for eg o435678.out) and sending that output to the users email's inbox as text (in unreadable format though) but not as a PDF attachment. I want to know anyway out there that the file be sent as PDF attachment. what else need to be done either in shell program or somewhere else. Plz let me know
Your help appreciated
Thank you
What is the application release? OS?
HOst Concurrent program is picking the file (for eg o435678.out) and sending that output to the users email's inbox as text (in unreadable format though) but not as a PDF attachment. I want to know anyway out there that the file be sent as PDF attachment. what else need to be done either in shell program or somewhere else. Plz let me know What is the extension of the attached file?
Can you open the file if you change the extension to PDF? If yes, just rename the extension to PDF and try again.
Thanks,
Hussein
Similar Messages
-
Not able to send pdf file as attachment in my apple mail.
Hi, I was easily able to attach pdf files to my apple mail. infact I could just open a pdf file and then send it as attachment in the email earlier. but after downloading and upgrading to os X Mountain lion, I am neither being able to attach and send pdf files in my apple mail, nor can I send PDF file as an attachment.
Is there any issue with OS X Mountain Lion.
Issue 1. I compose Email , then click attach > Browse > select pdf file > click attach > it shows in my Email body either as an icon or as first page of the pdf document > I send it. >>> But when the receipient opens the Email, that pdf attachment is missing. In fact When I put a cc to my self and I open the Email, the attachment is mssing in the incoming E amil.
Issue 2. I open the PDF document > Click on File > send as attachment in E-Mail > on right, a menu appears where I select the File and click attach> I get a message
The SendMail doesnot know how to talk to your default mail client. Please select a different mail application to use. Attaching a screen shot.
I never had these issues earlier with my Lion OS . but since the time I have upgraded to mountain Lion OS, I am having these issues.
Are these the Mountain Lion issues, how to fix these please.I believe, the software team forgot to put a button for send or share as an attachment to preview.
-
IPAD3/IPAD2 :PDF files/ attachments sent in an email displayed inline ( embedded within the main email) in the message text on both my Ipad2 and Ipad three, however the same email displayed the PDF File icons/ attachment on both my Iphone and a friend’s PC. How do i get both my IPAD devices to display the PDF icons/attachments? Bearing in mind if i open the same email over the internet the PDF Icons/attachments display OK!
Has anyone come across this? Your advice/help would be most appreciatedThis happens to me all the time.
If is a one page PDF it seems as though it comes over already open and inline in the body of the email. Multiple page PDF files show as the PDF icon.
I can't find any official documentation of this - other than based on my own experience with PDF attachments in my various email accounts.
Message was edited by: Demo -
I have iphone6 and I cant open PDF files which attached to my email
Dear All
I have iPhone and I cant open PDF files which attached to my email
Regardsthanks for the suggestions weather15 - the firefox help site you directed me to explains what ought to happen but i cant make it work. I shut my firefox browser on my new machine and attach the hard drive from my old machine. I can explore the contents of that drive but when i search it for the suggested folder " %APPDATA%\Mozilla\Firefox\Profiles\" nothing is found. when i try and open firefox from the old drive, the browser opens that is the new version that i have on my new computer with no saved bookmarks! Am I doing everything right?
-
I have 6 pdf files to attach to an email. I don't want them all to open in the body of the email. How do I just attach the pdf file?
Never mind. Found the solution here: Re: How to mail PDF file as an icon
-
Error while sendinf pdf file as attachment
hi all.,
am trying to send the pdf file of a smartform as attachment thru mail .. but its getting failed am getting error (sy-subrc = 6 ) after calling the fm so_new_document_att_send_api1 .. pls. suggest the possible cause of errors.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = lv_bin_filesize
TABLES
otf = ls_job_output_info-otfdata
doctab_archive = it_docs
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*--- Get filename to store DYNAMIC
IF p_lsdir IS NOT INITIAL.
MOVE p_lsdir TO lv_path.
ENDIF.
CONDENSE wa_kna1-kunnr.
CONCATENATE 'SOA' wa_kna1-kunnr '.pdf' INTO lv_name.
CONCATENATE lv_path lv_name INTO lv_fullpath.
break ibm_prasad.
CLEAR wa_buffer.
LOOP AT it_lines.
TRANSLATE it_lines USING '~'.
CONCATENATE wa_buffer it_lines INTO wa_buffer.
ENDLOOP.
TRANSLATE wa_buffer USING '~'.
DO.
i_record = wa_buffer.
APPEND i_record.
SHIFT wa_buffer LEFT BY 255 PLACES.
IF wa_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
REFRESH: i_reclist,
i_objtxt,
i_objbin,
i_objpack.
CLEAR wa_objhead.
i_objbin[] = i_record[].
i_objtxt = 'SOA test with pdf-Attachment!'.
APPEND i_objtxt.
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
READ TABLE i_objtxt INDEX v_lines_txt.
wa_doc_chng-obj_name = 'SOA'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'SOA'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
* Maint Text
CLEAR i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
* Attachment (pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
DESCRIBE TABLE i_objbin LINES v_lines_bin.
READ TABLE i_objbin INDEX v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'SOA Eail'.
i_objpack-obj_descr = 'test'.
APPEND i_objpack.
CLEAR i_reclist.
i_reclist-receiver = <mail id>
i_reclist-rec_type = 'U'.
APPEND i_reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
thanks
sureshu need to use this SO_NEW_DOCUMENT_ATT_SEND_API1
check this code tutorial on how to add pdf file as an attachment
u need to modify the code to read the pdf from directory then rest of code is same
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mailsendthroughoutputcontrols
кu03B1ятu03B9к
Edited by: kartik tarla on Mar 9, 2009 7:31 PM -
Install 3rd party PDF iFilter for index PDF file as attachment in e-mail (msg)
I have called Microsoft Permium Support, base on the reply, SharePoint 2013 does not support to index a PDF file attachment in E-mail (msg) except 3rd party iFilter installed. And they finally told me how to edit Windows Registry for install the Adobe iFilter.
But, the Adobe iFilter is too weak to call large PDF files. So, I would like to install and try the Foxit PDF iFilter, but I cannot find an installation guide for this 3rd party ifilter with SharePoint 2013.
Does anyone here have the experience for Foxit PDF iFilter with SharePoint 2013 can help me?
I am not sure it is bug or feature in SharePoint 2013, but in case I still have to install 3rd party iFilter for index PDF file. I have no idea what is the out of box pdf file indexing support for.You ca plan to use Foxit.
steps are nearly the same which we use in sharepoint 2013
1. We need to update registry for pdf . Registry value is {987f8d1a-26e6-4554-b007-6b20e2680632}
2. we need to install the foxit ifilter
Here are steps for same
http://support.microsoft.com/kb/2293357
3. run below command:
net stop spsearch4
net start spsearch4
net stop osearch14
net start osearch14
Check below:
http://bjarnegram.wordpress.com/2011/07/13/installing-foxit-pdf-ifilter-on-sharepoint-server-2010/ -
In Adobe froms - Sending PDF file as Attachment via email
I have to develop a <b>PDF form</b> and one more requirement; I have to change the mail Content (body) and the Subject line which should have attached PDF file.The (Transaction Code VA21) Has the sending the Email part. My Requirement is to <b>Change the Content (body) and the Subject</b>.
Requirement;
When customer request for the quote, quote document is created in SAP (Transaction Code VA21). Promised Price, quantity, date is communicated to customer via quote output. Customer may decide to place firm order with reference to quote.
So this form (PDF file and send via email) is used to communicate the AMAT quote to customer. The PDF file will be as a attachment in the mail. With change subject line, and content of the mail (Thanks for the Quote, Please dont reply to this mail). It also consists of applicable terms & condition of the quote.
Is it possible to handle the Content and the Subject of the mail in Program or Form layout (SFP). or it's Enhancement?
How to go about it? I tried a lot. At last am contacting you. Please.............. Let me know. Very urgent.Point will be given sooon. Tnx a lot.....
#SinivasHi,
Yes But you can use ADOBE FORMS for that... Check this link for presentation...
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0c139d3-3eae-2910-01a1-d253f2587b0e?prtmode=navigate
Check this BLOG for sending Email through ABAP..
Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface
One more thing... You can download your data to a PDF file and send that PDF file via program...
Search this Forum for more answers.. you would get plenty out of it...
Check this thread for further information..
Sending mail with 2 attachments
Hope this would help you.
Any queries plz revert back
Good luck
Narin -
How to Sender PDF file as attachment in Payload?
Hi Experts,
After I done some of PI scenarios, I'm stuck with one of my requirement... In requirement, "Web service" will send request to "SAP ECC 6" in order to get PO document print out in PDF file by call smartform or any form printing as usual.
In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
I try to search and read some of document and blog, some said I can attach file as Payload attachment, but no clear solution or guide to do so.
Here is example blog that I found, I really useful
/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
Please suggest me in my case,
Thanks in advance...
Cheers,
TerryHi,
>>In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
as per my blog you can attach PDF to a message only if you use abap proxy on ECC and not RFC
the code is just copy and paste from my blog:
/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
so there is nothing spectacular there
Regards,
Michal Krawczyk -
Sending PDF file as Attachment
Hello Guys,
My requirement is to send an PDF attachment which could have content in any of four languages( English,spanish,German or french).
I am planning to use Function Module SO_NEW_DOCUMENT_SEND_API1 to send Email.
Please let me know if it is possible to achieve this without using smartforms.
If yes, how ?
if no, how to achieve this using smartform.
Appreciate your help in advance.
Regards,
HemaHi,
Yes But you can use ADOBE FORMS for that... Check this link for presentation...
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0c139d3-3eae-2910-01a1-d253f2587b0e?prtmode=navigate
Check this BLOG for sending Email through ABAP..
Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface
One more thing... You can download your data to a PDF file and send that PDF file via program...
Search this Forum for more answers.. you would get plenty out of it...
Check this thread for further information..
Sending mail with 2 attachments
Hope this would help you.
Any queries plz revert back
Good luck
Narin -
Adding PDF file as attachment to SOAP message
Hi,
I want to add a pdf file from the hard disk to a soap message as attachment. I have the following code:
// CREATE MESSAGE
SOAPMessage msg= fac.createMessage();
SOAPEnvelope nEnv= msg.getSOAPPart().getEnvelope();
//READ FILE FROM THE HD
String pdfFileName = "somepdffile.pdf";
FileReader fr = new FileReader(pdfFileName);
BufferedReader buffr = new BufferedReader(fr);
String sPdf="";
String line = testB.readLine();
while(line!=null)
sPdf += line;
line = testB.readLine();
//WRITE THE FILE TO BYTE ARRAY AND THEN TO STREAM
byte[] pdfData = sPdf.getBytes();
ByteArrayInputStream stream = new ByteArrayInputStream(pdfData);
//CREATE ATTACHMENT ADD THE STREAM AS CONTENT
AttachmentPart attPDF = msg.createAttachmentPart();
attPDF.setContent(stream, "application/pdf");
msg.addAttachmentPart(attPDF);
return msg;
I GET THE NEXT EXCEPTION:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/pdf
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851)
at javax.activation.DataHandler.writeTo(DataHandler.java:305)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1089)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:635)
at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:233)
at com.sun.xml.messaging.soap.MessageImpl.saveChanges(MessageImpl.java:356)
at javax.xml.messaging.JAXMServlet.doPost(JAXMServlet.java:192)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)
javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.messaging.JAXMException: Bad response: (500, Internal Server Error)
at com.sun.xml.messaging.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:93)
at mp.soap.SendingServlet.getPolisPrint(SendingServlet.java:320)
at mp.soap.SendingServlet.doPost(SendingServlet.java:234)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)
CAN ANYONE TELL ME WHAT THE SOLUTION IS ?
PLEASE HELP ME !!!
BiroltestB == buffr ! Sorry.
IT IS STILL NOT WORKING !!!!!
// CREATE MESSAGE
SOAPMessage msg= fac.createMessage();
SOAPEnvelope nEnv= msg.getSOAPPart().getEnvelope();
//READ FILE FROM THE HD
String pdfFileName = "somepdffile.pdf";
FileReader fr = new FileReader(pdfFileName);
BufferedReader buffr = new BufferedReader(fr);
String sPdf="";
String line = buffr.readLine();
while(line!=null)
sPdf += line;
line = buffr.readLine();
//WRITE THE FILE TO BYTE ARRAY AND THEN TO STREAM
byte[] pdfData = sPdf.getBytes();
ByteArrayInputStream stream = new ByteArrayInputStream(pdfData);
//CREATE ATTACHMENT ADD THE STREAM AS CONTENT
AttachmentPart attPDF = msg.createAttachmentPart();
attPDF.setContent(stream, "application/pdf");
msg.addAttachmentPart(attPDF);
return msg; -
.pdf file changed into .tmp when trying to send pdf file as attachment
Dears,
A few days now, .pdf files are exported as .tmp files if we try to send them as attachment directly from the adobe reader plug-in in internet explorer 8.
Unfortunatly Outlook interprets .tmp files as harmfull, so we are no longer able to send pdf files directly.
(screenshot in attachment)
Is there any chance we can configure this so, pdf files are exported as .pdf instead of .tmp
More details:
OS : Win XP SP3
browser : ie 8
plug in : Adobe PDF Link Helper (not sure this is the one that provides us the pdf reader functionallity dough)I cannot reproduce that (Adobe Reader 11.0.3, IE8, Win XP-SP3). In fact, I cannot even see the Attach to Email option, but the file name is correct.
-
Help!!!
I just puchased the latest Adobe Acrobat XI Standard.
I put in the Serial Key number but my computer tells me that a qualifying product could not be found on my computer so I can't use the adobe product. So now I can't open any files or attach pdf files onto emails without this message coming up. I've un-installed the "Adobe Acrobat XI Standard twice! with no luck.
I need it sorted ASAP as I'm trying to work! Any suggestions?DotBellaParis if you are being asked for a qualifying product then it would appear you purchased an upgrade to Acrobat XI Standard. You should have the opportunity to enter the serial number for your previous purchase of Acrobat. You can find information on how to locate your previous serial numbers at http://forums.adobe.com/message/3987968#3987968?promoid=KBHJW.
If you did not intend to purchase an upgrade then I would recommend submitting a return request. You can find more details on submitting a return at Return, cancel, or exchange an Adobe order - http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html. Once you have returned the upgrade you can then purchase the full version which will not ask you for a qualifying product or serial number. -
How to write CLOB parameter in a file or XML using shell script?
I executed a oracle stored procedure using shell script. How can i get the OUT parameter of the procedure(CLOB) and write it in a file or XML in UNIX environment using shell script?
Edit/Delete MessageSQL> var c clob
SQL>
SQL> begin
2 select
3 DBMS_XMLGEN.getXML(
4 'select rownum, object_type, object_name from user_objects where rownum <= 5'
5 ) into :c
6 from dual;
7 end;
8 /
PL/SQL procedure successfully completed.
SQL>
SQL> set long 999999
SQL> set heading off
SQL> set pages 0
SQL> set feedback off
SQL> set termout off
SQL> set trimspool on
// following in the script is not echo'ed to screen
set echo off
spool /tmp/x.xml
select :c from dual;
spool off
SQL>
SQL> --// file size
SQL> !ls -l /tmp/x.xml
-rw-rw-r-- 1 billy billy 583 2011-12-22 13:35 /tmp/x.xml
SQL> --// file content
SQL> !cat /tmp/x.xml
<?xml version="1.0"?>
<ROWSET>
<ROW>
<ROWNUM>1</ROWNUM>
<OBJECT_TYPE>TABLE</OBJECT_TYPE>
<OBJECT_NAME>BONUS</OBJECT_NAME>
</ROW>
<ROW>
<ROWNUM>2</ROWNUM>
<OBJECT_TYPE>PROCEDURE</OBJECT_TYPE>
<OBJECT_NAME>CLOSEREFCURSOR</OBJECT_NAME>
</ROW>
<ROW>
<ROWNUM>3</ROWNUM>
<OBJECT_TYPE>TABLE</OBJECT_TYPE>
<OBJECT_NAME>DEPT</OBJECT_NAME>
</ROW>
<ROW>
<ROWNUM>4</ROWNUM>
<OBJECT_TYPE>TABLE</OBJECT_TYPE>
<OBJECT_NAME>EMP</OBJECT_NAME>
</ROW>
<ROW>
<ROWNUM>5</ROWNUM>
<OBJECT_TYPE>TABLE</OBJECT_TYPE>
<OBJECT_NAME>EMPTAB</OBJECT_NAME>
</ROW>
</ROWSET>
SQL> -
FTP log file generation failed in shell script
Hi ALL,
I am doing FTP file transfer in shell script and able to FTP the files in to corresponding directory , But when i am trying to check the FTP status through the log files then its giving problem . please check the below code.
for file in $FILENAME1
do
echo "FTP File......$file"
echo 'FTP the file to AR1 down stream system'
ret_val=`ftp -n> $file.log <<E
#ret_val=`ftp -n << !
open $ar1_server
user $ar1_uname $ar1_pwd
hash
verbose
cd /var/tmp
put $file
bye
E`
if [ -f $DATA_OUT/$file.log ]
then
grep -i "Transfer complete." $DATA_OUT/$file.log
if [ $? -eq 0 ]; then
#mv ${file.log} ${DATA_OUT}/../archive/$file.log.log_`date +"%m%d%y%H%M%S"`
echo 'Log file archived to archive directory'
#mv $file ${DATA_OUT}/../archive/$FILENAME1.log_`date +"%m%d%y%H%M%S"`
echo 'Data file archived to archived directory'
else
echo 'FTP process is not successful'
fi
else
echo 'log file generation failed'
fi
its giving syntax error end of file not giving the exact line number , please help me on thsi
Regards
DebThanks for ur reply
Actually i did a mistake in the code i wrote the following piece of code below
ret_val=`ftp -n> $file.log <<E
#ret_val=`ftp -n << !
so after the tilde symbol it as again taking the '# ' as a special character so it was giving error, so i removed the second line now its working fine.
Maybe you are looking for
-
Mac keeps crashing whenever using Office for Mac (possible graphic card problem)
Mid 2010 15 inch MacBook Pro. Played out perfectly for the first two years. As soon as the warranty expired, things went sideways. Do not know why but whenever I try to use Office 2011 for Mac the entire mac freezes for a millisecond and then crashes
-
Removing advanced ntfs permissions in powershell
Hi, I am trying to remove special permissions of a folder I found a technet article that helps me understand the concept but couldn't get it to work for special permissions. I am trying to remove create files special permissions for c:\temp $colRigh
-
Styles and Cascading Style Sheets ??
We have existing many procedures in RH5X that we have created over the past two years. Our company has designed a new .css that contains new styles. Is there anyway to easily and quickly apply these new styles to our existing topics and projects?
-
Hi ; I'm work in simple web application and MySQL DB, and create managed-bean that hold data from DB (session and request) and I need some ideas my first idea : I make class and all method in this class public static that method check if the array em
-
Popup business card link in top contributors doesn't work in Chrome browser
Hello, it's probably the lowest of low priorities, but I've noticed that the popup which shows a user's business card when you drill down in the top contributors list doesn't seem to work in Google Chrome browser. Works nicely in IE. Just something t