Reading file

hello .. can anyone help me..
my problem begin like this..
my program is about reading DNA sequence, which the file name is <<" hxk_yeast.fasta ">>
before running my program , i've compile all classes inside my program so my ...question is : should i compile the file <<" hxk_yeast.fasta ">> too? actually there's no error inside my code but it seems like my code reading nothing......i need a help n guide from u all.. i hope someone can solve my problem?

Nope, no need to compile the file. Show some code on how you open/read the file

Similar Messages

  • HOW TO DELETE ADOBE READER FILE FROM ADOBE READER

    HOW TO DELETE ADOBE READER FILE FROM ADOBE READER@ !@

    Your question make no sense. What exactly are you trying to do?

  • Reading Files from an FTP location based on Timestamp

    Hi,
    I have a requirement of reading files from an FTP location. The files should be read in the order they were saved in the folder. Can someone tell me how to solve this?
    Thanks,
    Ravi

    Hi Arik,
    Thanks for your reply. I tried doing what u said, but it isn't working. My requirement is to List the files in the folder using FTP adapter and get the file name with the least file stamp from the FTP adapter and pass the FileName dynamically to another FTP adapter which reads the file based on the FileName. When i tested after including the property (for listing the files) you mentioned, it is giving the following error (copied from flow trace):
    <messages>
    <input>
    <Invoke_getFileListFTP_FileListing_InputVariable>
    <part name="Empty" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <empty xmlns="http://xmlns.oracle.com/pcbpel/adapter/ftp/APP_SequentialFileTransfer/PRJ_SequentialFileTransfer/WS_GetFileList_FTP"/>
    </part>
    </Invoke_getFileListFTP_FileListing_InputVariable>
    </input>
    <fault>
    <bpelFault>
    <faultType>0</faultType>
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="summary">
    <summary>Exception occured when binding was invoked. Exception occured
    during invocation of JCA binding: "JCA Binding execute of
    Reference operation 'FileListing' failed due to: Exception
    occured when binding was invoked. Exception occured during
    invocation of JCA binding: "Could not instantiate
    InteractionSpec
    oracle.tip.adapter.ftp.outbound.FTPListInteractionSpec due
    to: Cannot set JCA WSDL Property. Error while setting JCA
    WSDL Property. Property setListSorter is not defined for
    oracle.tip.adapter.ftp.outbound.FTPListInteractionSpec Please
    verify the spelling of the property. ". The invoked JCA
    adapter raised a resource exception. Please examine the above
    error message carefully to determine a resolution. ". The
    invoked JCA adapter raised a resource exception. Please
    examine the above error message carefully to determine a
    resolution.</summary>
    </part>
    <part name="detail">
    <detail>Cannot set JCA WSDL Property. Error while setting JCA WSDL
    Property. Property setListSorter is not defined for
    oracle.tip.adapter.ftp.outbound.FTPListInteractionSpec Please
    verify the spelling of the property.</detail>
    </part>
    <part name="code">
    <code>null</code>
    </part>
    </bindingFault>
    </bpelFault>
    </fault>
    <faultType>
    <message>0</message>
    </faultType>
    </messages>
    Thanks,
    Ravi
    Edited by: Ravi Santosh on Apr 24, 2012 11:02 PM

  • Reading file from an external folder.

    Iam tring to read an external file from the C:\ drive. Given below is the code.
    DATA LV_XLS(100) TYPE C.
    DATA LV_CONTENT TYPE XSTRING.
    LV_XLS = 'C:\XML\Report.xls'
    READ DATASET LV_XLS INTO LV_CONTENT.
    But when i execute iam getting an error - FILE NOT FOUND. How do i read file from an external folder. My requirement is to strictly read from an external folder. Please help.
    If this is not possible please advice as to how the file could be moved to the SAP root directory. Iam not able to locate the root.

    hi,
    This is the code to read a excel file from the local system.
    Read data set you are using in your code corresponds to files on application server thats the reason its throwing an error.
    * Parameter variable declaration for browsing the file location       *
    PARAMETERS:
      p_file TYPE ibipparms-path OBLIGATORY.
    data:
    it_text TYPE truxs_t_text_data .
    AT SELECTION-SCREEN  ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = syst-cprog
    *   DYNPRO_NUMBER       = SYST-DYNNR
         field_name          = ' '
       IMPORTING
         file_name           = p_file.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
    *   I_FIELD_SEPERATOR          =
    *   I_LINE_HEADER              =
          i_tab_raw_data             = it_text
          i_filename                 = p_file
        TABLES
          i_tab_converted_data       = t_cust
      EXCEPTIONS
        conversion_failed          = 1
        OTHERS                     = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    This is to read a text file from local system.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
        filename                      =  'D:\FILEINTERFACE\file.TXT'
    *    FILETYPE                      = 'ASC'
         has_field_separator           = 'X'
    *    HEADER_LENGTH                 = 0
    *    READ_BY_LINE                  = 'X'
    *    DAT_MODE                      = ' '
    *    CODEPAGE                      = ' '
    *    IGNORE_CERR                   = ABAP_TRUE
    *    REPLACEMENT                   = '#'
    *  IMPORTING
    *    FILELENGTH                    =
    *    HEADER                        =
        TABLES
          data_tab                      = t_kna1
    *  EXCEPTIONS
    *    FILE_OPEN_ERROR               = 1
    *    FILE_READ_ERROR               = 2
    *    NO_BATCH                      = 3
    *    GUI_REFUSE_FILETRANSFER       = 4
    *    INVALID_TYPE                  = 5
    *    NO_AUTHORITY                  = 6
    *    UNKNOWN_ERROR                 = 7
    *    BAD_DATA_FORMAT               = 8
    *    HEADER_NOT_ALLOWED            = 9
    *    SEPARATOR_NOT_ALLOWED         = 10
    *    HEADER_TOO_LONG               = 11
    *    UNKNOWN_DP_ERROR              = 12
    *    ACCESS_DENIED                 = 13
    *    DP_OUT_OF_MEMORY              = 14
    *    DISK_FULL                     = 15
    *    DP_TIMEOUT                    = 16
    *    OTHERS                        = 17
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    PS.  In both of the above mentioned function modules make sure that the file structure is similar to the internal tables used.
    Thanks
    Sharath

  • Reading file from a folder : File dir = new File(URL+aFile_to_add);

    Hi,
    Trying to read files from a dir on my site using a JSP and bean. I've tried nearly every option for the filepath I can think of and it doesn't seem to be finding the file...
    Here's the bit:
    String URL = "images\\wedding_photos\\";
    File dir = new File(URL+aFile_to_add);
    String[] files = dir.list();
    It's working locally, but I obviously had to change the path from c://... to the above.
    The full code is listed below in the addWedding Method
    The method removes the .jpg from the file name and then writes the new file name to a database
    Thanks for any insight.
    Regards
    Jim
    public String addWedding(String aFile_to_add)
    String feedback = "unset in scrubWedding";
    try
    String URL = "images\\wedding_photos\\";
    Class.forName("org.gjt.mm.mysql.Driver");
    java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:mysql://localhost/rhwedd2_shop?user=**********&password=*******");
    java.sql.Statement statement = connection.createStatement();
    File dir = new File(URL+aFile_to_add);
    String[] files = dir.list();
    if (files == null)
    feedback = "Sorry, couldn't find the file "+aFile_to_add+"...no files have been added.";
    else
    for (int i=0; i<files.length; i++)
    // Get filename of file or directory
    String filename = files;
    String no_extension;
    //convert string array element into a char array
    char [] charsfilename = filename.toCharArray();
    int newlength = charsfilename.length -4;
    no_extension = String.valueOf(charsfilename,0,newlength);
    filesAdded = filesAdded+", "+no_extension;
    // Show the new file names in stack trace without extension
    //System.out.println("String no_extension " + no_extension );
    statement.executeUpdate("INSERT INTO items VALUES ('"+no_extension+"',5,'"+aFile_to_add+"')");
    // write to table with item_id and weddingid
    feedback = "The following files have been added..."+filesAdded;
    if (statement != null )
    statement.close();
    if ( connection != null )
    connection.close();
    catch(Exception e)
    feedback = "Into the catch";
    e.printStackTrace(System.err) ;
    return feedback;
    }//end addWedding

    String URL = "images\\wedding_photos\\";
    File dir = new File(URL+aFile_to_add); ok, ok, I'll answer...
    1) What gives you the impression that the relative directory "images\\..." exists (or, in other words, what makes you think your current directory is the parent of "images"?

  • Unable to read file from application server

    Hi guys,
    I am reading file(could be any extension) from application server,but some time i am successfuly able to read file and sometime unable to read,why its happening .
    my code is here
    OPEN DATASET E_FILE FOR INPUT IN  BINARY MODE . "
      IF SY-SUBRC = 0.
        DO .
          READ DATASET E_FILE INTO GS_PDF_TAB.
          IF SY-SUBRC = 0.
            APPEND GS_PDF_TAB TO GT_PDF_TAB.
          ELSE.
            EXIT.
          ENDIF.
        ENDDO.
        CLOSE DATASET E_FILE.
      ENDIF.
    Thanks
    Ankur Sharma

    Hi,
    What actually happens?  Do you get a short dump?  Do you get a return code ne 0?  Does it run fine but you get no data in your table?
    We aren't mind-readers and can't help much without more information.
    Try using transaction AL11 to see if you access the files you are trying to open.
    Gareth.

  • Uploading and reading file from application server

    Hi
    My problem is when am uploading a file to application server it is getting stored in
    usr/sap/transyp1/prod/in   directory
    after that i want to read that file from application server to update database
    when  using below code it is showing some other directory in f4 help
    DATA: lv_hostname TYPE msxxlist-name.
    DATA: lv_server TYPE bank_dte_jc_servername.
    PARAMETERS: p_file TYPE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL FUNCTION 'BANK_API_SYS_GET_CURR_SERVER'
    IMPORTING
    e_server = lv_server.
    lv_hostname = lv_server.
    CALL FUNCTION 'F4_DXFILENAME_4_DYNP'
    EXPORTING
    dynpfield_filename = 'P_FILE'
    dyname = sy-cprog
    dynumb = '1000'
    filetype = 'P'
    location = 'A'
    server = lv_hostname.
    experts could you please help me out
    Thanks & Regards
    Nagesh.Paruchuri

    User Transaction file. You will get all logical file path names.
    used following fucntion module to read file name and use command open dataset to read the file.
    CALL FUNCTION 'FILE_GET_NAME'
           EXPORTING
                CLIENT           = SY-MANDT
                LOGICAL_FILENAME = C_LOGICAL_FILENAME
                OPERATING_SYSTEM = SY-OPSYS
                PARAMETER_1      = P_IN_FILENAME
           IMPORTING
                FILE_NAME        = P_OUT_FILENAME
           EXCEPTIONS
                FILE_NOT_FOUND   = 1
                OTHERS           = 2.
    OPEN DATASET P_OPEN_FILE ENCODING UTF-8 IN TEXT MODE FOR OUTPUT.
      IF SY-SUBRC <> 0.
        MESSAGE E000(38) WITH 'Error in Opening file: ' V_PHY_FILENAME.
      ENDIF.

  • Open Data Set Error while trying to read file from non SAP server

    Hi all,
    is it possible to read data from non-SAP application Sever?
    I'm using OPEN DATASET p_filin FOR INPUT IN LEGACY TEXT MODE CODE PAGE '1504',
    Where p_filin is other Windows server.Our applicition server is under Unix.Is it a problem?
    I make test to read file from SAP application server and it was ok.So how to call other server?
    Thanks!

    Hi,
    Yes it is possible to read data from a non SAP server through the statement OPEN DATASET.
    The important thing to check is that the SAP Server got enough access to the non SAP server so it can perform a reading/writing process depending on your needs.
    You should contact your network administrator and BASIS to help you check the permissions. This can be pretty tricky, specially if the servers are in different domains.
    Regards,
    Gilberto Li

  • How to combine both DAQ AI signal, write and read file in single VI

    Hi
     I am the new user of LabVIEW version 7.1 for testing automation application. I have to measure 33 signals ( mostly analog like temp, pressure, etc...) from NI USB 6210 DAQ system and write in master file for future verfication.From real data or from master file back up have to write  one more file if only the signal reaches steady state , which will used for analysis and same signals to be read from this file parallely & make a waveform and/or table display format.
    Pl. help me to shortout this problem 
    note: I have plan to ugrade labVIEW version 2011 shortly, so let me know doing parrel acquistion write and read file for data analysis in same VI in version 7.1...... 

    Parallel operations in LabVIEW are very simple.  Just code it in parallel and it will work.
    Try taking a look at some of the examples in the NI Example Finder (Help > Find Examples).  There you will find example for writing to and reading from files, as well as data acquistion in parallel with other operations.
    You might need a producer/consumer architecture is you are acquiring data very quickly.
    Chris
    Certified LabVIEW Architect
    Certified TestStand Architect

  • Error ORA-20003: Cannot read file/...  in Cash Management?

    Dear All.
    I am having this Error in the Cash Management Module on the bank statement load process
    Error ORA-20003: Cannot read file /software/d01/oracle/interface/finance/inbound/email.9Nemail.13111507.3445704.cnv.
    How do I resolve this error.
    Thank you.

    Hi Lucy,
    The error is probably due to one of the reasons:
    1. There is no file in the location: /software/d01/oracle/interface/finance/inbound/email.9Nemail.13111507.3445704.cnv.
    2. No permission on the file respective file.
    Please get the assistance from the DBA to check on this.
    Thanks &
    Best Regards,

  • [Urgent] How to read files from different directories?

    I am new to Java Programming, I would like to know how to read files from directories other than the current one? (example as follows)
    ProjectDirectory
    |--MainDirectory
    |--MainProgram.java
    |--SupplementDirectory
    |--SupplementProgram.java
    |--Pictures
    |--Image.gif
    What should I write in the MainProgram.java so that I can use the supplementProgram.java from MainProgram and read the Image.gif file from the MainProgram.java?
    Thanks

    Run through the I/O tutorial here. It should get you up to speed on this sort of thing...

  • Can the aTV read files from an iTunes library on my nas drive without my computer being on

    I have my itunes library on a My Book Live nas drive that contains all of my digital movies and TV shows. I want to be able to watch my movies from the library without a computer running. I understand that Apple has chosen to chain you to the computer and your itunes account through Home Sharing but I can not see why they couldn't allow you to access a nas drive without a computer running because your aTV is tied to your itunes account also so why do they force you to run a computer 24/7 365 in order to access the files you have bought and paid for.
    I have a love/hate for Apple because I love the quality of the products they make but I hate how they make all of the digital files you purchase only accessible through a computer running Home Sharing even though the files are not stored on the computer.
    I have tried several things to get this to work without a computer but no luck. The only way I have found to be able to do this is to Jailbreak your aTV and install 3rd party software (which I don't want to do) that will allow you to by pass the computer and Home Sharing (which is dumber than ****) because that is all I want to do is eliminate the need of a computer running wasting electricity (I thought Apple was supposed to be an enviro friendly company, guess not). I am not trying to steal or give someone else my purchased movies and using the aTV and an internet connection they could still be able to tie your media to your itunes account so I just don't get there thinking, or lack of thinking I should say.
    Is their a way to do this without Jailbreaking or modifying your aTV?
    If not is Apple ever going to wake up and allow there customers to actually USE the media they purchase from them without Home Sharing and a computer running?

    _Skull wrote:
    Can the aTV read files from an iTunes library on my nas drive without my computer being on
    no it can't. you need itunes open and running

  • How can I transfer an adobe reader file to Microsoft word?

    I have Windows Vista on my machine. I really need to transfer an Adobe reader file into Microsoft word or at least be able to type inside of Adobe. Just wondering how can I do this task or am I just not able to?
    Any help or suggestions out there..?

    That would require using Adobe Acrobat. It can create Word docs from PDF's.
    The bad news is, most of the time it doesn't do a very good job at it.
    With Acrobat, you could also add form fields that you can fill in which would be much better.

  • Frm-10221: Cannot read file ACTIV

    Dear,
    while running a form this error message appears
    frm-10221: Cannot read file ACTIVhere ACTIV is the mmb file. i can add the attached library but i think this file is not working?
    Thanks in Advance.
    Stalin Ephraim

    I faced a similar issue and your solution worked a charm. Thank you. Although the menu was already compiled, I had to re-compile in order to resolve this.

  • Error while reading file entries from the database

    Hi there,
    We are running a instance of xmii 12 in a VM (VMware) and after somebody shutdown the host machine without shutting down the VM (great idea isn't it?) we keep getting this message when trying to access xMII:
    "Application cannot be started.
      Details:   com.sap.engine.services.deploy.container.ExceptionInfo: Error while reading file entries from the database."
    Any clue? Any suggestion on how we can recover from that?
    Thanks a whole lot,
    Dom
    Server log:
    #1.5 #000C29A3B1F20002000000C400000F2800044829A35270F8#1205243578005#/System/Server##com.sap.engine.services.dbpool.deploy.ContainerImpl####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Info#1#com.sap.engine.services.dbpool.deploy.ContainerImpl#Plain###DataSources or DataSource aliases of 'sap.com/tcmonitoringsysteminfo' application started successfully.#
    #1.5 #000C29A3B1F20002000000C500000F2800044829A3527A6C#1205243578005#/System/Server##com.sap.engine.services.servlets_jsp.server.container.WebContainer####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Info#1#com.sap.engine.services.servlets_jsp.server.container.WebContainer#Plain###application [] Start of application [sap.com/tcmonitoringsysteminfo] finished successfully on Web Container.#
    #1.5 #000C29A3B1F20002000000C600000F2800044829A3527DB5#1205243578005#/System/Server##com.sap.engine.services.deploy####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Info#1#com.sap.engine.services.deploy#Plain###
    Operation startApp over application sap.com/tcmonitoringsysteminfo finished successfully on server 305221750#
    #1.5 #000C29A3B1F20002000000C700000F2800044829A3527E03#1205243578005#/System/Server##com.sap.engine.services.deploy####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Info#1#com.sap.engine.services.deploy#Plain###
    Operation startApp on application sap.com/tcmonitoringsysteminfo finished on current cluster node for 221 ms.#
    #1.5 #000C29A3B1F20002000000C800000F2800044829A3528B49#1205243578005#/System/Server##com.sap.engine.services.deploy####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Error#1#com.sap.engine.services.deploy#Plain###Error occurred while initially starting application sap.com/xappsxmiiear:Error while reading file entries from the database.#
    #1.5 #000C29A3B1F20002000000CA00000F2800044829A352922B#1205243578015#/System/Server##com.sap.engine.services.deploy####n/a##60152160ef7211dcb7a5000c29a3b1f2#SAPEngine_System_Thread[impl:5]_17##0#0#Info#1#com.sap.engine.services.deploy#Plain###The synchronization of applications with DB completed for 39304 ms.#
    #1.5 #000C29A3B1F200040000000200000F2800044829B290A4F8#1205243834341#/System/Server/SLDService##com.sap.sldserv.DataCollector####n/a##0da42150ef7311dcb908000c29a3b1f2#SAPEngine_System_Thread[impl:5]_7##0#0#Warning#1#com.sap.sldserv.DataCollector#Plain###Communication configuration is incomplete. No data transfer possible until corrected.#

    Well thanks for the hint. Actually, the DB was up but corrupted. I managed to solve the bug by re-deploying xMII (using the SDM tool) which kept all my data but redeployed both the config db of (x)mii and the class files.

  • Null Pointer Exception Trying to Read File?

    I get a Null Pointer Exception when I try to perform the read hex2.txt, which i know exists and is in the same folder as this java file. Anyone see where my problem is?
    <code>
    import java.io.*;
    public class BytesToZeros
              int count = 0;
              int[] data;
              public static void main (String[] args)
                        BytesToZeros btz = new BytesToZeros();
              public BytesToZeros()
                        this.readFile();
                        this.writeFile();
              private void readFile ()
                        try
                                  FileInputStream fis = new FileInputStream("hex2.txt");
                                  BufferedInputStream bis = new BufferedInputStream(fis);
                                  boolean eof = false;
                                  while (!eof)
                                            int input = bis.read();
                                            if (input == -1)
                                                 eof = true;
                                            else
                                                 data[count] = input;
                                                 count++;          
                                  bis.close();
                        catch (IOException e)
                                  System.err.println("Error Reading File: " + e.getMessage());
                                  count = 0;
              private void writeFile ()
                        String zeros;
                        try
                                  FileOutputStream fos = new FileOutputStream("hex2.txt");
                                  BufferedOutputStream bos = new BufferedOutputStream(fos);
                                  for (int i=0; i<data.length; i++)
                                            bos.write(0);
                                  bos.close();
                        catch (IOException e)
                                  System.err.println("Error writing file: " + e.getMessage());
    </code>

    Doesn't the stack trace you get show which line it was thrown from?
    That should tell you where the problem is.
    It's weird to do a file read and a file write in the constructor like that. It would make somewhat more sense to do
    public static void main (String[] args) {
      BytesToZeros btz = new BytesToZeros();
      btz.readFile();
      btz.writeFile();
    }Although I realize this is just a test.
    Finally, to quote code use square brackes around the code tags:
    &#91;code]&#91;/code]

Maybe you are looking for

  • Supported Graphics Card?

    I am considering upgrading from Final Cut Express HD to Final Cut Pro X. My MacBook pro is a few years old, and so I've been checking carefully to see about compatability. Can anyone tell me for sure whether or not this graphics card is supported: NV

  • Why does my laserjet 5p keep detecting as postscript?

    I have a LaserJet 5P. When I install it, I don't get the option to select that it's postscript or non-postscript. Consequently all of my documents look like userdict()print flush}%%BeginFeature which is very rarely what I wanted. Why is my computer o

  • Ctrl P only Loading preview .. how do I fix it?

    The wife says I did it, but I just need to fix it.  The ctrl P brings up a print scren with preview loading msg and that is all. If I click on print it goes to limbo land. What can I do to fix it? This question was solved. View Solution.

  • Latest update has wiped my iPhone

    I installed today's iPhone update and now my PC says there are no drivers installed and iTubnes won't recognise it. Worse still, it has teh graphic on the screen you get when you first buy it telling you to connect to iTunes. Any ideas?

  • Photoshop CC trial download keeps freezing at 42%

    Help...? I've restarted my computer more than once and like clockwork the trial download fails at 42%