Text file - replace a pattern with part of the previous line? -SOLVED

Hello, I'm stuck with sed/awk/grep...
So I have a file with lines like this:
Nice bunch of words <STUFF> <STUFF> <IMPORTANT_DELIMITER_TYPE_1> <STUFF> <IMPORTANT_DELIMITER_TYPE_2> <STUFF>
Even Nicer bunch of Words <STUFF> <IMPORTANT_DELIMITER_TYPE_1> <STUFF> <STUFF> <STUFF>
Wonderful bunch of Words <STUFF> <STUFF> <STUFF><IMPORTANT_DELIMITER_TYPE_1><STUFF>
Then, I want to move the "important delimiters" to new lines (might be better not to do this in fact...)
Nice bunch of words <STUFF> <STUFF>
<IMPORTANT_DELIMITER_TYPE_1> <STUFF>
<IMPORTANT_DELIMITER_TYPE_2> <STUFF>
Even Nicer bunch of Words <STUFF>
<IMPORTANT_DELIMITER_TYPE_1> <STUFF> <STUFF> <STUFF>
Wonderful bunch of Words <STUFF> <STUFF> <STUFF>
<IMPORTANT_DELIMITER_TYPE_1><STUFF>
And finally, I want to replace the important delimiters with the content of the line they came from originally, up to the first angle bracket:
Nice bunch of words <STUFF> <STUFF>
Nice bunch of words <STUFF>
Nice bunch of words <STUFF>
Even Nicer bunch of Words <STUFF>
Even Nicer bunch of Words <STUFF> <STUFF> <STUFF>
Wonderful bunch of Words <STUFF> <STUFF> <STUFF>
Wonderful bunch of Words<STUFF>
How can I accomplish this using absolutely anything at all that doesn't involve too much manual effort (the file is about 30,000 lines of this stuff)
Thanks !
Last edited by darkbeanies (2013-09-01 19:18:29)

"<STUFF>" is not irrelevant. In your original example
Nice bunch of words <STUFF> <STUFF> <IMPORTANT_DELIMITER_TYPE_1> <STUFF> <IMPORTANT_DELIMITER_TYPE_2> <STUFF>
Even Nicer bunch of Words <STUFF> <IMPORTANT_DELIMITER_TYPE_1> <STUFF> <STUFF> <STUFF>
Wonderful bunch of Words <STUFF> <STUFF> <STUFF><IMPORTANT_DELIMITER_TYPE_1><STUFF>
you want to break the lines along the delimiters:
Nice bunch of words <STUFF> <STUFF>
<IMPORTANT_DELIMITER_TYPE_1> <STUFF>
<IMPORTANT_DELIMITER_TYPE_2> <STUFF>
Even Nicer bunch of Words <STUFF>
<IMPORTANT_DELIMITER_TYPE_1> <STUFF> <STUFF> <STUFF>
Wonderful bunch of Words <STUFF> <STUFF> <STUFF>
<IMPORTANT_DELIMITER_TYPE_1><STUFF>
and then you say that you want to replace the delimiters with the contents before the first angle bracket:
Nice bunch of words <STUFF> <STUFF>
Nice bunch of words <STUFF>
Nice bunch of words <STUFF>
Even Nicer bunch of Words <STUFF>
Even Nicer bunch of Words <STUFF> <STUFF> <STUFF>
Wonderful bunch of Words <STUFF> <STUFF> <STUFF>
Wonderful bunch of Words<STUFF>
but you have clearly made a distinction between the "nice bunch of words" and "<STUFF>", otherwise the output would have been
Nice bunch of words <STUFF> <STUFF>
Nice bunch of words <STUFF> <STUFF> <STUFF>
So, do you want everything up to  the first delimiter, or do you want everything up to <STUFF> in the replacement? If you only want the "nicer words" then you need some way to distinguish between them and "stuff" programmatically.
edit
Here's a trivial script that will split the lines along the delimiters and replace them with the contents of the line before the first delimiter:
#!/usr/bin/env python3
import re
import sys
def main(args=None):
for line in sys.stdin:
# Trim trailing newline.
line = line.rstrip('\n')
# Split by delimiters.
parts = re.split(r'<[^>]+>', line)
print(parts[0])
for p in parts[1:]:
print(parts[0] + p)
if __name__ == '__main__':
try:
main()
except (KeyboardInterrupt, BrokenPipeError):
pass
Usage
path/to/script < /path/to/input file
Last edited by Xyne (2013-09-01 18:34:55)

