Text file numerical data in columns (spaces between colums) to graph after averaging each 500 columns values.ple​ase help.

i have a text file with numerical data in three columns,(first i need to skip the few lines of text within the file above the three column of data values)then i need to convert the numerical values above "-999" to zero,then take the average of each 500 values in the first column (second and third colum needs the same operation separately),thus found average values are to be stored into a text file and finally plotted in a graph separately. Please help.Its apart of my project work.
Solved!
Go to Solution.
Attachments:
data file.txt ‏715 KB

i have a text file with numerical data in three columns,(first i need to skip the few lines of text within the file above the three column of data values)then i need to convert the numerical values above "-999" to zero,then take the average of each 500 values in the first column (second and third colum needs the same operation separately),thus found average values are to be stored into a text file and finally plotted in a graph separately.
" i am attaching the code tht i hv done so far, its for reading and plotting the numerical data from text, but its not working :-( "
Attachments:
read from text and plot.vi ‏26 KB
sample input.txt ‏1 KB
final input to be read and plot.txt ‏345 KB

Similar Messages

  • EXTRACTing to TEXT file in Data Warehouse - Simple doubts!

    Hi Experts,
    Pls. clarify my simple doubts, in data EXTRACTing prog.,(data extract from SAP to text file in Application server, prog. runs in back ground)
    For the Dataware house mapping, I hv been asked to make the following changes,
    1) Presently, there is NO column headings in Text file, so I need to add the column Headings - How to get it done?
    2) presently, its NOT tab deliminated, so, I need to make it to TAB deliminated- How to achieve it?
    I am here paste some piece of code, so that U will get understand well.
    PERFORM open_dataset_zdata_whouse_04.
        DESCRIBE FIELD i_tab LENGTH tfr_length IN BYTE MODE.
        LOOP AT i_itab.
          TRANSFER i_itab TO transfer_file1 LENGTH tfr_length.
        ENDLOOP.
        CLOSE DATASET transfer_file1.
    ThaNQ.

    See the below code :
    parameters: d1 type localfile default
    '/usr/sap/TST/SYS/Test.txt'.
    data: begin of itab occurs 0,
          field1(20) type c,
          field2(20) type c,
          field3(20) type c,
          end of itab.
    data: str type string.
    constants: con_tab type x value '09'.
    if you have a newer version, then you can use this
    instead.
    *constants:
       con_tab  type c value
    cl_abap_char_utilities=>HORIZONTAL_TAB.
    start-of-selection.
    itab-field1 = 'ABC'.
    itab-field2 = 'DEF'.
    itab-field3 = 'GHI'.
    append itab.
    itab-field1 = '123'.
    itab-field2 = '456'.
    itab-field3 = '789'.
    append itab.
      open dataset d1 for output in text mode.
      loop at itab.
        translate itab using ' # '.
        concatenate itab-field1 itab-field2 itab-field2
    into str
                      separated by con_tab.
        translate str using ' # '.
        transfer str to d1.
      endloop.
      close dataset d1.
    above code for tab delimited.
    for heading then you can write simple logic in the loop of internal table
    loop at itab.
    if sy-tabix = 1'
    move heading data to file.
    endif.
    endloop.
    Thanks
    Seshu

  • How do I combine text with numerical data in an array?

    I an acquiring analog data in real time, and I am able to create, output, and save the data, but I would like to place comments next to specific measurements. How do I do that in Labview 7.0 Express? I can place numbers at in a column next to my measurements, but i cannot cobine text and numbers into one array to save and read with excel... Thank you!
    theukranian

    theukranian,
    Convert the numeric data to a string before saving it.
    dmourer

  • How to create a text file with data.

    Hi,
    I am writing java code for testing an application, some times test can failed in some cases, I want to display an error message in text file. To that I written the code as like,
    BufferedWriter bout;
    bout =new BufferedWriter(new FileWriter("test.txt"));
    String str=”Your input data is not match with pattern”
    bout.write(str);but here it is creating a text file “ test” without any data in it.
    Can any body help that to execute the program properly
    Regards
    Buntty

    sabre150 wrote:
    JoachimSauer wrote:
    You didn't close your BufferedWriter. Since it's buffered it probably didn't write anything to the underlying file.
    Generally you must close every Writer/OutputStream that you no longer use or it won't be written reliably.It's not quite as simple as that. If you have a chain of Writers / OutputStreams then you only have to close() the outer most one since each is responsible for closing any Writer/OutputStream that it wraps. If you do decide to close them individually (a bad idea but people do do it) then you MUST close them starting from the outer most one and working to the most inner one or you will not guarantee to flush any buffered content.Of course. I might have used a misleading phrasing here. What I meant is "Every time you are done with a Writer, you must close it" and not "You must close *every* Writer that you used". Thanks for the clarification.

  • Text file contains data separated by pipe symbol read the data and saved in

    Hi ,
    This is Sreedhar, i am new to java. my query is Report its in text file format it contains data like GLNO,name ,amount. All fields are separated by pipe(|) symbol. I would like to read that
    data and saved into the database. Please anyone can help me.

    thx Ottobonn.
    Scanner is very usefull with string operation like in my problem..but i want try to find java.util.Scanner in j2me, i can't found this class...:(
    so, may be i can't use this class in j2me...
    i new in java, so i try myself to code the simple method for my problem,
    may be anyone can make this class more simple than my coding....:)
    public StringPipe(String _msg){
            String message = _msg;
            int pipe = 0;
            int lengthmessage = message.length();
            int lengthMsgresult = 0;
            while(lengthMsgresult<=lengthmessage){
                String msg = null;
                int pipeX = message.indexOf("|");
                if(pipeX==-1){
                    msg = message;
                else{
                    msg = message.substring(pipe, pipeX);
                    message = message.substring(pipeX+1, message.length());
                    lengthMsgresult += msg.length();  
                // the string seperated by pipe
                System.out.println("msg = " + msg);
                if(pipeX==-1){
                   break;
    }thx...

  • Text File Data not Displaying completely

    Hi All,
    Have one issue. The program correctly extracts the data & export to Excel. All column /field data's are dispalying.However while saving this data in a text file in Aplications server file path, though all column/ field data are extracting bit it is not displaying complete column/field data's i.e last 3 or 4 column data's are not displaying after 257 character space  (but actually it extracts data.It is just not dispalying while i am checking text file via AL11).
    What could be the reason of not dipslaying the all column/filed values in text file wherea as while exporting to excel it is displaying? is there any character length constraint for text file?
    Thanks

    >
    Debabrata wrote:
    > What could be the reason of not dipslaying the all column/filed values in text file wherea as while exporting to excel it is displaying? is there any character length constraint for text file?
    There is no restriction on the file size which you can upload on the app server. AL11 is nothing but a report program & there is a limitation on the max number of characters displayed on the page.
    BR,
    Suhas

  • Read and average n data from text file

    I acquire numeric data from the oscilloscope [reading a waveform] that is stored in one column in a text file.
    I need to read in selectable amount of data points to average/plot them.
    So basically I wanna have a text file with millions of data points but I wanna plot say only every 1000. data point. I have tried many things I found here on the forum but as I am new to LabView, none of them really worked.
    Does anybody have a suggestion.
    Thanks.
    Solved!
    Go to Solution.

    Hi,
    among others I have tried to build the VI below but somehow I cannot get to the desired solution because according to the indicators it always stops after the first loop.
    Can you have a look please?
    Thanks.
    Attachments:
    read_and_average.vi ‏13 KB

  • How to get summary columns in delimited text file

    How to get summary columns in delimited text file
    I am trying to generate a delimited text file output with delimited_hdr = no.The report is a Group above report with summary columns at the bottom.In the text file the headers are not getting repeated & thats ok.The problem is the summary data is getting repeated for each row of data.Is there a way where i will get all the data & summary data will get displayed only once.I have to import the delimited text file in excel spreadsheet.

    Sorry there were a typos :
    When I used desformat=DELIMITEDDATA with desttype=FILE, I get error "unknown printer driver DELIMITEDDATA". When you look for help, DELIMITED is not even listed as one of the values for DESTFORMAT. But if you scroll down and look for DELIMITER it says , this works only in conjuction with DESTFORMAT=DELIMITED !!!!!!??!! This is in 9i.
    Has this thing worked for anybody ? Can anyone please tell if they were able to suppress the sumary columns or the parent columns of a master-detail data for that matter ?

  • How to add a SPACE as suffix to the last field in the downloaded text file?

    Hi Experts,
    By using GUI_DOWNLOAD am saving the data(only 3 fields) in a text file on my desk top.
    fine.
    example current record1 : 010001                      354.999            26.000
    here, after 3rd field 26.000, immediately the cursor is jumping to next line in text file.
    but, wanna a SINGLE SPACE after 26.000, say 26.000+space.
    tried with CONCATENATE, OFFSETTING, but no use(may b am using incorrectly)
    so, pls. suggect me, How to add a SPACE as suffix to the last field in the downloaded text file?
    thanq

    Sorry...Typo error...Too many in the last few days -:(
    Wanted to say AFTER -:)
    Do it like this...
    FIELD1 TYPE XXX,
    FIELD2 TYPE XXX,
    FIELD3 TYPE XXX,
    SPACE(1) TYPE C,
    That way you should end with...
    26.000+SPACE
    Greetings,
    Blag.

  • Deleting a column in a text file using LabVIEW

    Hello all,
    I'm trying to delete the first column of my tab delimited text file using LabVIEW and then save it under the same file name.  Can someone show me a quick way to perform this operation.  Is this even possible with LabVIEW?  Any help would be much appreciated.
    My purpose is to automate this operation for hundreds of daily text files containing data that needs processing.  I'm currently using LabVIEW 8.2.
    Thanks!
    -noviceLabVIEWuser

    If the file is relatively small:
    Read the file using the Read from Spreadsheet File VI to get 2D array.
    Remove the column from the 2D array.
    Write out new 2D array to new file using Write to Spreadsheet File VI.
    If the file is relatively large then you will likely run into memory issues. In this case you will need to read the file in chunks. You can decide how many lines to read at a time. Use a for-loop that's set to run for the number of chunks to read (based on the total number of lines and the number of lines you want to read at a time). Hint: Quotient & Remainder function. In the loop use the Read Text File VI to read your set number of lines. Convert the lines to a 2D array delete your column, and write out that chunk of data to the new file. Rinse and repeat.

  • Problem with Date - Text File Source and Oracle Target

    Hi All,
    I have a source data (text file) with date column in the format of 'MM/DD/YYYY'. My target is oracle. I am using the LKM FILE TO SQL and IKM SQL Control Append. When i execute this interface, i am getting an error as
    7000 : null : com.sunopsis.jdbc.driver.file.b.i
    com.sunopsis.jdbc.driver.file.b.i
    at com.sunopsis.jdbc.driver.file.b.f.getColumnClassName(f.java)
    at the Load Data step.
    How to load date columns from text file to oracle tables? Please help me in resolving this...
    Thanks in Advance,
    Ram Mohan T

    The worst solution is to define for your text file the date as a string and then to rebuild your date type in Oracle.
    something like
    convert(Substr(myfield,4,2)||Substr(myfield,1,2)||Substr(myfield,7,4) ,'MMDDYYYY')
    this is maybe the worst solution but it should work.
    Regards
    Brice

  • How do i create an ssis package that transforms data from a text file?

    I have a text file with data that in the following  format; i want this data in columns with the appropriate heading. Any ideas??
    Name – Tony
    Married – 2 children (Girl:3, Boy:1)
    AddressLine1: 10 Sunnhill Ave
    AddressLine2: Streatham
    AddressLine3: London
    PostCode:  SW18 7NN
    Name – Sarah
    Married – 2 children (Girl:3, Boy:1)
    AddressLine1: 10 High St
    AddressLine2: Streatham
    AddressLine3: London
    PostCode:  TW18 7NN
    Name – Tom
    Married – 2 children (Girl:3, Boy:1)
    AddressLine1: 10 Bridge Ave
    AddressLine2: Hammersmith
    AddressLine3: London
    PostCode:  TF20 8HN
    sukai

    I don't see how you're going to pivot that using SSIS.  I happen to know VBA pretty well, and I'll give you this Macro, which should do what you want.
    Sub CombineRows()
    lastRow = Range("A" & Rows.Count).End(xlUp).Row
    'set rowcount to row where you want 1st entry
    RowCount = 1
    NewRow = RowCount
    Start = False
    Do While RowCount <= lastRow
    If Start = False Then
    If Range("A" & RowCount) <> "" Then
    Start = True
    StartRow = RowCount
    End If
    Else
    If Range("A" & (RowCount + 1)) = "" Then
    ColCount = 1
    For MoveRow = StartRow To RowCount
    Cells(NewRow, ColCount) = Cells(MoveRow, "A")
    ColCount = ColCount + 1
    Next MoveRow
    NewRow = NewRow + 1
    Start = False
    End If
    End If
    RowCount = RowCount + 1
    Loop
    Rows(NewRow & ":" & lastRow).Delete
    End Sub
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Is it possible to output a report as a text file (.txt) in a Data Driven Subscription?

    Is it possible to create a Data Driven Subscription report as a text file output to a shared folder? Thanks.
    Kahlua

    Hi Vicky:
    Thank you for your reply. I changed the config file in SSRS and it works. I managed to generate a text file with Data Driven Subscription as the report output in a shared folder. However is it possible not to have the "double quote" wrapping around
    the text. Do I need to modify the config file to remove the "double quote" and how. Thanks. 
    Kahlua
    <Render>
    <Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering"/>
    <Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="False"/>
    <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"/>
    <Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer,Microsoft.ReportingServices.ImageRendering"/>
    <Extension Name="TAB" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">
    <OverrideNames>
    <Name Language="en-US">TAB (Tab Delimited Text File)</Name>
    </OverrideNames>
    <Configuration>
    <DeviceInfo>
    <FieldDelimiter xml:space="preserve">[TAB]</FieldDelimiter>
    <UseFormattedValues>True</UseFormattedValues>
    <NoHeader>True</NoHeader>
    <FileExtension>txt</FileExtension>
    <Qualifier xml:space="preserve"></Qualifier>
    <ExcelMode>False</ExcelMode>
    </DeviceInfo>
    </Configuration>
    </Extension>
    <Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RGDIRenderer,Microsoft.ReportingServices.ImageRendering" Visible="False" LogAllExecutionRequests="False"/>
    <Extension Name="HTML4.0" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="False" LogAllExecutionRequests="False"/>
    <Extension Name="MHTML" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering"/>
    <Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"/>
    <Extension Name="RPL" Type="Microsoft.ReportingServices.Rendering.RPLRendering.RPLRenderer,Microsoft.ReportingServices.RPLRendering" Visible="false" LogAllExecutionRequests="false"/>
    <Extension Name="IMAGE" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRenderer,Microsoft.ReportingServices.ImageRendering"/>
    <Extension Name="WORD" Type="Microsoft.ReportingServices.Rendering.WordRenderer.WordDocumentRenderer,Microsoft.ReportingServices.WordRendering"/>
    </Render>

  • Text File is not picking with data

    Hi Experts,
    I am doing file to file scenario without IR as file will be generated by the ECC system and places in SAP FTP App Server.
    My job is to pick up the file and send it to the Third Party Application Server.
    But when i am picking up the Text file the data in the file is converting into special characters like below format.
    ÅÁÄÅÙ@ððððððâÖÕÄÅçöôðð@@@@@@òððùð÷ñ÷ðñ%@@@@@@@@@@@@@@òððùð÷ñ÷%ÄÅãÁÉÓ@ðððð
    I have tested with other Application server with same file its working fine, but when i send the file from SAP FTP Appl server the data is converting in the above format.
    Right now when i open file zilla it is opening with 3 FTP Appl Server in that suppose lets say the FTP are APP1, APP2, APP3.
    1.When i send the file from APP1 through Transport Protocol NFS System the file is picking up and  placing successfully in the Third Party APP3 App Server fiolder but the data in the file is converting into special charaters.
    2.when i send the same file from APP2 through Transport Protocal FTP the file is picking up and placing successfully in the third party APP3 App server and here the same data is coming in the text file, there is no data conversion.
    I am not getting here, when i send the file from APP1 the data is converting but when i send the same file from APP2 App srever the data is posting correctly.
    And also i can give you one more info.. if i try with puting the Transport Protocal as FTP in APP1 then i am getting error in sender comm channel as 'log on attempt by User JOHN rejected' : contact your FTP server vendor.
    But i think for sending the file from SAP Appl Server we can use TP as NFS rather than FTP.
    And also i can give one more info: The Version is the ECC system is using the 4.6c for which there is no compatability for unicodes.
    Can anyone please advise what would be the wrong.
    Appreciate your inputs
    Thanks,
    Bhaskar

    Hi,
    Reason because file is not picked up.
    >'log on attempt by User JOHN rejected' : contact your FTP server vendor.
    clearly user/password for this FTP server or system is not correct. Get correct userid/password for your Application server where you are trying to poll.
    >The Version is the ECC system is using the 4.6c for which there is no compatability for unicodes
    File transfer is nothing to unicode here.
    Regards,
    Gourav

  • Trying to Export Details Column as Text Files

    In the bin, where all the information is columned regarding (on the right hand side) regarding duration/in/out... and all the other information...
    Is there a way to export only that information as a text file of any sort? I have a feature film's length worth of footage, and I'm trying to create a list of all the available shots we have for the crew, what master tape they were captured from, their in and out points, and all that...
    (As opposed to print screening the whole thing...)
    Any help would be just fantastic and save me an incredible amount of time (or confirm I have to spend an incredible amount of time)
    Thanks.

    Export "batch list" will give you a tab delimited text file that can be imported in to a spread sheet. Hide or add columns in the browser for further control.

Maybe you are looking for

  • Black BT Vision+ box keeps rebooting.

    Our box keeps switching itself off, then going through the start up procedure 3 or 4 times a night for quite a while now. This makes watching anything impossible and very frustrating. We had the update on 09 Sep but it is still rebooting! I have cont

  • How To get ESSBase 11.2 Client Only

    Hello Experts, I am trying to use essBases with BusinessObjects and for that I am loooking for Hyperion Essbase - System 11 Release X.X.X Client Windows Installer I am able to get version 9 directly but not able to get the same for 11 How to proceed

  • Much more cumbersome than CS2, several questions

    I just got back from a 10 day trip having shot about 2000 picutures and dowloading them to Aperture day by day. I had previously used Abobe CS2 but since I have a new Macbook Pro I decided to give Aperature a try. Now I'm not sure I won't regret the

  • When can photoshop cc be able to work on newer cameras like my Sony RX10?

    Is there going to be a fix for newer cameras? When will this happen.

  • How does processScope restore its state?

    Hi, when a process returns, the process scope is supposed to return to its original state. How does it do that? is it a deep copy? How does it handle mutable objects? also, how does the process scope work with the back button?