Failed output to a text file

Please help lookat the code, I am going to create a index file and put strings in it.
However it is an empty file, why?
Thanks in advance!
import java.io.*;
import java.util.regex.*;
public class Parse
        public static void main(String args[])
            FileDownload d = new FileDownload();
            d.download(args[0]);
            String f = d.getFileName();
                if (args.length == 1)
                        try
                               BufferedReader br = new
                                        BufferedReader(new FileReader(f));
                                String line;
                                System.out.println(args[0]);
                                String SearchTitle = args[0];
                                System.out.println("The Search results are Saved in the Directory "+SearchTitle);
                                String s1 = "<a href=\"/w/index.php?title="+SearchTitle+"&oldid=";
                                while ((line=br.readLine())!=null){
     //searching for interesting occurences and performing respective actions
                                int i = line.indexOf(s1);
                                if(i != -1) // a result of -1 indicates the substring wasn't found
                                     File file = new File(args[0],"index.txt");
                                     FileWriter outFile = new FileWriter(file);
                                     BufferedWriter out1 = new BufferedWriter(outFile);
                                     Pattern p = Pattern.compile("oldid=([^\"]*)\"");
                                     Matcher m = p.matcher(line);
                                     if (m.find())
                                           String s2 = m.group(1);
                                           String s3 = "http://en.wikipedia.org/w/index.php?title="+SearchTitle+"&oldid="+s2;
                                           out1.write(s2); //here, failed to write into the file
                                           out1.newLine();                                        
                        catch (Exception e)
                    System.err.println("File input error");
                                e.printStackTrace ();
                else
                                System.out.println("Invalid parameters, please check the argument");
}

I didn't actually read your code, but I don't see a call to close() - so that's one possibility. I didn't see any debug either, so if i == 1 you don't write anything either, so that's a possibility. And if m.find() never returns true you don't write anything, so there's another.
Good luck
Lee
PS: I now see your comment - did you get an exception? How do you know you got to that line of code?

