Bad Characters writing an output file from CISCO router

Hi,
I'm making a backup of an accessrouter using telnet. I want to create a log file,so I redirect the stdout to a file this way:
System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream("c:\\Maint\\Operator\\accounting\\accounting.txt")),true,"US-ASCII"));
When I use the monitor as stdout there are no problems, but when I do the redirection, some extrange characters appear in the log file:
AccessRouter#
copy system:running-config tftp://10.1.3.34/Maint/Operator/Backu$:running-config tftp://10.1.3.34/Maint/Operator/Backup /tempo/Baonfig tftp://10.1.3.34/Maint/Operator/Backup/tempo/Bac kup/BBDDa://10.1.3.34/Maint/Operator/Backup/tempo/Backup/BBDDan dEquip/1334/Maint/Operator/Backup/tempo/Backup/BBDDandEquip/13_
I don't know where's the problem,
Please help !
Thank you in advance. Best Regards.

What are you using to view the file? What happens if you use the default encoding instead of US-ASCII? It looks to me like either the application you are using to view the file can't interpret those characters or there are characters in the stream that don't convert well to US-ASCII.

Similar Messages

  • How to get multiple html output file  from an xml document via xslt?

    Hi,
    the purpose is to generate multiple html output file from one xml file
    depending on special tag.
    exp: i have an xml file which contains sevreral articles so how to get each article section in an independant html file
    Thanks for help

    Not a standard feature of XSLT. But Michael Kay's XSLT implementation, SAXON, provides that as an extension. Get it here:
    http://saxon.sourceforge.net/

  • 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 reply

    You 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

  • What are the cases that cause the I/O error writing to output file

    may i ask what are the cases that cause the I/O error writing to output file ??
    cause i have the write path and the input file has data
    any ideas???

    and the permission is to write first time then append to itBy "permission" is meant the operating system controlled rights that let
    particular users do specified things with specified files or directories.
    the error message is a the title of the message
    I/O error writing to output fileThe java runtime actually creates a much more useful error message than
    this but, unfortunately, your program is swallowing this error message and
    replacing it with the message you see.
    Somewhere in your code you have something like:try {
        // all sorts of stuff goes here
        // including the code that is intended to
        // write to the file
    } catch(IOException ioe) {
        System.out.println("I/O error writing to output file");
            // add this line
        //ioe.printStackTrace();
    }It might say Exception rather than IOException.
    To get a much more useful error message add the commented line.

  • Output file from ELM and from Campaign automation

    Hi Experts,
    Can some one let me know how to get an output file from ELM, and from campaign automation?
    Thanks
    Leela

    Hello Uday,
    i suppose if you run the program within a process chain it will be started
    in a background process. All downloads via the SAPGUI onto your local
    PC (or network drive) are not possible in the background because there is no
    connection to your PC during the excecution of the report in the background.
    Try to save the download on an accessible file system on the application server
    and download it from there afterwards.
    Which function module is used to download the data (GUI_DOWNLOAD or the older version WS_DOWNLOAD) in your report?
    To save data on the application server use the ABAP statements
      OPEN DATASET filename FOR OUTPUT    -> for creation of file
      TRANSFER record TO filename                  -> for transfer of one record
      CLOSE DATASET filename                        -> for closing the file
    Regards,
    Ralf Matthies

  • Send configuration file to Cisco router

    Where can I find a C programm that send configuration file to Cisco router from linux workstation?

    I wonder what kind of config changes you are making and whether that may have an impact on SSH. For example if you change the host name or change the domain name then the keys need to be regenerated.
    HTH
    Rick

  • L2tpv3 dialing from cisco router

    I have requirement where customer wants ip dialing to LNS from cisco router with the help of l2tpv3.
    Could anyone tell me how to configure this.
    regards
    shivlu jain

    Hello Shivlu,
    in one of our routers the backup link is configured in this way
    pseudowire-class netvision-l2tp
    encapsulation l2tpv2
    interface Virtual-PPP1
    description NETVISION DIALER
    ip address negotiated
    ip nat outside
    ip virtual-reassembly
    no cdp enable
    ppp pap sent-username password 0 41003827
    pseudowire x.x.x.x 2 pw-class netvision-l2tp
    crypto map VPN_MAP
    where x.x.x.x is a public ip address
    ip route x.x.x.x 255.255.255.255 g0/1
    completes this solution where this g0/1
    sh run int gi0/1
    Building configuration...
    Current configuration : 157 bytes
    interface GigabitEthernet0/1
    description CONNECTION TO CABLE MODEM
    ip address dhcp
    ip virtual-reassembly
    duplex auto
    speed auto
    media-type rj45
    end
    and it receives a private ip address from DHCP on a cable modem access network.
    but it uses l2tpv2 not L2tpv3 and I've always seen l2tpv2 in this context.
    Hope to help
    Giuseppe

  • Characters missing in output file?

    Hi all,
    In the below code I am not able to see the characters from 500 onwards in output file. What might be the reaon?
    PARAMETERS:P_OUTPUT  type rsfillst-dirname
               DEFAULT TEXT-001 lower case.
    data:vtext(900) type c.
    start-of-selection.
    vtext+0(5) = 'abcde'.
    vtext+100(5) = '1bcde'.
    vtext+200(5) = '2bcde'.
    vtext+300(5) = '3bcde'.
    vtext+400(5) = '4bcde'.
    vtext+700(5) = '7bcde'.
    vtext+895(5) = '9bcde'.
    OPEN DATASET P_OUTPUT FOR OUTPUT in text mode encoding default.
    TRANSFER vtext TO P_OUTPUT.
    CLOSE DATASET P_OUTPUT.
    IF SY-SUBRC = 0.
       WRITE:/ 'ok'.
    ELSE.
    WRITE:/ 'FAIL'.
    ENDIF.
    I can see only characters till '4bcde' in output file.
    Please help.
    Thanks,
    Subba

    Hi,
    You can view upto 512 character in the output.
    Check out the PROGRAM statement of Program PROGRAM rswatch0 (Transaction AL11). 
    PROGRAM rswatch0 MESSAGE-ID s1 NO STANDARD PAGE HEADING LINE-SIZE 512.
    Thats the reason why u can see more that 512 characters.
    You can download the data to ur internal table and check that data is still there.
    Reward points if helpful.

  • Output file from ABAP program

    I am using the program Z_SAP_HIERARCHY_DOWNLOAD to output a hierarchy in BW to a specified drive. It works fine when I go to SE38 and run it. However, when I run it from a process chain, it doesn't output the file. How can I generate the output file by running the program from a Process Chain? Thanks.

    Hello Uday,
    i suppose if you run the program within a process chain it will be started
    in a background process. All downloads via the SAPGUI onto your local
    PC (or network drive) are not possible in the background because there is no
    connection to your PC during the excecution of the report in the background.
    Try to save the download on an accessible file system on the application server
    and download it from there afterwards.
    Which function module is used to download the data (GUI_DOWNLOAD or the older version WS_DOWNLOAD) in your report?
    To save data on the application server use the ABAP statements
      OPEN DATASET filename FOR OUTPUT    -> for creation of file
      TRANSFER record TO filename                  -> for transfer of one record
      CLOSE DATASET filename                        -> for closing the file
    Regards,
    Ralf Matthies

  • PDF output file from Image Capture corrupted

    This problem occurs only when scanning multiple page documents into image capture, the lower 1/4 of the first 2 pages are unreadable blurs. The page shows up ok in the Image capture preview window, but the PDF output is corrupted. The printer is a Brother MFC-7820N, I am scanning 150 dpi grayscale, US letter, no image correction, to PDF. The problem occurs with both of my computers, Quad G5 10.5.8, and a MacBook 10.5.8, this has happened since I purchased the printer, I was running 10.4 at the time. I have just scanned 1 page at a time with no problem, but now I have a large amount of documents to scan and I get the corrupt files. If anyone has seen this and found a solution, I would appreciate any suggestions.

    Ah perfect, you made me aware of a feature kink I didn’t know about! When you import stuff using Image Capture, it goes into /private/tmp/Image Capture_Import.(string of numbers and letters).
    You can navigate there by going to the Finder, hitting Command-Shift-G, and typing in /private/tmp—if the folder still exists, as it usually does for some time, sometimes even until the next restart or so—you can see the folders which should include one or more of thoe Image Capture_Import.something folders and find your files.
    Incidentally, if you want to find a “system” file, i.e., one that’s in a location normally hidden by the Finder, you can:
    1. Open up a new Spotlight/Find window in the Finder, and start searching by name.
    2. Next to where it says Search: This Mac… etc. there’s a + button. Click that, then
    3. From the dropdown menu choose Other… and look in the list for “System files” and check the “In Menu” checkbox for it.
    4. Hit OK.
    5. Choose “System Files” which is now in the dropdown, choose “are included” from the next dropdown.
    Be careful what you do with files you find using this method. It will show everything, including files essential to running your Mac properly, so unless you know exactly what you’re doing, don’t just start dragging files off this window onto your Desktop or anything, try to copy them instead by option-dragging (holding down the option key while dragging)—that way, you’re only making copies, not moving a file from where it’s supposed to be, and your Mac can find it.
    Hope this helps! If you can’t find your files this way, there are other programs which can undelete and perform other operations to recover data… this happens to everyone, no matter how long you’ve been a user.

  • Question about creating multiple output  files from same query

    I have a query like this:
    select * from emp;
    ename empno deptno
    Scott 10001 10
    Tiger 10002 10
    Hanson 10003 20
    Jason 10004 30
    I need to create multiple output files in xml format for each dept
    example:
    emp_dept_10.xml
    emp_dept_20.xml
    emp_dept_30.xml
    each file will have the information for employees in different departmemts.
    The reason I need to do this is to avoid executing the same query 200 times for generating the same output for different departments. Please let me know if it is practically possible to do this.
    Any input is greatly appreciated.
    Thanks a lot!!

    You can write a shell script to generate the multiple spools files for the same output. Below script may helps you.
    #====================
    #!/bin/bash
    n=0
    while [ $n -le 20 ]
    do
    n=`expr $n + 1`
    sqlplus -s system/manager <<EOF
    spool emp_dept_$n.xml
    select count(1) from tab;
    spool off
    EOF
    done
    #====================

  • APIs for accessing the ESS log and output files from UCM

    Hi,
    As I understand, the output and log files of an ESS job will be uploaded to UCM.
    We have a requirement where in we are building a simple error handling framework, which gets triggered after a series of ESS jobs are run. In the error handling framework based on some processing logic we need to e-mail the error or log files to the users. I am not able to find any information related to retrieving the log and output files for and ESS job from UCM. Any inputs on this will be appreciated.
    Thanks for your help,
    Thiru

    For accessing content in UCM you can use the RIDC APIs or UCM Web Services. Note that the UCM also provides features for workflow etc. that could potentially be used for notifications refer to the developer guide for details. For UCM related questions you may want to use this forum instead
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • Writing data into file from URL address

    Hi!
    I need to download file from certain url address and write it to file on my local disk. The file being downloaded is a image file and therefore
    I cannot make sure what encoding should I use. When I save file manually on disk and compare it with the file written programmatically, then
    the bytes in both files are not equal. Any smart advises are welcome.
    The code being used is:
    import java.net.*;
    import java.io.*;
    public class UrlParser {
         public static void main(String[] args) {
              String data;
              try{
                   // Construct a URL object
                   URL url = new URL("http://stockcharts.com/c-sc/sc?s=qqqq&p=D&b=3&g=0&i=t74934638175&r=4028");
                   // Open a connection to the URL object
                   String encoding = "UTF8";
                   BufferedReader html = new BufferedReader(new InputStreamReader(url.openStream(),encoding));      
                   Writer img_out = new OutputStreamWriter(new FileOutputStream("sc.gif"), encoding);
                   while((data = html.readLine()) != null) {
                        img_out.write( data );
                   img_out.close();
              } catch(MalformedURLException e) {
                   System.out.println(e);
              } catch(IOException e) {
                   System.out.println(e);
    }

    Use InputStream and OutputStream classes, not Readers/Writers. The latter are for "text" I/O, not "binary".

  • Fed up with iWeb's idiosyncrasies! What program accepts the FTP output file from iWeb with the least amount of work required?

    Hi...
    I have been a longtime user of iWeb and have learned many things about it the hard way. Now even after duplicating and saving my domain names constantly to external hard drives, downloading additional software such as iWebdrop and iWeb SEO, learning how to unhide files that shouldn't be hidden in the first place, and consistently finding the elusive domain files, I find myself, yet again, searching high and low for the updated domain that I spent two days doing a major rehaul on. I have proof that I wasn't dreaming as it's currently up on my website and I have the exported FTP file.
    So after years of crying over lost iWeb domains I've decided it time to make the leap to different software.
    I need something akin to iWeb as I'm not at all versed in HTML. My main goal is to minimize the amount of work by using the FTP files I exported last night.
    I've read the recomendations here but just want a simple solution with no HTML coding needed.
    Flux?
    Thanks!

    Nope. It's just no where to be found.
    I mentioned in another post that during this entire episode an icon with files from my old mobile me account kept popping up. I kept having to eject it and I thought maybe that might have something to do with the issue.
    Though it was there this morning, now I can't find that icon anywhere.
    This must be the fifth time I've had issues like this which is why I'm fed up and feel the need to move on.
    I wish there was some way to reverse engineer the FTP file.

  • Writing an XML file from JSP

    Hi
    for some this question will seem to be a stupid, but i am really confused how can i write an XML file from with in JSP code. should i have to use same FileOutPutStream.
    Actually i am trying to make reports using Jasper api. It demands for an XML file which will then b converted into PDF file. Can any one help me in it.

    Jasper converts a JSP into a servlet - and cannot be used to generate PDFs.
    Assuming this is for a web application I would
    1. Generate the XML
    2. Generate the PDF from the XML
    3. Send the PDF to the client from a servlet (i.e. forget the JSP).
    Step 2 is actually quite complicated - you could do this manually with the IText API (http://www.lowagie.com/iText/) or use an XSL approach with Apache FOP (http://xmlgraphics.apache.org/fop/)

Maybe you are looking for

  • Variable in path

    How can I use a variable in the path? (I know this is not called the path but I can't think of what it's called). For instance: instead of: this.symbol1.symbol2._height = 800; I want var my_var = "this.symbol1.symbol2"; my_var._height = 800;

  • Difference between REPORT & PROGRAM Keyword

    In ABAP Code, We can start a program with REPORT and PROGRAM Keyword. What is the difference?

  • Should I Get One?

    OK well I'm going to need a laptop for college in the future. I originally wanted a Mac but I got turned off of them when my iPod Touch wouldn't work with my dad's Mac because he was 0.0.1 versions away from what was required. I thought to myself if

  • Enhancing a transaction datasource!

    Hi all, Can anyone please tell me where I can find documentation on writing User exits/enhancing transaction datasources.  Is the procedure for enhancing transaction datasource same for all extraction methods like LO-Cockpit, LIS, COPA, Generic Datas

  • Why proforma needed in export sales

    Gurus. I have seen 2 scenerios where we create a proforma invoice. 1) in case of plant to plant stock transfer 2)in case of exports sale. can anyone tell me the reason behind why is it that necessary to have a proforma invoice in case of exports sale