Similar Messages

  • Upload text file to oracle table with checking and aggregation

    Hi Friends,
    I am new to ODI.  I have encountered a problem which is specific to ODI 11G (11.1.1.6.3) to upload text file to oracle table with checking and aggregation.  Would you please teach me how to implement the following requirement in ODI 11G?
    Input text file a:
    staffCode, staffCat, status, data
    input text file b:
    staffCodeStart, staffCodeEnd, staffCat
    temp output oracle table c:
    staffCat, data
    output oracle table d:
    staffCat, data
    order:
    a.staffCode, a.staffCat, a.status
    filter:
    a.status = ‘active’
    join:
    a left outerjoin b on a.staffCode between b.staffCodeStart and b.staffCodeEnd
    insert temp table c:
    c.staffCat = if b.staffCat is not null then b.staffCat else a.staffCat
    c.data = a.data
    insert table d:
    if c.staffCat between 99 and 1000 then d.staffCat = c.staffCat, d.data = sum(c.data)
    else d.staffCat = c.staffCat, d.data = LAST(c.data)
    Any help on fixing this is highly appreciated. Thanks!!
    Thanks,
    Chris

    Dear Santy,
    Many thanks for your prompt reply.  May I have more information about the LAST or SUM step?
    I was successful to create and run the following interfaces p and q
    1. Drag text file a to a newly created interface panel p
    2. Filter text file a : a.status = ‘active’
    3. Lookup text file a to text file b : a.staffCode between b.staffCodeStart and b.staffCodeEnd
    4. Drag oracle temp table c to interface panel p
    5. Set c.staffCat : CASE WHEN b.staffCat IS NULL THEN a.staffCat ELSE b.staffCat END
    6. Set c.data : a.data
    7. Drag oracle temp table c to a newly created interface panel q
    8. Drag oracle table d to interface panel q
    9. Set UK to d.staffCat
    10. Set Distinct Rows to table d
    11. Set d.staffCat = c.staffCat
    12. Set d.data = SUM(c.data)
    However, the interface q should be more than that:
    If c.staffCat is between 99 and 1000, then d.data = the last record c.data; else d.data = sum(c.data)
    Would you please teach me how to do the LAST or SUM steps?  Moreover, can interface p and interface q be combined to one interface and do not use the temp table c?  Millions thanks!
    Regards,
    Chris

  • Downloading  pipe delimited text file on to desktop  with data in internal

    hi all,
    how  to download pipe delimited text file on to desktop  with data in internal
    table with an example plz.

    hi,
    u can use the FM GUI_DOWNLOAD.
    here is the sample code.
    *Internal table to hold the employee details
    DATA: it_details TYPE STANDARD TABLE OF x_details,
          wa_details TYPE x_details.
    *Internal table for file
    DATA: BEGIN OF  it_details_txt OCCURS 0,
            line(700),
          END OF  it_details_txt.
    *Employee details for the file
      CLEAR wa_details.
      LOOP AT it_details INTO wa_details.
        CLEAR it_details_txt.
        CONCATENATE
            wa_details-var1
            wa_details-var2
            wa_details-var3
            wa_details-var4
          INTO it_details_txt-line SEPARATED BY '|'.
        APPEND it_details_txt.
        CLEAR wa_details.
      ENDLOOP.
    *Download file in .TXT format to local desktop
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'data.txt'
          filetype                = 'ASC'
        TABLES
          data_tab                = it_details_txt
        EXCEPTIONS
          file_open_error         = 1
          file_write_error        = 2
          invalid_filesize        = 3
          invalid_type            = 4
          no_batch                = 5
          unknown_error           = 6
          invalid_table_width     = 7
          gui_refuse_filetransfer = 8
          customer_error          = 9
          no_authority            = 10
          OTHERS                  = 11.
      IF sy-subrc = 0.
        MESSAGE 'Data downloaded successfully' TYPE 'S'.
      ENDIF.

  • I just purchased the Mac Mini Server with the intention of replacing Lion Server with Lion for the first hard drive while installing Windows 7 thru Bootcamp on the second hard drive. Is it possible for me to do this? Thanks.

    I just purchased the Mac Mini Server with the intention of replacing Lion Server with Lion for the first hard drive while installing Windows 7 thru Bootcamp on the second hard drive. Is it possible for me to do this? Thanks.

    I would use Parallels or VMWare and use the second drive to hold the virtual machine. That way the VM only uses the space that it needs and you can still use the remainder of the drive for other things, not to mention that you would not need to reboot to run windows.
    Also Time Machine does not back up a boot camp partition.

  • How can I read text files from LAN if I only know the hostname?

    I'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
    <p>1. How can I read text files from LAN if I only know the hostname, or IP address?
    <p>2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.
    (ex. how can I read the 120th line?)
    <p>Please help!
    <p>sorry for the bad english

    I'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
    1. How can I read text files from LAN if I only know the hostname, or IP address?You need to know the URL of the file. You need to know the hostname, port, protocl and relative path.
    The hostname is server, not file.
    2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.Use the seek() to get to a random byte.
    (ex. how can I read the 120th line?)The only way to find the 120th line is to read the first 120 lines. You can use other file formats to find the 120th line without reading the whole file but to need to be able to detremine where the 120th line is

  • I'm creating an epk and I need to add a bio to the menu.  Can I import the text file or do I need to retype the bio somewhere?  What is the best way to proceed?

    I'm creating an epk and I need to add a bio to the menu.  Can I import the text file or do I need to retype the bio somewhere?  What is the best way to proceed?

    Electronic Press Kit.
    Usually in the form of video outtakes, movie trailers, cast and crew interviews. Basically, the stuff that gets bunged onto commercial DVDs as extras or ends up on late night TV "Making Of..." shows.
    To answer the OP, you want a button on the menu that leads to a still image, or series of them, set up as a slide show. You can copy/paste the text in DVD Studio and then add formatting via the Text menu. (Highlight the text and right click to access formatting controls). Or do it in a graphics application using the appropriate video image preset.

  • When I publish a movie using Captivate 6 I sometimes get a slide that is overlayed with part of a previous slide.  Does anyone know why this might be happening and what I can do to prevent it?

    When I publish a movie using Captivate 6 I sometimes get a slide that is overlayed with part of a previous slide.  Does anyone know why this might be happening and what I can do to prevent it?

    Which version of 6? Check the slide quality, if it is at Low, push it to High or Optimized. Then uncheck all compression settings in Preferences, Project, SWF Size and Quality.

  • How can FMS create a text file and write data into it in the Server application folders?

    Recently, I writed a programe about creating a text file and writing data into it in the server application folder. My code is as following:
               var fileObj = new File("/MyApp/test.txt");
               if( fileObj !=  null)
                      if(fileObj.open( "text", "append"))
                            fileObj.write( "                                                      ———— Chat Info Backup ————\r\n" );
                            fileObj.close( );
                            trace("Chat info backup document :" +  fileObj.name + " has been created successfully!");    
    But when I run it, FMS throw the error as following: File operation open failed  ;  TypeError: fileObj has no properties.
    Can you help me ? Thanks in advance.
    Supplement: The text file named test.txt doesn't exist before create the fileObj, an instance of File Class.

    Is MyApp the name of the application directory, or is it a child of the application directory? If myApp is the app name, just use test.txt as the path flag in the file constructor.

  • How to append to the previous line in a text?

    Hi,
    Can we append a previous line in a text? That is, my program goes to the next line of text in one loop but I need to go back to the previous line and append to it in the next loop. How can I do that? Is there a way to go to a specific line or previous line ( like \n for next line)?
    lakki

    1. Instead of thinking about "going backwards" consider delaying "going forwards". Don't write the newline character(s) until you are sure you're really done with a line.
    2. Instead of writing as you go along, put the output in a List<String>, so that you can edit it.

  • Excel upload with header in the first line

    Hi ,
    I have to upload a Excel sheet with data where the first line will be the Header .
    I am using the FM
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          I_LINE_HEADER        = 'X'
          I_TAB_RAW_DATA       = IT_TAB_RAW_DATA
          I_FILENAME           = P_FILE
        TABLES
          I_TAB_CONVERTED_DATA = IT_FS00_C
        EXCEPTIONS
          CONVERSION_FAILED    = 1
          OTHERS               = 2.
    But the data is not getting uploaded in the IT_FS00_c table.
    is there any other way to do it.
    thanks and regards,
    Vikki.

    Use the folllowing coding.....
        CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
             EXPORTING
                  filename                = p_file
                  i_begin_col             = 1
                  i_begin_row             = 2
                  i_end_col               = 7
                  i_end_row               = 9999
             TABLES
                  intern                  = t_alsm_tab
             EXCEPTIONS
                  inconsistent_parameters = 1
                  upload_ole              = 2
                  OTHERS                  = 3.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        SORT t_alsm_tab BY row col.
        LOOP AT t_alsm_tab INTO r_alsm_tab.
          AT END OF row.
            l_append = 'X'.
          ENDAT.
          IF r_alsm_tab-col = 1.
            r_input_tab-kokrs = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 2.
            r_input_tab-bukrs = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 3.
            r_input_tab-rprctr = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 4.
            r_input_tab-pline = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 5.
            r_input_tab-sdatst = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 6.
            r_input_tab-sdated = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 7.
            r_input_tab-kostl = r_alsm_tab-value.
          ENDIF.
          IF l_append = 'X'.
            APPEND r_input_tab TO t_input_tab.
            CLEAR : l_append , r_input_tab.
          ENDIF.
        ENDLOOP.
      ENDIF.

  • Add a bullet correctly below the text in the previous line.

    Hi All,
    I know how to add bullets in a word doc, but I dont know how to set the range.listformat.leftindent property to match this particular reuirement i.e
    1.1.1.   some text 
               (add a bullet below s in some)
    normal text
    (add a bullet below n) 
    i.e check where start of the text is , in the previous line add a bullet right below this text dynamically

    Hi Apoorva,
    I'm not quite sure what your uiquirement is, seems that you want to insert a sub-level bullet below the previous paragraph. You can use this method to create a sub-level bullet in the word document.
    Range.ListFormat.ListIndent
    For example:
    Application app = new Application();
    app.Visible = true;
    Document doc = app.Documents.Add();
    Paragraph para= doc.Content.Paragraphs.Add();
    Range rng = para.Range;
    para = doc.Content.Paragraphs.Add();
    para.Range.ListFormat.ApplyBulletDefault();
    para.Range.InsertBefore("test1");
    para = doc.Content.Paragraphs.Add();
    para.Range.ListFormat.ApplyBulletDefault();
    //para.Range.ListFormat.ListOutdent();
    para.Range.ListFormat.ListIndent();
    para.Range.InsertBefore("test2");
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Reading text file, Replace string, Write to new file....

    I'm kind a lost of on this problem. Using the BufferedReader class and BufferedWriter class, develop an application that reads lines of text from a file. Replace any occurrence of the word *?the?* with *?JAVAJAVA?* and change all characters to upper case before writing each line to a different text file named outfile.txt. Finally, have your application use the appropriate method on the File class to return the absolute path of the outfile.txt file and output the path to the screen.
    * Created December 10, 2008
    * @author Fausto Rivera
    * Colorado Technical University - Online Campus
    * IT271-0804B-02 Intermediate Object Oriented Programming II
    * Phase 2 IP
    * Instructor: Cheryl B Frederick
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    public class FRiveraReader {
          public static void main(String[] args) {
          // instantiated a new application object to initialize the application
          FRiveraReader application = new FRiveraReader();}
    //      application.getReadfr();  // call to openFile method
    //      application.doWritefr(); // call to readRecords method
    //      application.closeFile();  // call to closeFile method
    public FRiveraReader(){}
      public void getReadfr (String friveraInfile, String fr []){
       int i;
       File fileName = makeAbsoluteFilename(friveraInfile);
       try{
        BufferedReader reader = new BufferedReader(new FileReader(fileName));
        String line = reader.readLine();
         i=0;
          while (line != null) {
           fr[i] =line;
           line = reader.readLine();
        i++;
      reader.close();
    catch(IOException e) {
    System.out.println("Error with reading file:" + friveraInfile);
    }//end of getOrder method
    public void doWritefr(String friveraOutfile, String fw[]){//String name of file, String array to be written
    int i;
    File fileNameout = makeAbsoluteFilename(friveraOutfile);
    try {
    BufferedWriter writer = new BufferedWriter(new FileWriter (fileNameout));
      i=0;
      while (fw[i] != null) {
       writer.write(fw[i] + "%n"); //need delimiters between data in file;also, reader reads a line
       i++;
      writer.close();
    catch(FileNotFoundException e) {
    System.out.println("File not found");
    catch(IOException e) {
    System.out.println("Error with reading file:" + friveraOutfile);
    }//end of getOrder method
    private File makeAbsoluteFilename(String friveraOutfile)//these 2 classes used to resolve file name
            File file = new File(friveraOutfile);
            if(!file.isAbsolute()) {
                file = new File(friveraOutfile);
            return file;

    I have modified my code as far as being able to create a text file, write to string, and change to upper case. Now, how can I connected input to the output stream and then replace all the instances of the string "the" for the string "JAVAJAVA"? When the file is created, it goes into a loop writing the following:
    nJAVA.IO.BUFFEREDWRITER@19821F%nJAVA.IO.BUFFEREDWRITER@19821F%nJAVA.IO.BUFFEREDWRITER@19821F%nJAVA.IO.BUFFEREDWRITER@19821F%nJAVA.IO.BUFFEREDWRITER@19821F%nJAVA.IO.BUFFEREDWRITER@19821F%
    Here is my modified code
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    public class FRiveraReader {
    public FRiveraReader() {}
    private static final String inFile = "C:\\Documents and Settings\\Fausto Rivera\\My Documents\\NetBeansProjects\\Rivera_F_IT271_0804B_02_PH2_IP\\friverainfile.txt";//the path name of your file
      public void myReadfr (){
       try {
        BufferedReader reader = new BufferedReader(new FileReader(inFile));
        //String "JAVAJAVA" = String "the";
        System.out.println(inFile);
        String line = reader.readLine();
          while (reader != null) {
           line = reader.readLine();
      reader.close();
    catch(IOException e) {
    System.out.println("Error with reading file:" + inFile);
    }//end of myReadfr method
    public void myWritefr(){//String name of file, String array to be written
    File outFile = new File ("C:\\Documents and Settings\\Fausto Rivera\\My Documents\\NetBeansProjects\\Rivera_F_IT271_0804B_02_PH2_IP\\myoutFile.txt");
    try {
    BufferedWriter writer = new BufferedWriter(new FileWriter (outFile));
    String newline = writer.toString() .toUpperCase();
      while (writer != null) {
       writer.write(newline + "%n"); //need delimiters between data in file;also, reader reads a line
      writer.close();
    catch(FileNotFoundException e) {
    System.out.println("File not found");
    catch(IOException e) {
    System.out.println("Error writing file:" + outFile);
    }//end of getOrder method
    private File makeAbsoluteFilename(String myoutFile)//these 2 classes used to resolve file name
            File file = new File(myoutFile);
            if(!file.isAbsolute()) {
                file = new File(myoutFile);
            return file;
      }Edited by: FRiveraJr on Dec 17, 2008 12:10 PM

  • Opening a text file in a bundle with C++

    Hi folks! I'm working with bundles for the first time, and I'd like to know how to open a text file inside one with C++. What I have now is this:
    ifstream file = new ifstream(fileName.c_str());
    if (!file->is_open())
    return false;
    Where fileName is a std::string. This is the way I'm accustomed to opening files (I'm from a Windows development background -- don't hate me! ). Unfortunately, the is_open() test always fails.
    I know how to get the path of the bundle. Once I add on my data subdirectory and file name, the fileName variable ends up as this:
    /Users/sb/...project location.../Debug/MyProg.app/data/Dev Options.ini
    Should the path be different somehow? Thanks for any help!

    Your data folder most likely isn't directly inside the .app bundle. The first directory inside an .app bundle is named Contents. The article at the following URL should help you:
    http://www.meandmark.com/bundlespart1.html
    If you're going to use C++ streams to open files, you'll want to ignore the section on opening the file in Part 3 of the article. You'll want to read up on the Core Foundation CFURL functions. You'll want to use one of the functions that gives you a path to the text file that you can pass to a C++ file stream.

  • 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

  • Importing text file (delimited, fixed width) with MDM Import Manager?

    Hello all,
    According to the overview section of the import manager reference guide, it is possible to import from delimited text files (e.g. CSV).
    But when it comes to the details, text files are not mentioned anymore. I also found no option in the Import Manager.
    Could you tell me whether this is possible and - if it is - how?
    Thanks in advance!
    Kind regards,
    Dennis

    Hi Dennis,
    In order to import flat files into MDM do the following. This solution is specific to MS Windows:
    I. Set up ODBC for *.txt or *.csv files
    1. Open Data Sources (ODBC) interface:
    Start> Settings> Control Panel--> Administrative Tools -->Data Sources (ODBC).
    2. Select System DSN Tab in Data Sources (ODBC) interface.
    3. Click on [Add]. Select the Microsoft Text Driver. Click Finish.
    4. Write a Data Source Name
    5. Uncheck Use Current Directory to enable the [Select Directory…] button.
    6. Click on [Select directory…] to determine the source directory.
    7. Select the source file.
    8. Click [OK] and return to the ODBC Text Setup screen.
    9. Click [OK].
    10. Return to the ODBC Data Source Administrator dialog and click [OK].
    II. Importing from Flat file
    1. Run MDM Import Manager.
    2. Select ODBC from the Type drop-down field of the Connect To Source dialog.
    3. Enter the DSN name from the Setup ODBC Connection dialog above.
    4. Select the file name with extension (.csv or .txt) in the Tables panel of MDM Import Manager and the file content in the Records panel.
    Hope this solved your problem.Please mark helpful answers
    Regards,
    Santosh.

Maybe you are looking for

  • Can you help me with a Cost problem in an Order?

    Hello SAP experts, i have a question regarding orders and their costs if i go inside an order and i go to the menu then ->Goto->Costs->Analisys-> and then choose the layout ->Target/Actual Comparison, in this layout there is a column that says Total

  • Won't recognize my USB stick

    i recently bought my mac pro and i also bought a 4GB USB stick from office Depot, and every time i insert the stick in the port, nothing happens. i already tried to pull up the disk utility in application, but it is unrecognizable. what do i do?

  • Extending Portal Search

    I am looking to extending the Portal search facilities to allow for searching of our own bespoke content which is accessible from custom urls such as http://server:port/pls/portal/custompkg.disp_our_content?id=123 I had a brainwave that by adding a U

  • HT202213 how do I download my account to my Sony expire j

    how do I download my y to my Sony expire j

  • Does not accept my verbatim DVD's in lecture

    spit out my burned DVDs, not DVD movies purchased can someone help me ?