Similar Messages

  • Not able to save report output in a text file and RTF file

    I am using Oracle Developer6.0 . I am facing problem with reports. I am invoking reports from form using run_product.
    1. I could not able to save the report in text file . Whenever i try to save the report output in a text file.It gives dump and application get closed.
    2. In RTF format , it execute the query which i have given at the design time while creating a report . But while running i am passing query either through lexical parameter or passing value of where criteria user parameters. It display the output for the specified value. But when i save this report output in rtf file . It execute design time query and save that in a rtf file.
    If any body is having any idea about it . Please let me ASAP . It is very urgent for me.
    Thanks in advance

    Try the following:
    Do not generate the report to .rep file, but rename/copy the .rdf file to .rep file and execute it.

  • Output to a text file in an applet...

    i can't figure out how to do output to a text file in an applet... i've gotten output in applications, but nto applets. if someone can give me a link to a site that explains this, i would be much appreciative.

    There is no easy way, since accessing Files with write permissions is a security issue. You can sign the JAR your applet is in, and use Security managers to try and get around it, but it is quite complicated I believe.
    Do a search for Security Signed Applets etc...

  • Outputting to a text file.

    Hey guys and gals,
    Im doing a program for work that is a form you type in, select save and it stores the data to a file. I have 2 problems. FIRST i need to know how to change the font. SECOND how do i put in tabs, returns using out.write(...);
    The goal is to output a form to a text file that can be saved, printed. Right now it all runs together in the .txt or .doc file that it makes.
    thanks bunches
    package hrform;
    // imports
    import java.awt.Font;
    import java.awt.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.event.*;
    import java.awt.Font;
    public class form extends JFrame implements ActionListener
    //declare text boxes, buttons, radiobuttons
    private JRadioButton jrbThree, jrbSix;
    //private ButtonGroup btg = new ButtonGroup();
    private JButton jbtSave;
    private JTextField jtfEmployee, jtfDateofhire;
    private JTextField jtfDatecompleted, jtfJobtitle;
    private JFileChooser jFileChooser = new JFileChooser();
    private JTextField jtfCurrentpay, jtfDateofincrease, jtfAmount;
    private JTextField jtfAcceptible, jtfExemplary, jtfImprovement, jtfDependability;
    private JTextField jtfPersonality, jtfGoals;
    /** Main Method*/
    public static void main(String [] args)
    form frame = new form();
    //frame.setDefault(closeOperation(JFrame.EXIT_ON_CLOSE));
    frame.setSize(800,580);
    frame.setVisible(true);
    /**Default Constructor*/
    public form()
    Color defaultColor = Color.red;
    setTitle("Employee Evaluation Form");
    JPanel p1 = new JPanel();
    p1.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
    setColor (Color.lightGray);
    p1.add(new JLabel("Employee Name:"));
    p1.add(jtfEmployee = new JTextField(11));
    p1.add(new JLabel("Date of Hire:"));
    p1.add(jtfDateofhire = new JTextField(10));
    p1.add(new JLabel("Date Completed by Employee"));
    p1.add(jtfDatecompleted = new JTextField(10));
    // panel p2 for radio buttons
    JPanel p2 = new JPanel();
    p2.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
    p2.add(new JLabel("Job Title: "));
    p2.add(jtfJobtitle = new JTextField(20));
    p2.add(new JLabel("Current Rate of Pay"));
    p2.add(jtfCurrentpay = new JTextField(10));
    p2.add(new JLabel("Date of Last Increase: "));
    p2.add(jtfDateofincrease = new JTextField(8));
    p2.add(new JLabel("Amount of Last Increase: "));
    p2.add(jtfAmount = new JTextField(70));
    p2.add(new JLabel("Has displayed an acceptable level of performance these areas: "));
    p2.add(jtfAcceptible = new JTextField(70));
    p2.add(new JLabel("Has shown EXEMPLARY performace in these areas: "));
    p2.add(jtfExemplary = new JTextField(70));
    p2.add(new JLabel("Areas for Improvement: "));
    p2.add(jtfImprovement = new JTextField(70));
    p2.add(new JLabel("Dependability(Focus on attendance, punctuality, and attentiveness): "));
    p2.add(jtfDependability = new JTextField(70));
    p2.add(new JLabel("Personality(Focus on ability to work for and with others): "));
    p2.add(jtfPersonality = new JTextField(70));
    p2.add(new JLabel("GOALS FOR NEXT QUARTER: "));
    p2.add(jtfGoals = new JTextField(70));
    p2.add(jbtSave = new JButton());
    jbtSave.setText("Save");
    //set default directory
    jFileChooser.setCurrentDirectory(new File("F:WPDOCS/Personne"));
    //Set flowlayout for the fram
    getContentPane().setLayout(new BorderLayout());
    getContentPane().add(p1, BorderLayout.NORTH);
    getContentPane().add(p2, BorderLayout.CENTER);
    // Register Listeners
    jbtSave.addActionListener(this);
    /** Handle event */
    public void actionPerformed(ActionEvent e)
    String actionCommand= e.getActionCommand();
    if (e.getSource() instanceof JButton)
    if ("Save".equals(actionCommand))
    Save();
    /** Save file*/
    private void Save()
    if(jFileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION)
    Save(jFileChooser.getSelectedFile());
    private void Save(File file)
    try
    Font helv = new Font("Helvetica", Font.BOLD, 16);
    Font courier = new Font("Courier", Font.BOLD, 24);
    Color defaultColor = Color.cyan;
    BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
    out.write(new JLabel(" ").getText().getBytes());
    //out.setFont("SansSerif",Font.BOLD,14);
    out.write(new JLabel("TMC Orthopedic - EMPLOYEE PERFORMANCE EVALUATION").getText().getBytes());
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("Employee Name: ").getText().getBytes());
    byte[] b = (jtfEmployee.getText()).getBytes();
    out.write(b,0,b.length);
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("Date of Hire: ").getText().getBytes());
    out.write(new JLabel().getText().getBytes());
    byte[] c = (jtfDateofhire.getText()).getBytes();
    out.write(c,0,c.length);
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("Date Completed by Employee: ").getText().getBytes());
    //out.writeChars(\n);
    byte[] d = (jtfDatecompleted.getText().getBytes());
    out.write(d,0,d.length);
    byte[] e = (jtfJobtitle.getText().getBytes());
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("Job Title: ").getText().getBytes());
    out.write(e,0,e.length);
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("Current Pay: ").getText().getBytes());
    byte[] f = (jtfCurrentpay.getText().getBytes());
    out.write(f,0,f.length);
    out.write(new JLabel(" ").getText().getBytes());
    byte[] g = (jtfDateofincrease.getText().getBytes());
    out.write(new JLabel("Date of Last Increase: ").getText().getBytes());
    out.write(g,0,g.length);
    out.write(new JLabel(" ").getText().getBytes());
    byte[] h = (jtfAmount.getText().getBytes());
    out.write(new JLabel("Amount Of Last Increase").getText().getBytes());
    out.write(h,0,h.length);
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("Has displayed an acceptable level of performance in these areas: ").getText().getBytes());
    byte[] i = jtfAcceptible.getText().getBytes();
    out.write(i,0,i.length);
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("Has displayed an exemplary level of performance in the following areas: ").getText().getBytes());
    byte[] j = jtfExemplary.getText().getBytes();
    out.write(j,0,j.length);
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("Areas for improvement").getText().getBytes());
    byte[] k = jtfImprovement.getText().getBytes();
    out.write(k,0,k.length);
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("Dependability(Focus on attendance, punctuality, and attentiveness): ").getText().getBytes());
    byte[] l = jtfDependability.getText().getBytes();
    out.write(l,0,l.length);
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("Personality (Forcus on ability to work for and with others): ").getText().getBytes());
    byte[] m = jtfPersonality.getText().getBytes();
    out.write(m,0,m.length);
    out.write(new JLabel(" ").getText().getBytes());
    out.write(new JLabel("GOALS FOR NEXT QUARTER: ").getText().getBytes());
    byte[] n = jtfGoals.getText().getBytes();
    out.write(n,0,n.length);
    out.close();
    catch(IOException ex)

    I tried both of these and i get an error.
    "form.java": Error #: 300 : method write(java.lang.String) not found in class java.io.BufferedOutputStream at line 136, column 15
    Do i need to include something else???
    Thanks
    To insert a tab, use out.write("\t"). To insert a newline (crossplatform), use out.write(System.getProperty("line.separator")).
    HTH!
    :o)

  • Problem with alv output export to text file

    hi experts,
    when iam exporting alv output to text file,
    some data is missing in text file.say for example sold-to-party value is 1155027 in alv out put,but in text file it is showeing only 115502 ,
    the last digit is missing,
    can anyone help urgent!!!!!

    and when you export it to excel?
    from here you could save it as text file too...
    A.

  • Saving SQL+ output to a text file

    I have to use SQL+ on one of my databases. No way around it. So I will write my queries, run them, check the output, tweak them and run again as necessary. So I might start with
    SELECT
    ename,
    job
    FROM
    emp;Once I know it is working correctly, I wrap it in a procedure so I can get the data in a text file:
    SET TRIM ON
    SET PAGESIZE 2000
    SET SERVEROUTPUT ON SIZE unlimited
    EXEC DBMS_OUTPUT.ENABLE(null)
    SPOOL c:\mySQL\out.txt
    BEGIN
    DECLARE
    CURSOR c_cur IS
    SELECT
    ename,
    job
    FROM
    emp;
    BEGIN
    DBMS_OUTPUT.PUT_LINE(
    'NAME|JOB|'
    FOR r_cur IN c_cur LOOP
    DBMS_OUTPUT.PUT_LINE(
    r_cur.ename||'|'||
    r_cur.job
    END LOOP;
    END;
    END;
    /Then I import this into Excel as delimited data on the pipe |
    which works great until I decide that I actually do need one more column. Then I have make changes to the SQL, and two more changes in the output portion (one for the heading, and one for the LOOP)
    I was wondering if anyone had written a cool procedure that I could run ANY SQL through, and it would automatically know my column names write the headings and then loop through the data automatically.
    I'm not tied to using the exact procedure I described above. The key is, I am looking for a general procedure that I can run any script through, and it will handle the output for me, without additional modification.

    MrGibbage wrote:
    I have to use SQL+ on one of my databases. No way around it. So I will write my queries, run them, check the output, tweak them and run again as necessary. So I might start with
    SELECT
    ename,
    job
    FROM
    emp;Once I know it is working correctly, I wrap it in a procedure so I can get the data in a text file:
    SET TRIM ON
    SET PAGESIZE 2000
    SET SERVEROUTPUT ON SIZE unlimited
    EXEC DBMS_OUTPUT.ENABLE(null)
    SPOOL c:\mySQL\out.txt
    BEGIN
    DECLARE
    CURSOR c_cur IS
    SELECT
    ename,
    job
    FROM
    emp;
    BEGIN
    DBMS_OUTPUT.PUT_LINE(
    'NAME|JOB|'
    FOR r_cur IN c_cur LOOP
    DBMS_OUTPUT.PUT_LINE(
    r_cur.ename||'|'||
    r_cur.job
    END LOOP;
    END;
    END;
    /Then I import this into Excel as delimited data on the pipe |
    which works great until I decide that I actually do need one more column. Then I have make changes to the SQL, and two more changes in the output portion (one for the heading, and one for the LOOP)
    I was wondering if anyone had written a cool procedure that I could run ANY SQL through, and it would automatically know my column names write the headings and then loop through the data automatically.
    I'm not tied to using the exact procedure I described above. The key is, I am looking for a general procedure that I can run any script through, and it will handle the output for me, without additional modification.Why are you bothering with the PL/sql procedure at all? Why not just
    SET TRIM ON
    SET PAGESIZE 2000
    SPOOL c:\mySQL\out.txt
    SELECT
    ename,
    job
    FROM
    emp;
    spool off

  • Fail to write the text file

    hi,
    I met a problem when I try to store data to text file. That's the description:
    - To read some objects from the binary file
    - To update object state, do some operations
    - To output some properties of the object to text format file.
    That's a part of my code:
    {color:#0000ff}
    //------ begin ---------//
    // ".cluto" is a binary file where store the number of objects as the first object and a set of docVector object
    File cluto = new File (config3.getOutputPath (), config3.getOutputFileType () + ".cluto");
    ObjectInputStream reader1 = new ObjectInputStream (new BufferedInputStream (new FileInputStream (cluto), BUFFERSIZE));
    // output text file definition
    File rlabel = new File (config3.getOutputPath (), config3.getOutputFileType () + ".rlabel");
    BufferedWriter rlabelWriter = new BufferedWriter (new FileWriter (rlabel), BUFFERSIZE);
    // get the first object in ".cluto", the number of objects in the input binary file
    Integer vectorNumber = (Integer)reader1.readObject ();
    // temporal variable
    docVector tVector;
    for(int i=0; i<vectorNumber.intValue (); i++) {
    tVector = (docVector)reader1.readObject ();
    tVector.dimsPruning ();
    tVector.updateDimsWeight (config1.getWEIGHT_TYPE ());
    rlabelWriter.write (tVector.vectorLableToString ()); // tVector.vectorLabelToString() return a string!
    reader1.close ();
    rlabelWriter.flush ();
    rlabelWriter.close ();
    //------ end --------//
    {color}
    The program works and creates the file ".rlabel", but a binary file instead of text file! Anyone have ideas about this problem?
    Thanks

    Sorry, I means ".rlabel".
    Good news, I fix the problem. In my old code, the I/O stream keeps always opened when I write huge data to the file (See "for" loop). And after the loop, I close the stream.
    Now, I open and close the stream in each loop. The problem is resolved.
    that's the new code:
    // this function is used to write a string to a file
    /* write a string to a file */
    public void writeStringToFile (String content, String fileName) {       
    BufferedWriter writer = null;
    try {
    writer = new BufferedWriter (new FileWriter (fileName, true));
    writer.write (content);
    writer.close ();
    } catch (IOException ex) {
    ex.printStackTrace ();
    String rlabel = "test.rlabel";
    for(int i=0; i<vectorNumber.intValue (); i++) {
    tVector = (docVector)reader1.readObject ();
    tVector.dimsPruning (prunedTerm);
    writeStringToFile (tVector.vectorLableToString (), rlabel);
    //------- end ----------//
    I don't know whether the open/close operations in a large loop cost a lot.
    Thanks

  • Report output in a text file

    Hello,
    I am using report 6i and I would like to have the output of my report in a file, such as text file.
    I tried with the systems parameters (DESNAME, DESTYPE ...) but it dosent work.
    Does someone could help me with that?
    Thankyou in advance.

    Hi,
    I had tried to do that before. When you write to a file oracle reports create a .lis file containing printer fonts, which is no good. What you can do is define a printer using ascii drivers and use that printer to write to a file inorder to get a text file.
    The other thing I did is used DDE techniques to write the report to .xls file. The online help on reports have good examples on how to do this.
    Hope this helps. Good Luck!

  • Formatting output to a text file (using FileWriter and PrintWriter)

    Hi Folks
    I am using the bit of code below to save output from a gui to a text file. The data is entered line by line in the form eg,
    "one two three four"
    "five six seven eight"
    I am also reloading this data back in to a TextArea in the GUI for viewing if required. The annoying thing that upon reloading, the data appears in one long line. The TextArea does not offer a line wrapping facilty (well I don't know how to impement it, it exist). Consequently, I would be quite grateful if somone could come come to my assistance. Any of these would graciously appreciated:
    1. Forcing the TextArea to word wrap
    2. Manually inserting some type of newline character at the end of the outbound
    text
    3. Or any other procedure you experts can dream up :-)
    Cheers
    public void actionPerformed(ActionEvent e) {
    if (e.getSource() == loadButton) {
    getFileDialog = new FileDialog(this,
    "Select or enter the name of the file you wish to write to.",
    FileDialog.LOAD);
    getFileDialog.setDirectory("C:\\Work\\java_tutorials");
    getFileDialog.show();
    fileName = getFileDialog.getFile();
    if(fileName == null) {
    return;
    directory = getNameBox.getDirectory();
    path = directory + fileName;
    fileConfirmation.setText(path);
    if (e.getSource() == saveButton ) {
    try{
    outputFile = new PrintWriter( new FileWriter(fileName, true), true);
    outputFile.print(inputTextArea.getText() );
    outputFile.close();
    catch (FileNotFoundException e1) {
    return;
    catch (NullPointerException e2) {
    return;
    catch (IOException e3) {     
    JOptionPane.showMessageDialog(null,
    "There was an error in opening this file!");
    System.exit(0);
    }

    'you can use "append()" method...
    ex.
    // some code here...
         inputTxtArea.append(data+"\n");  //<<-- you need to put '\n'
    // some code here...

  • Query Output Into a Text File

    Hello Experts,
    There is a situation where i need ur help.My query is :
    Can I export the output of more than one queries into a * Single Text File * ?
    Also can it be possible to automate these Queries Output to export into the Text File ??
    I also want this Text File Output to mail the end users by using the Process Chain. So is this possible to create a process chain for sending this Text File to the Users via mail ??
    Thanks In Advance
    Neha

    Hello Neha,
    Though i have been working with APDs since some time. But havent actually been involved in designing one. But you could find many documents for the APD on web. And as far as i know, you will need a program to save file from APD.
    I have a document which explains how you can use APD in  process chain. can forward you the same if you want.
    I am sorry as i wasnt of much help for you, as i havent worked on similar requirement before, but this thing just striked in my mind.
    Regards,
    Anuj

  • DLL is failing to read the text file on RTOS

    I have created a DLL using Fortran Microsoft Power STation 4.0.  The DLL reads data from text files.  A vi is created to call this dll.  This vi is working fine in winodows.  It is reading from the text files and manipulates.
    When this vi is donwloaded to RTOS Labview 7.1, it fails to read the file and the RT reboots.  The error message is "file not found (filename)".  The file is present is the current directory of DLL.
    Please assist me in solving this problem.  My email Id is: [email protected] or [email protected]

    Hello GTRE,
    It seems like something isn't letting you access that DLL.  Do you have the DLL moved onto the RT target?  What is your real-time target?  Does the DLL require access to other resources?  What specifically does the error message say?  Does it contain an error code?
    Answering these questions will allow us to narrow down the problem - thanks!
    Janell R | Applications Engineer

  • Output into a text file

    Hi all, i am trying to parse an xml doc from a url and the display the results in an text file, howver when i run the below code the Headers are coming up the the returned results are being displayed int the cmd prompt window, anyone have any ideas on how to display the results in a text file?
    import org.apache.xerces.parsers.DOMParser;
    import org.xml.sax.SAXException;
    import java.io.IOException;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.NamedNodeMap;
    import java.util.Properties;
    import java.io.*;
    public class IsbnSearch{
        public static void main(String args[]) throws IOException, SAXException{
            //Check out: http://www.rgagnon.com/javadetails/java-0085.html
            Properties systemSettings = System.getProperties();
            systemSettings.put("http.proxyHost", "staff-proxy.ul.ie");
            systemSettings.put("http.proxyPort", "8080");
            System.setProperties(systemSettings);
            FileOutputStream out; // declare a file output object
            PrintStream p ; // declare a print stream object
            String isbn;
            String size;
            BufferedReader reader;
            reader = new BufferedReader(new InputStreamReader(System.in));
            System.out.print("Please enter Isbn Number\n");
            try {
                 out = new FileOutputStream("myfile.xls");
                 p = new PrintStream( out );
                 isbn = reader.readLine();
            System.out.print("Please Choose the Level of Detail you require:\n");
            System.out.print("Small, Medium or Large\n");
                    size = reader.readLine();
            DOMParser parser = new DOMParser();
            parser.parse("http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&Version=2005-03-23&Operation=ItemLookup&ContentType=text%2Fxml&SubscriptionId=0525E2PQ81DD7ZTWTK82&ItemId="+isbn+"&IdType=ASIN&ResponseGroup="+size+"");
            Document dom = parser.getDocument();
            p.println("\nTitle:");
            getAttribute(dom, "Title");
            p.println("\nAuthor:");
            getAttribute(dom, "Author");
            p.println("\nImage:");
            getAttribute(dom, "SmallImage");
            p.println("\nISBN:");
            getAttribute(dom, "ISBN");
            p.println("\nBinding:");
            getAttribute(dom, "Binding");
            p.println("\nReview:");
            getAttribute(dom, "Content");
            p.println("\nDetail Website Please Visit =:");
            getAttribute(dom, "DetailPageURL");
            p.println("\nTime to process Request:");
            getAttribute(dom, "RequestProcessingTime");
            catch (IOException ioe) {
                 System.out.println("I/0 Exception Occurresd");
        private static void getAttribute(Document dom, String tagName)throws IOException {
                 NodeList ItemAttributes = dom.getElementsByTagName(tagName);
                    for(int i=0;i<ItemAttributes.getLength();i++){
                Node aNode = ItemAttributes.item(i);
                System.out.println(aNode.getFirstChild().getNodeValue());
                NamedNodeMap attributes = aNode.getAttributes();
                for (int a=0;a<attributes.getLength();a++){
                    Node theAttribute = attributes.item(a);
                    System.out.println(theAttribute.getNodeName() + "="+ theAttribute.getNodeValue());
    }

    I suppose you mean that the output of this line of codeSystem.out.println(theAttribute.getNodeName() + "="+ theAttribute.getNodeValue());is coming out on the console? Yup. That's what System.out is for. Let me point you at the Java I/O tutorial:
    http://java.sun.com/docs/books/tutorial/essential/io/index.html
    It explains how to write to a file.

  • How to resend the RMAN output to a text file

    Hi ,
    I am using RMAN for backup purpose.
    How should we send the output of RMAN to a text file.
    For Example If we issue the following command then how should we send the results of that command into a text file:
    RMAN> report obsolete device
    type 'sbt_tape';
    result:
    RMAN-03022: compiling command: report
    RMAN-06147: no obsolete backups found
    Any ideas will be great for me.
    Thanks
    Kumar

    Example:
    [oracle@ozawa oracle]$ sqlplus /nolog
    SQL*Plus: Release 9.2.0.1.0 - Production on Thu Mar 4 09:38:40 2004
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    SQL> spool my_output.txt
    SQL>
    SQL> host rman target /
    Recovery Manager: Release 9.2.0.1.0 - Production
    Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
    connected to target database: LQACNS1 (DBID=1237456636)
    RMAN>
    RMAN>
    RMAN> quit
    Recovery Manager complete.
    SQL>
    SQL> spool off
    SQL>
    SQL> quit
    Joel Pérez

  • How to redirect the tomcat (5.0) console output to a text file

    Hello,
    I am looking for a way of redirecting the tomcat console output [the System.out.println("xyzabc")�s from the java classes running on the container] to a text file.
    The reason is that the programmers need to have that console�s output and the server (windows) have to be rebooted often (no wonder: windows) and then Tomcat start as a service -> console is not visible.
    Thanks!

    The console out put should still be in the log files if tomcat is running as a windows service. It will either be in logs\stdout_xxxx.log and logs\stderr_xxxx.log or in logs\catalina.xxxx.log.
    If you are using 5.5.
    It will either be in logs\stdout.log and logs\stderr.log or in logs\catalina.out.
    if you are using 5.0

  • QuickLook fails to recognize some text files

    QuickLook previews most but not all doc, txt, html, php and css files. QuickLook will work on one file and fail on an apparently identical file, where both open cleanly in the same application when double clicked.
    In some but not all cases, file metadata (viewed in Path Finder) shows difference in UTI and/or "Type" fields where QuickLook works with one and not the other. However, this is not consistent, and in any event I cannot find a way to either edit UTI or Type fields, or set file associations based on UTI or Type (file associations seem to be limited to file extension).
    This behavior is the same on my MBP and iMac.
    Does anyone else see this problem? Any suggestions?

    Thanks for some of the ideas. Here is the status and info update so far:
    Original location of photos were from an old PC in 2005 that was backed up onto this external hard drive. I recently came accross the hard drive and noticed that there were a large number of photos that had not yet been loaded into iphoto. This is where this all started.
    Clicked and dragged from my external hard drive to the desktop - No success.
    Iphoto version 9.3.2
    Connected the external hard drive to my other computer (PC) and emailed a few to myself. From my Imac, opened my email and downloaded them to my desktop. It worked and iphoto recognized them. So I tried emailing more photos from my external hard drive connected to my Imac to  myself again, this time not from another pc but from my Imac. No success. So the lesson so far is that somehow it is making a difference in the file when I email the files from another computer (PC) and then save them to my desktop on my Imac.
    I attached images of both file info. The one to the left of the photo is from the "fixed" file that somehow Iphoto recognizes after emailing it to myself, and yes it is RGB color. The one to the Right is the info screen of the original file. I see no difference in the file type between the two. However, this is from an untrained eye.
    Given the amount of photos (approx 1500) I would have to email myself, I would like to know if there is another way to fix these files in lieu of going through this round about and time consuming fix via email.
    Sorry for the image orientation. Everytime I attached it, the image went sideways.
    Thanks!!

Maybe you are looking for

  • Report and data comming wrong after compress data with full optimization

    In SAP BPC 5.1 version to increase the sysetm performance we did full optimization with compress data. Theis process end with error, after login into system the report and values comming wrong, What is the wrong,how to rectify it Regards prakash J

  • Installing new Secuirty provider on the WebLogic Server

    Hi Everyone, I think you guys can find a solution for the problem i'm facing in configuring the weblogic server. I'm evaluting the server a possible client and need to relpy to him regarding the possible purchase before the mid of next week. Problem:

  • Delete or distrust a certificate authority (CA)

    The security blogs are reporting that the Certificate Authority "DigiNotar" has been compromised.  I have already removed the CA from FireFox via Preferences/Advanced/Encryption but I can't find anything similar in Safari Preferences. Can someone tel

  • Why does iphone 6 put a big gap in front of words

    im getting really frustrated, if I type a sentence with ️hehe or ️babe it puts a big gap <-- like the gaps you can see there, I don't know how to stop it, I've tried adding ️hehe to the keyboard shortcuts, that didnt work and I don't want to turn off

  • Trying to export to flash video

    I thought there was a way to export to flash video within FCP, but apparently that doesn't look like that's the case. How do I export my project to a flash video file? Is there a program I should install (e.g. the sorenson squeeze?) in order to conve