How to iterate through multiple records read from a file adapter?

I am reading multiple records from a file using SyncRead file adapter.
I want to iterate through the records to perform some action on every record. How to do this?
I found few threads related to this..but did not get the solution.
Please note that I am using Jdev 10.1.3.4
Thanks

For count expression, I am getting following error:
<Faulthttp://schemas.oracle.com/bpel/extensionhttp://schemas.xmlsoap.org/soap/envelope/>
<faultcode>null:subLanguageExecutionFault</faultcode>
<faultstring>business exception</faultstring>
<faultactor>cx-fault-actor</faultactor>
<detail>
<code>XPathExecutionError</code>
<summary>XPath expression failed to execute. Error while processing xpath expression, the expression is "ora:countNodes(bpws:getVariableData('Invoke_3_SynchRead_OutputVariable','EmpCollection','/ns4:EmpCollection'))", the reason is FOTY0001: type error. Please verify the xpath query. </summary>
</detail>
</Fault>
I hard-coded count, in order to proceed. Then I got following error
<Faulthttp://schemas.oracle.com/bpel/extensionhttp://schemas.xmlsoap.org/soap/envelope/>
<faultcode>null:bindingFault</faultcode>
<faultstring>business exception</faultstring>
<faultactor>cx-fault-actor</faultactor>
<detail>
<code>null</code>
<summary>file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_BPELProcess4_1.0_dc4a703c46a242f69d6cea305b2df3a3.tmp/WriteDA.wsdl [ WriteDA_ptt::insert(VbEmpCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: Mapping Not Found Exception. The mapping [C1] for descriptor [class bpel___localhost_default_BPELProcess4_1_0__MD5_ad2539e1386433a9e059bcc969732f11_.WriteDA.VbEmp] could not be found. The input xml record had an element [VbEmp/C1]. ; nested exception is: ORABPEL-11627 Mapping Not Found Exception. The mapping [C1] for descriptor [class bpel___localhost_default_BPELProcess4_1_0__MD5_ad2539e1386433a9e059bcc969732f11_.WriteDA.VbEmp] could not be found. The input xml record had an element [VbEmp/C1]. Make sure that the input xml is valid relative to the xsd and that the mapping exists in the Mappings.xml. If an old version of the descriptor without this mapping has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this attribute/mapping. </summary>
<detail>null</detail>
</detail>
</Fault>
The bpel code is as follows (I can share entire BPEL project..But not sure how to attach to the thread :( )
<?xml version = "1.0" encoding = "UTF-8" ?>
<!--
Oracle JDeveloper BPEL Designer
Created: Wed Feb 03 18:00:26 IST 2010
Author: administrator
Purpose: Synchronous BPEL Process
-->
<process name="BPELProcess4"
targetNamespace="http://xmlns.oracle.com/BPELProcess4"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:ns4="http://TargetNamespace.com/InboundService"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:client="http://xmlns.oracle.com/BPELProcess4"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/ReadFA/"
xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
xmlns:ns3="http://xmlns.oracle.com/pcbpel/adapter/db/top/WriteDA"
xmlns:ns2="http://xmlns.oracle.com/pcbpel/adapter/db/WriteDA/"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
<!--
PARTNERLINKS
List of services participating in this BPEL process
-->
<partnerLinks>
<!--
The 'client' role represents the requester of this service. It is
used for callback. The location and correlation information associated
with the client role are automatically set using WS-Addressing.
-->
<partnerLink name="client" partnerLinkType="client:BPELProcess4"
myRole="BPELProcess4Provider"/>
<partnerLink name="WriteDA" partnerRole="WriteDA_role"
partnerLinkType="ns2:WriteDA_plt"/>
<partnerLink name="ReadFA" partnerRole="SynchRead_role"
partnerLinkType="ns1:SynchRead_plt"/>
</partnerLinks>
<!--
VARIABLES
List of messages and XML documents used within this BPEL process
-->
<variables>
<!-- Reference to the message passed as input during initiation -->
<!-- Reference to the message that will be returned to the requester-->
<variable name="inputVariable"
messageType="client:BPELProcess4RequestMessage"/>
<variable name="outputVariable"
messageType="client:BPELProcess4ResponseMessage"/>
<variable name="Invoke_2_insert_InputVariable"
messageType="ns2:VbEmpCollection_msg"/>
<variable name="Invoke_3_SynchRead_InputVariable"
messageType="ns1:Empty_msg"/>
<variable name="Invoke_3_SynchRead_OutputVariable"
messageType="ns1:EmpCollection_msg"/>
<variable name="Invoke_3_SynchRead_InputVariable_1"
messageType="ns1:Empty_msg"/>
<variable name="Count" type="xsd:integer"/>
<variable name="iterater" type="xsd:integer"/>
</variables>
<!--
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
-->
<sequence name="main">
<!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess4.wsdl) -->
<receive name="receiveInput" partnerLink="client"
portType="client:BPELProcess4" operation="process"
variable="inputVariable" createInstance="yes"/>
<!-- Generate reply to synchronous request -->
<invoke name="Invoke_3" partnerLink="ReadFA" portType="ns1:SynchRead_ptt"
operation="SynchRead"
outputVariable="Invoke_3_SynchRead_OutputVariable"
inputVariable="Invoke_3_SynchRead_InputVariable_1"/>
<assign name="Assign_1">
<copy>
<from expression="1"/>
<to variable="iterater"/>
</copy>
<copy>
<from expression="1"/>
<to variable="Count"/>
</copy>
</assign>
<while name="While_1"
condition="bpws:getVariableData('iterater') &lt;= bpws:getVariableData('Count')">
<sequence name="Sequence_2">
<switch name="Switch_1">
<case condition="bpws:getVariableData('Invoke_3_SynchRead_OutputVariable','EmpCollection','/ns4:EmpCollection/ns4:Emp/ns4:C4') = &quot;Pune&quot;">
<sequence name="Sequence_1">
<assign name="Assign_3">
<copy>
<from expression="bpws:getVariableData('Invoke_3_SynchRead_OutputVariable','EmpCollection','/ns4:EmpCollection/ns4:Emp')[bpws:getVariableData('iterater')]"/>
<to variable="Invoke_2_insert_InputVariable"
part="VbEmpCollection"
query="/ns3:VbEmpCollection/ns3:VbEmp"/>
</copy>
</assign>
<invoke name="Invoke_2" partnerLink="WriteDA"
portType="ns2:WriteDA_ptt" operation="insert"
inputVariable="Invoke_2_insert_InputVariable"/>
</sequence>
</case>
<otherwise>
<sequence name="Sequence_3">
<empty name="Empty_1"/>
<assign name="Transform_1">
<bpelx:annotation>
<bpelx:pattern>transformation</bpelx:pattern>
</bpelx:annotation>
<copy>
<from expression="ora:processXSLT('Transformation_3.xsl',bpws:getVariableData('Invoke_3_SynchRead_OutputVariable','EmpCollection'))"/>
<to variable="Invoke_2_insert_InputVariable"
part="VbEmpCollection"/>
</copy>
</assign>
</sequence>
</otherwise>
</switch>
<assign name="Assign_2">
<copy>
<from expression="bpws:getVariableData('iterater') + 1"/>
<to variable="iterater"/>
</copy>
</assign>
</sequence>
</while>
<reply name="replyOutput" partnerLink="client"
portType="client:BPELProcess4" operation="process"
variable="outputVariable"/>
</sequence>
</process>
From the process flow, I can see that the array element expression works and the first employee record is correctly assigned to the Invoke_2_Input_Variable.
However Invoke_2 is erroring out.
Thanks
Edited by: user8645981 on Feb 5, 2010 2:44 AM

Similar Messages

  • How to do the paging while reading from the file !!!

    I've able to display the contents of the file in my jsp as a tabular form. I want to apply the paging concept in my jsp page. As i did in my database project there i's sending the next value as a parameter and it works.
    But when i retrieving the value from the file then i'm not able to get particular values anyhow i'm using the concepts of getLineNumber() but unable to get the previous one worked. I want to diplay only the first 20 contents of the file then, by clicking the next button he should be able to view the next 20 contents of the file. Please help me out for this problem. If possible send me the codes too it'll very helpful for me.
    in advance thanks....

    I hope the following code will help u.
    If your bean is:
    public class yourBean
    private int startIndex ;
    private int pageSize ;
    private int endIndex ;
    public void useBean()
    startIndex = 0;
    pageSize = 10;
    endIndex = pageSize;
    public setters and getters for each of the above.
    In servlet :
    doGet/doPost:
    yourBean uBean =
    (yourBean)sess.getAttribute("urBean");
    int sIndex = uBean.getStartIndex();
    int eIndex = uBean.getEndIndex();
    int pSize = uBean.getPageSize();
    if (sIndex = 0)
    //means first time
    dont do anything
    if ((sIndex >0)&&(sIndex <
    uBean.getRecords().size())))
    eIndex = sIndex + pSize - 1;
    sIndex = eIndex;
    //update Indexes to the bean
    uBean.setStartIndex(sIndex);
    uBean.setEndIndex(eIndex);
    sess.setAttribute("urBean",uBean);
    res.sendRedirect("yourJSP.jsp",req,res);
    In yourJSP.jsp:
    <jsp:useBean id="urBean" type="...." scope="session"
    />
    <%
    int sIndex = urBean.getStartIndex();
    int eIndex = urBean.getEndIndex();
    for (int
    i=sIndex;(i<=eIndex)&&(i<urBean.getRecords().size()))
    out.println(....);
    if (eIndex >= urBean.getRecords().size())
    out.println("NExt");
    else
    out.println("<a href=yourServlet>Next</a>");
    if (sIndex <= 0)
    out.println("Previous");
    else
    out.println("<a href=yourServlet>Previous</a>");
    %>

  • How do i do the replacement by reading from a file ?

    The multibyte representation in cloumn 2 in the input file is encoded in UTf8 format.
    I have the code to get the code point value from a multibyte representation.
    But i am not sure how to do the same when reading from a file.
    A better explanation of the requirement is like this,
    I have a java program ,i have a String="test";
    I traverse the string
    on encountering the character 't' i read from the input file ,the input file has the characters m to z listed in it, and it also has the UTF8 encoded multibyte representation in it.
    I then read from the file
    I search the file to get he character 't'
    on gettin the character 't' i get the corresponding multibyte representation from the input file
    Then i get the unicode code point value for the multibyte representation that i got from the input file.
    Lastly i replace the character 't' in the string with the unicode code point value 3046
    Hope the requirement is clear
    Please do help
    Any help would be very useful
    Thanking you
    khurram

    I am still not sure as to what your problem is. It would be better if you specify as to where the problem lies in the steps that you have stated and ask for a solution.
    agar yeh homework hai to log yehan par isse appreciate nahin karte. Acha hota agar requirements ki bajai problem discuss ki jati.

  • How do I stop Serial "VISA Read" from giving me packets instead of available bytes.

    Dear Labvillians,
    Highlight:
    How do I stop serial "VISA read" from giving me packets instead of bytes?
    Background:
    I have a system that serially publishes 14 byte packets on a semi-regular interval.
    At busy times, the producer of these these packets queues the data, effectively producing super-packets in multiples of 14 bytes sometimes as large as 8 packets (112 bytes).
    My protocol handler has been designed to processes bytes, packets or super-packets.
    My application now has multiple devices and the order of message processing is critical to correct functionality.
    My observation is that the VISA read waits until the end of a packet/ super-packet before passing the data to the application code. (See Plot Below)
    My expectation is that VISA read should give me available bytes, and not get too smart for itself and wait for a packet.
    I have observed this on PXI, Embedded PC, cFP and most recently, cRIO
    I have experimented with the cRIO's Scan interface rate, which helps with reducing the packet backlog but doesn't resolve to sub-packet byte read.
    I understand that one solution is to Write FPGA code to handle it and pass the bytes through R/T-FIFO, and there are some great examples on this site.
    Unfortunately this doesn't help with non FPGA devices.
    I have also dabbled in event based serial reads but it is diabolical on vxWorks devices.
    Any Help is appreciated
    iTm - Senior Systems Engineer
    uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT
    Solved!
    Go to Solution.

    Sometimes Talking to yourself is helpful.
    I hope this is a useful Nugget for someone in the future
    iTm - Senior Systems Engineer
    uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT

  • How can I add multiple email addresses  from spreadsheet into email?

    how can I add multiple email addresses  from spreadsheet into email?

    I have tried that, but the system reads the emails as one long email and I can't find any way of separating them - it ignores spaces, colons and I have also tried putting them through a word doc... still does not work. It works perfectly easily on a PC system!! ( I have just moved to a mac!)
    any ideas would be good
    thanks

  • How to open saved files using 'read from text file' function

    Hi everyone, I am having a hard time trying to solve the this particular problem ( probably because I am a newb to lanbview ). Anyway , I am able to save the acquired waveforms by using the 'Write to text file' icon. I did manually modify the block diagram of the 'Write to text file' icon and create the correct number of connector so as to make my program work. But now I have no idea on how to modify the block diagram of the 'Read from text file' block diagram to make my program 'open' my saved waveforms. Or i do not have to modify anything from the block diagram of the 'Read from text file'? Can anyone teach/help me connect up? Do i need the build array on the "open" page?
    Here are some screenshots on part of my program  
    let me know if you guys would need more information / screenshots thank you!
    Attachments:
    ss_save.jpg ‏94 KB
    ss_open.jpg ‏94 KB
    modified_writetotextfile.jpg ‏99 KB

    Ohmy, thanks altenbach. oh yeah i forgot about those sub VIs. will upload them now. Was rather demoralized after reading the comments and really struck me on how weak i'm at on labview really hope to get this done. But of course i have to study through and see how it works. Actually i am going to replace those 'signal generators sub vi' with ThoughtTechonology's sample code so i can obtain data waveforms real-time using Electrocardiography (ECG) ,Electromyography (EMG ) and Electroencephalography (EEG) hopefully i can find out how to connect the sample code.
    ( ps . cant connect it now unless my program is working otherwise labview will crash ) 
    ( p.s.s the encoder of my biofeedback trainer already acts as an DAQ so i wont need to place an DAQ assistant in my block diagram i suppose )
    The sample code of ThoughtTechnology is named as attachment.ashx.vi. too bad i cant use it and present it as my project
    Attachments:
    frequency detactor.vi ‏53 KB
    signal generator.vi ‏13 KB
    attachment.ashx.vi ‏40 KB

  • TS3899 How can i delete multiple e-mails from my iphone 4S. There are indicated more than 1500 e., but when i open the file there is indicated: no e-mail.

    How can i delete multiple e.mails from my iPhone 4 S. ? It shows the presence of more than 1500 e-mails. But when I try to open the account it shows that there a no e-mails. So i cannot delete them.

    I would disconnect the email on your phone...
    And reconnect again and if it still does that go on an actual computer, log on and delete the mails with ease...
    Hope this helps..it may just need to be refreshed...

  • How do I copy multiple email addresses from one email sent TO me into a new message?

    How do I copy multiple email addresses from an email sent to me into a new message?

    Are they in the body of the mail?
    Hold your finger down in that mail until the little blue bubble pops up. One of the options should be to select all. Choose that and all will be hilighted. then a pop up comes up to copy, choose that, open your destination and hold your finger down to get the paste dialogue.

  • How can I call multiple records(40) at same time as webservice ?

    Hi All
      My scenario is some thing like calling SOAP(Webservice) to Rfc(BAPI)
      Thing is how can i call multiple records at the same time using the SOAP
       adapter i.e i need to make a request to BAPI and in the BAPI response
       based on the fields, i need to send to different records....it is Sync call
    Can any explain me how to implement this scenario ?
    Regards
    Kiran lvs

    HI,
    Please see the below link
    http://help.sap.com/saphelp_nw04/helpdata/en/42/ed364cf8593eebe10000000a1553f7/content.htm
    Regards
    Chilla..

  • Reading from a file. How to ask the user for file name at run time????

    I have the code to read from a file but my problem is how to prompt the user for the file name at run time.
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.util.InputMismatchException;
    import java.util.Scanner;
    public class FileRead {
        public static void main(String args[]) {
            Scanner scan = null;
            File file = new File("Results.txt");
            String number;
            try {
                scan = new Scanner(file);
                while (scan.hasNext()){
                number = scan.next();
                System.out.println(number);}
            catch (FileNotFoundException ex1){
                System.out.println("No such file");
            catch (IllegalStateException ex2){
                System.out.println("Did you close the read by mistake");
            catch (InputMismatchException ex){
                System.out.println("File structure incorrect");
            finally{
                scan.close();}
    }Any hints would be greatly appreciated. Thank you in advance

    I have read through some of the tutorials that you have directed me too and they are very useful, thank you. however there are still a few things that i am not clear about. I am using net beans 5.0 I have placed a text file named Results.txt into the project at the root so the program can view it.
    When I use the code that you provided me with, does it matter where the file is, or will it look through everywhere on the hard drive to find a match?
    This code compiles but at run time it comes up with this error
    run-single:
    java.lang.NoClassDefFoundError: NamedFile
    Exception in thread "main"
    Java Result: 1
    BUILD SUCCESSFUL (total time: 3 seconds)
    import java.util.Scanner;
    import java.io.*;
    class NamedFileInput
      public static void main (String[] args) throws IOException
        int num, square;   
        // this Scanner is used to read what the user enters
        Scanner user = new Scanner( System.in );
        String  fileName;
        System.out.print("File Name: ");
        fileName = user.nextLine().trim();
        File file = new File( fileName );     // create a File object
        // this Scanner is used to read from the file
        Scanner scan = new Scanner( file );     
        while( scan.hasNextInt() )   // is there more data to process?
          num = scan.nextInt();
          square = num * num ;     
          System.out.println("The square of " + num + " is " + square);
    }his is the code that i used. It is the same as the code you posted for me (on chapter 23 I/O using Scanner and PrintStream) Sorry im just really stuck on this!!

  • How to read from a file line by line

    Hi
    I am new to using LabView and was wondering how I could read data from a text file one line at a time and display this data one line at a time as well. I tried looking through the Reading from Text File . vi example but that just seems to be reading and displaying everything together.
    Thanks
    -Karan

    Hi
    My aim is to read text line by line and to then go ahead and display the last 8 reaad lines of code to give the impression of text falling down a screen. I tested the first while loop and that seemed to work fine. However, when I encounter an EOF, I would like the text already read to keep making its way down the screen and keep inputting NULL characters into the array to simulate the effect of the text falling down the screen which is why I created the second while loop. I tried to input the NULL characters using a box for ENUM constants. However, I kept getting an error saying the data types do not match. What would I need to do? For the display I plan on putting indicators next to the 8 places where the text would be stored which I have not done so far.
    I am also attaching a copy of the error.
    Thanks
    -Karan
    Attachments:
    DisplayText.vi ‏40 KB
    Error.JPG ‏89 KB
    PictureOfBlock.JPG ‏120 KB

  • How to call multiple stored procedure from same DB Adapter

    Hi,
    I want to invoke 3 stored procedures from my message flow in BUS . I created a DB adapter and invoked 1 successfully . Now I don't to configure 2 other DB adapters for calling other 2 stored procedures . I want some how to be able to call the other 2 from the first DB adapter only . Somehow I need the flexibility to have procedure names as the operation names in 1 wsdl and be able to configure this in JDeveloper for this at time of DB adapter configuration . I am using 11G . Is it possible ?

    You can probably create a DB adapter with operation type selected as Execute Pure SQL and write SQL code to invoke the stored procedures depending on the procedure name (which you can get as one of the parameters of DB Adapter).
    However, Even if you were able to do it, the DB Adapter schemas are generated based on stored procedure parameter list and types. If you use Execute Pure SQL type of DB Adapter the schema will be generated based on the parameters which you are using in your custom SQL code within DB Adapter. Which means that if you want to add a new stored procedure as target which has a different name and different parameters then you will need to regenerate the DB adapter and update your custom SQL code. This also means that you will need to do regression testing interfaces to all stored procedures whenever there is any change in this DBAdapter.
    Now, my question is why do you want to invoke multiple stored procedures from same DB adapter?
    This is not a good way to design integration solutions and makes your services resistance to change as it will take more time to change and test.
    If all that you want is to have a web service which can have different operations for different stored procedures then you should create three business services and create a wrapper proxy service which has one operation for each stored procedure, within the proxy transform and call the correct backend service (you can use operational branch). This way you have a modular code where each module (read interface to one stored procedure) can be independently modified and tested.

  • How to loop through Multiple Excel sheets and load them into a SQL Table?

    Hi ,
    I am having 1 excel sheet with 3 worksheet.
    I have configured using For each loop container and ADO.net rowset enumerator.
    Every thing is fine, but after running my package I am getting below error
    [Excel Source [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There may
    be error messages posted before this with more information on why the AcquireConnection method call failed.
    Warning: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified
    in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
    [Connection manager "Excel Connection Manager"] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft Access Database Engine"  Hresult: 0x80004005  Description: "The Microsoft Access database engine cannot open or write to the file ''. It is already opened exclusively by
    another user, or you need permission to view and write its data.".
    Pleas suggest me the correct way of solving above issues.
    Thanks in advance :)
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

    Hi ,
    Please refer the below link for Looping multiple worksheet in a single SQL Table.
    http://www.singhvikash.in/2012/11/ssis-how-to-loop-through-multiple-excel.html
    Note:-If you using excel 2010 then you have to use EXCEL 12.0 .
    Above link explaining  step by step of Looping multiple worksheet in a single SQL Table.
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

  • Data reading and writing problem? how to set " Read from Measurment File express.vi​" 's readout datasize?

    Dear all,
    I want to use Labview to process a data.
    Now I have a array in a text file.
    this array is very very big. which is at least row*col = 6 * 100000;
    the column size always 6,
    but the row size is ramdom, some times is very big, like bigger than 65535,
    when I use "read from measurement file express.vi" to read this file, the array I could get always 6*5339, I don't know why. the column size is always 5339.
    and then I delete the 1st row of the array and then write into a txt file via "write measurement file express. vi", it takes a very long time. almost computer has no response. after a while, no file was creat to record the data.
    is there an efficient way to process such big data file and store the processed file into a new file
    thank you very much
    Jack
    Message Edited by weichengatech on 03-09-2006 12:00 AM

    Hello,
    There’s no real efficient way to read the file if you don’t
    know exactly how many rows of data you have. 
    Your going to just have to read a row at a time and add the results to
    the end of an array (granted for the clever programmers there are some more
    efficient ways to do this than just with ‘build array’).  I would start by asking you how much
    information you know about the file and what the exact structure of it is (i.e.
    is it a binary file, a tab delimited file, or a LVM file)?  Could you provide a screenshot of the code
    you are running? If you provide a little more information on the file structure
    we might be able to contribute some additional information.
    Look forward to hearing back from you-
    Travis M
    LabVIEW R&D
    National Instruments

  • How to read from text file?

    I would like to read data (frequencies) already written in a text file. I will need read these frequencies one at a time to set the function generator (as part of my data acquisition application), acquire data that is in turn written to a file and then go back and read the next frequency from the file to repeat the process again. I also have another idea of doing the same, which is read all the frequencies from the text file and populate a table and a frequency value is picked from the table each time to go through the process mentioned above.
    Can anyone suggest the following: (1) How to read from a text file, (2) What could be the most efficient way of solving my above problem.
    I am a new LabVIEW user and any help will be appreciated.

    Hi Research,
    Depending on the format of the data file, there are a few options for reading it.  If it is tab delimited, you may want to use the Read from SpreadSheet File VI which will read the file into an Array.  You can then use the Index Array VI to pull out individual entries.  If the files is ASCII but not tab delimited, you could use the regular Open File and Read File VIs.  You can either read the file out piece by piece, or read the entire file into a string and then use the Match Pattern VI to parse out the different elements (there are actually many ways to do this - check out the Strings subpalette). 
    Since you're new to LabVIEW, you may want to check out these resources:
    Three Hour Introduction to LabVIEW
    Six Hour Introduction to LabVIEW
    Getting Started with LabVIEW
    I hope this helps!  Let us know if you have more questions,
    Megan B.
    National Instruments

Maybe you are looking for

  • Imaging a dual boot system - Windows and Linux

    Using Zenworks 7, I have tried several experiments and all of them seem to fail. If I do any kind of Windows install, then make a image, then restore the image, it works just fine. However, if I also install Linux, and use the Linux multiboot menu, a

  • Launchd, Startup Item crud - -what am I doing wrong?

    So, I have a startup item which works when I type sudo SystemStarter start MayaFlexlm Works great. Spawns flexlm, a daemon that listens for incoming connections for licensing. Trouble is, it does not automatically start on reboot. I always have to ty

  • Table for packing list

    Hi, Can any one send me table for the packing list or in which table i can find the packing list. Is that i need to check application tables. or infromation system table. Rudra

  • How can I float widgets over my desk top?

    Hi: I am working on a Power Mac Tower running 10.8 I would like to see my widgets floating over my desktop reather then sliding in from the side over a very ungly backgound. How can I get ride of this background? I can float my widgets on my other co

  • Two Apps Suddenly Are Unable to Load Data

    Hello, This problem may or may not be from LightSwitch.  I have two apps on Azure websites, with Azure DBs.  One has been working great since deployment, about 10 months ago.  The other has been working well since Nov.  As of today, both are unable t