Splitting Files into Mulitple Output Files

Hi,
I have a File (1)  to File (*)  scenario.  
Both my input and output structures are the same
A  typical input XML example would be
<?xml version="1.0" encoding="utf-8"?>
<n0:FileInterfaceFCC xmlns:n0="http://kpr.com/sample">
<Item>                                       (  occurence  0....Unbound)
<Name>TestFCC</Name>   ( occurence 1 )
<Age>10</Age>                  ( occurence 1 )
</Item>
</n0:FileInterfaceFCC>
The output structure is the same.  My requirement now is that, i would like to have separate files for each difference in <name>  </name>.
How can i achieve the same.  What mapping principles should I use.
Thanks,
Abhishek

Hi,
In the mapping you map your name --> splitbyvalue(ValueChanged) --> to the root of the target message. Then do the mapping.
Then in the sender communicaiton channel put no. of records per message is 1.
So on each change in name your file sender communicaiton channel will take 1 message at a time. In the file reciever communication channel you put the mode as timestamp. So for each and every change in the name you will one file. This may increase your traffic in XI.
---Satish

Similar Messages

  • Read multiple files and save all into one output file(AGAIN)

    Hi, guys
    I need your help for reading data from multiple files and save the results into one output file. When files are selected from file chooser, my program read the data line by line , do some calculations and save the result into the output. I made an array to store input files and it seems to be working fine, but when it comes to SaveFile() function, issues NullPointException message.
    public class FileReduction1 extends JFrame implements ActionListener
       // GUI definition and layout
        /* ACTION PERFORMED */
        public void actionPerformed(ActionEvent event) {
            if (event.getActionCommand().equals("Open File")) getFileName();
        /* OPEN THE FILE */
        private void getFileName() {
            // Display file dialog so user can select file to open
         JFileChooser fileChooser = new JFileChooser();
         fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            fileChooser.setMultiSelectionEnabled(true);
         int result = fileChooser.showOpenDialog(this);
         // If cancel button selected return
         if (result == JFileChooser.CANCEL_OPTION) return;
            if (result == JFileChooser.APPROVE_OPTION)
             files = fileChooser.getSelectedFiles();
                textArea.setText("");
                if(files.length>0)
                    filelist="";
                    System.out.println("files length"+files.length);
                    for(int i=0;i<files.length;i++)
                         System.out.println(files.getName());
    filelist+=files[i].getName()+" ,";
    if (checkFileName(files[i]) )
    openButton.setEnabled(true);
    readButton.setEnabled(true);
    textArea.append("file "+files[i].getName()+"is a proper file"+"\n");
    readFile(files[i]);
    textfield.setText(filelist);
    else{JOptionPane.showMessageDialog(this,"Please select file(s)",
                    "Error 5: ",JOptionPane.ERROR_MESSAGE); }
         // Obtain selected file
    /* READ FILE */
    private void readFile(File fileName_in) {
    // Disable read button
    readButton.setEnabled(false);
    // Dimension data structure
         getNumberOfLines(fileName_in);
         data = new String[numLines][4];
         // Read file
         readTheFile(fileName_in);
         // Rnable open button
         openButton.setEnabled(true);
    /* GET NUMBER OF LINES */
    /* Get number of lines in file and prepare data structure. */
    private void getNumberOfLines(File fileName_in) {
    int counter = 0;
         // Open the file
         openFile(fileName_in);
         // Loop through file incrementing counter
         try {
         String line = fileInput.readLine();
         while (line != null) {
         counter++;
              System.out.println("(" + counter + ") " + line);
    line = fileInput.readLine();
         numLines = counter;
    closeFile(fileName_in);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile(fileName_in);
         System.exit(1);
    /* READ FILE */
    private void readTheFile(File fileName_in)
    // Open the file
    //int row=0;
    int col=0;
    openFile(fileName_in);
    System.out.println("Read the file");
    // Loop through file incrementing counter
    try
    String line = fileInput.readLine();
    while (line != null)
    boolean containsDoubles = false;
    double temp;
    String[] lineParts = line.split("\t");
    try
    for (col=0;col<lineParts.length;col++)
    temp=Double.parseDouble(lineParts[col]);
    data[row][col] = lineParts[col];
    containsDoubles = true;
    System.out.print("data["+row+"]["+col+"]="+lineParts[col]+" ");
    } catch (Exception e) {row=0; col=0; temp=0.0;}
    if (containsDoubles){ row++;}
    System.out.println();
    line = fileInput.readLine();
    catch(IOException ioException)
    JOptionPane.showMessageDialog(this,"Error reading File", "Error 5: ",JOptionPane.ERROR_MESSAGE);
    closeFile(fileName_in);
    System.exit(1);
    //System.out.println("length"+data.length);
    closeFile(fileName_in);
    process(fileName_in);
    /* CHECK FILE NAME */
    /* Return flase if selected file is a directory, access is denied or is
    not a file name. */
    private boolean checkFileName(File fileName_in) {
         if (fileName_in.exists()) {
         if (fileName_in.canRead()) {
              if (fileName_in.isFile()) return(true);
              else JOptionPane.showMessageDialog(null,
                        "ERROR 3: File is a directory");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 2: Access denied");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 1: No such file!");
         // Return
         return(false);
    /* OPEN FILE */
    private void openFile(File fileName_in) {
         try {
         // Open file
         FileReader file = new FileReader(fileName_in);
         fileInput = new BufferedReader(file);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
         textArea.append("OPEN FILE\n---------\n");
         textArea.append(fileName_in.getPath());
         textArea.append("\n");
         //System.out.println("File opened successfully");
    /* CLOSE FILE */
    private void closeFile(File fileName_in) {
    if (fileInput != null) {
         try {
              fileInput.close();
         catch (IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File closed");
    private void process(File fileName_in) {
    //getNumberOfLines();
         //data = new String[numLines][3];
         // Read file
    double temp,temp1;
         //readTheFile();
    //System.out.println("row:"+row);
    //int number=data.length;
    //System.out.println(number);
    for (int i=0; i<row; i++)
    temp=Double.parseDouble(data[i][1]);
    sumx+=temp;
    temp1=Double.parseDouble(data[i][3]);
    sumy+=temp1;
    multixy+=(temp*temp1);
    square_x_sum+=(temp*temp);
    square_y_sum+=(temp1*temp1);
    //System.out.println("Sum(x)="+sumx);
    double tempup=(row*multixy)-(sumx*sumy);
    double tempdown=(row*square_x_sum)-(sumx*sumx);
    slope=tempup/tempdown;
    double tempbup=sumy-(slope*sumx);
    intb=tempbup/row;
    double tempside=(row*square_y_sum)-(sumy*sumy);
    double cordown=Math.sqrt(tempdown*tempside);
    corr=tempup/cordown;
    r_sqrt=corr*corr;
         textArea.append("Data for file"+ fileName_in.getName()+" have been processed successfully.");
         textArea.append("\n");
         textArea.append("Please enter output file name including extension.");
    System.out.println("number"+row);
    System.out.println("slope(m)="+slope);
    System.out.println("intecept b="+intb);
    System.out.println("correlation="+corr);
    System.out.println("correlation="+r_sqrt);
    saveFile();
    private void saveFile()
    textArea.append("SAVE FILE\n---------\n");
    if (openFile1())
         try {
              outputToFile();
    catch (IOException ioException) {
              JOptionPane.showMessageDialog(this,"Error Writing to File",
                   "Error",JOptionPane.ERROR_MESSAGE);
    private boolean openFile1 ()
         // search for the file path
    StringBuffer stringpath;
    title=textfield1.getText().trim();
    int temp=fileName_in.getName().length();
    int temp_path=fileName_in.getPath().length();
    int startd=(temp_path-temp);
    stringpath=new StringBuffer(fileName_in.getPath());
    stringpath.delete(startd, temp_path+1);
    //System.out.println("file-path="+temp_path);
    //System.out.println("length-file="+temp);
    path=stringpath.toString();
    fileName_out = new File(path, title);
    //System.out.println(file_out.getName());
    if (fileName_out==null || fileName_out.getName().equals(""))
         JOptionPane.showMessageDialog(this,"Invalid File name",
                   "Invalid File name",JOptionPane.ERROR_MESSAGE);
         return(false);
         else
    try
    boolean created = fileName_out.createNewFile();
    if(created)
    fileOutput = new PrintWriter(new FileWriter(fileName_out));
    fileOutput.println("File Name"+"\t"+"Slope(m)"+"\t"+"y-intercept(b)"+"\t"+"Coefficient(r)"+"\t"+"Correlation(R-Squared)");
    return(true);
    else
    fileOutput = new PrintWriter(new FileWriter(fileName_out,true));
    return(true);
    catch (IOException exc)
    JOptionPane.showMessageDialog(this,"Please enter the file name","Error",JOptionPane.ERROR_MESSAGE);
    return(false);
    private void outputToFile() throws IOException
    // Initial output
         textArea.append("File name = " + fileName_out + "\n");
         // Test if data exists
         if (data != null)
         fileOutput.println(fileName_in.getName() +"\t"+ slope+"\t"+intb+"\t"+corr+"\t"+r_sqrt);
    textArea.append("File output complete\n\n");
         else
    textArea.append("No data\n\n");
         // End by closing file
    initialcomp();
         fileOutput.close();
    private void initialcomp()
    slope=0.0;
    intb=0.0;
    corr=0.0;
    r_sqrt=0.0;
    sumx=0.0; sumy=0.0; multixy=0.0; square_x_sum=0.0; square_y_sum=0.0;
    for(int i=0;i<data.length;i++)
    for(int j=0;j<data[i].length;j++)
    data[i][j]=null;
    /* MAIN METHOD */
    public static void main(String[] args) throws IOException
         // Create instance of class FileChooser
         FileReduction1 newFile = new FileReduction1("File Reduction Program");
         // Make window vissible
         newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         newFile.setSize(500,400);
    newFile.setVisible(true);
    Sorry about the long lines.
    As you can see, all input files saved in array called files, however when OpenFile1() function is called, it take input (fileName_in) as a single file not an array. I'm assuming this causes the exception.
    When there's muptiple inputs, program should take each file from getFileName() to outputToFile() sequentially.
    Does anybody have an idea to solve this?
    Thanks a lot!!

    you naming convention is confussing. you should follows Java naming convention..you have a getXXX but decalred the return type as "void"...get usully means to return something...
    your code is doing too much..and hard to follows..
    1. get the selected files
    for each selected file
    process the file and return the result
    write out the result.
    /** close the precious resource */
    public void closeResource(Reader in){
        if (in != null){
            try{ in.close(); }
            catch (Exception e){}
    /** get the total number of line in a file */
    public int getLineCount(File file) throws IOException{
        BufferedReader in = null;
        int lineCount = 0;
        try{
            in = new BufferedReader(new FileReader(file));
            while ((in.readLine() != null)
                lineCount++;
            return lineCount;
        finally{ closeResource (in);  }
    /** read the file */
    public void processFile(File inFile, File outFile) throws IOException{
        BufferedReader in = null;
        StringBuffer result = new StringBuffer();
        try{
            in = new BufferedReader(new FileReader(inFile));
            String line = null;
            while ((in.readLine() != null){
                .. do something with the line
                result.append(....);
            writeToFile(outFile, result.toString());
        finally{ closeResource (in);  }
    public void writeToFile(File outFile, String result) throws IOException{
        PrintWriter out = null;
        try{
            out = new PrintWriter(new FileWriter(outFile, true));  // true for appending to the end of the file
            out.println(result);
        finally{  if (out != null){ try{ out.close(); } catch (Exception e){} }  }
    }

  • Splitting file into equal sized subfiles

    My code is supposed to read in a file, and split it into 5 equal sized files. However, at the moment it is only splitting it by paragraphs, skipping a newline character, for example in the text below, the line after "...liked...mainly because it doesn't feel like a studio horror film.":
    "But it's a leaner, meaner animal than Wes Craven's original film. The characters are more believable, the mutants are scarier, and the whole thing is incredibly visceral! This is the first studio horror film in years that I've liked...mainly because it doesn't feel like a studio horror film.
    Funny side note: A girl next to me in the theater was silently weeping through the last half of the movie. Guess it made an impression."
    Here is my code:
    import java.io.*;
    import cs1ll4.*;
    import java.util.*;
    public class FileSplitter
    public static void main (String [] args)
    try
    File file = new File(Input.readString("Input Filename:"));
    FileReader fileReader = new FileReader(file);
    BufferedReader in = new BufferedReader(fileReader);
    final int numOutputFiles = 5;
    //final int numOutputFiles = Input.readInt("How many files?:");
    int loopCounter=0;
    Object currentOutputFile = null;
    String s = in.readLine();
    PrintWriter out0 = new PrintWriter(new FileOutputStream(Input.readString("Output Filename:")));
    PrintWriter out1 = new PrintWriter(new FileOutputStream(Input.readString("Output Filename:")));
    PrintWriter out2 = new PrintWriter(new FileOutputStream(Input.readString("Output Filename:")));
    PrintWriter out3 = new PrintWriter(new FileOutputStream(Input.readString("Output Filename:")));
    PrintWriter out4 = new PrintWriter(new FileOutputStream(Input.readString("Output Filename:")));
    PrintWriter [] fileHandles = {out0, out1, out2, out3, out4};
    while (s != null)
    loopCounter++;
    if (loopCounter == numOutputFiles)
    loopCounter=1;
    fileHandles[loopCounter-1].println(s);
    s = in.readLine(); //code
    out0.close();
    out1.close();
    out2.close();
    out3.close();
    out4.close();
    catch (Exception ex) { ex.printStackTrace(); }
    }I would also like to specify the number of files which I want to split a file into, without being limited to five files...after I solve my bigger problem above, if you have any suggestions...Thanks

    I have got new code which reads in a file character by character, and in it I calculate the size which I want each separate file to be. But I still dont know how to get it to print each chunk of the input file to 5 equally sized output files. (Or how to get it to print to any number of equally sized output files, specified by the program user)
    import java.io.*;
    import cs1ll4.*;
    import java.util.*;
    public class FileSplitter1
    public static void main (String [] args)
    try
    //open input stream
    File inputFile = new File(Input.readString("Input Filename:"));
    InputStream inStream = new FileInputStream(inputFile);
    InputStreamReader inreader = new InputStreamReader(inStream, "8859_1");
    BufferedReader reader = new BufferedReader(inreader);
    int numOutputFiles = 5;
    //final int numOutputFiles = Input.readInt("How many files?:");
    int loopCounter=0;
    Object currentOutputFile = null;
    //open output stream
    OutputStream fout= new FileOutputStream(Input.readString("Output Filename:"));
    OutputStream bout= new BufferedOutputStream(fout);
    OutputStreamWriter out = new OutputStreamWriter(bout, "8859_1");
    OutputStream fout1= new FileOutputStream(Input.readString("Output Filename:"));
    OutputStream bout1= new BufferedOutputStream(fout1);
    OutputStreamWriter out1 = new OutputStreamWriter(bout1, "8859_1");
    OutputStream fout2= new FileOutputStream(Input.readString("Output Filename:"));
    OutputStream bout2= new BufferedOutputStream(fout2);
    OutputStreamWriter out2 = new OutputStreamWriter(bout2, "8859_1");
    OutputStream fout3= new FileOutputStream(Input.readString("Output Filename:"));
    OutputStream bout3= new BufferedOutputStream(fout3);
    OutputStreamWriter out3 = new OutputStreamWriter(bout3, "8859_1");
    OutputStream fout4= new FileOutputStream(Input.readString("Output Filename:"));
    OutputStream bout4= new BufferedOutputStream(fout4);
    OutputStreamWriter out4 = new OutputStreamWriter(bout4, "8859_1");
    OutputStreamWriter [] fileHandles = {out, out1, out2, out3, out4};
    int fileLength = (int)inputFile.length();
    int newFileSize = fileLength/numOutputFiles;
    byte [] byteArray = new byte [fileLength];
    System.out.println(newFileSize);
    //read data in and display them
    inStream.read (byteArray);
    //initialise the array of bytes
    for (int a = 0; a < fileLength; a++)
            char c = ((char)byteArray[a]);
          //loopCounter++;
         //if (loopCounter == numOutputFiles)
         //loopCounter=1;
         //fileHandles[loopCounter-1].write(c);
    out.close();
    out1.close();
    out2.close();
    out3.close();
    out4.close();
    catch (Exception ex) { ex.printStackTrace(); }
    }

  • How to merge five different xml input files into three output files

    Hi All,
    Can you please explain me to merge 5 different xml input files into 3 output xml files.
    I'm looking forward for ur suggestions...
    Thanks
    Pullarao

    HI
    Please see the below links
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm - Collection of IDoc to Single File
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/831620a4f1044dba38b370f77835cc/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/62/dcef46dae42142911c8f14ca7a7c39/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/de/766840bf0cbf49e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cb/15163ff8519a06e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm
    Many other examples can be found under the following link at help.sap.com
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    And some weblogs
    https://weblogs.sdn.sap.com/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken]
    /people/siva.maranani/blog/2005/05/22/schedule-your-bpm *****
    /people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm
    /people/michal.krawczyk2/blog/2005/06/11/xi-how-to-retrieve-messageid-from-a-bpm
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    /people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi
    /people/michal.krawczyk2/blog/2005/09/04/xi-do-you-realy-enjoy-clicking-and-waiting-while-tracing-bpm-steps *****
    /people/udo.martens/blog/2005/09/30/one-logical-system-name-for-serveral-bpm-acknowledgements *****
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    /people/kannan.kailas/blog/2005/12/07/posting-multiple-idocs-with-acknowledgement
    Also have a look at these seminars,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/daea5871-0701-0010-12aa-c3a0c6d54e02
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/e8515171-0701-0010-be98-e37bec4706cc
    <b>BPM CollectPattern..</b>
    http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm
    Thanks !
    Regards
    Abhishek Agrahari
    Questions are welcome here!!
    <b>Also mark helpful answers by rewarding points </b>

  • How to adjust splitted lines into one line in Text file?

    Hi Guys,
    I have a text file with 3 fields(comma separated): GLCode (Number), Desc1 (Char), Desc2(Char) and need to load it into BW.
    My Text file looks like:
    1011.00,"Mejor PC Infrastructure","This line is ok."
    1012.00,"Telephone Equipment $","This line ends in next line.   
    1)Need to change the equipment immediately.
    2)Take immediate action"
    1013.00,"V1 Computer Server Infrastructure # Equip","For purchases
    of components that make up the company's network, such as servers, hubs, routers etc."
    1014.00,"Flash Drive","Need to provide all IT Developer"
    This is how file looks like. Now I need the followings:
    1. Need to remove the space and need to adjust the splitted line into one. Say here
    line/record 2 is splitted into 3 lines and need to adjust in 1 line.
    2. In Line 5 (Record 3) data splitted into 2 lines and need to make 1 line.
    3. Need to remove bad characters.
    Could someone help me please how to proceed ?
    Regards,

    Not quite correct by my testing.  Try:
    $i=0
    Get-Content .\test.txt | ForEach {
    If ($i%2){
    ("$Keep $($_)").Trim()
    }Else{
    $keep=$_
    }$i++
    Good catch!
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Split records into two files based on lookup table

    Hi,
    I'm new to ODI and want to know on how I could split records into two files based on a value in one of the columns in the table.
    Example:
    Table:
    my columns are
    account name country
    100 USA
    200 USA
    300 UK
    200 AUS
    So from the 4 records I maintain list of countries in a lookup file and split the records into 2 different files based on values in the file...
    Say I have records AUS and UK in my lookup file...
    So my ODI routine should send all records with country into file1 and rest to file2.
    So from above records
    File1:
    300 UK
    200 AUS
    File2:
    100 USA
    200 USA
    Can you help me how to achieve this?
    Thanks,
    Sam

    1. where and how do i create filter to restrict countries? In source or target? Should I include some kind of filter operator in interface.
    You need to have the Filter on the Source side so that we can filter records accordingly the capture the same in the File. To have a Filter . In the source data store click and drag the column outside the data store and you will have Cone shaped icon and now you can click and type the Filter.
    Please look into this link for ODI Documentation -http://www.oracle.com/technetwork/middleware/data-integrator/documentation/index.html
    Also look into this Getting started guide - http://download.oracle.com/docs/cd/E15985_01/doc.10136/getstart/GSETL.pdf . You can find information as how to create Filter in this guide.
    2. If I have include multipe countries like (USA,CANADA,UK) to go to one file and rest to another file; Can I use some kind of lookup file...? Instead of modifying filter inside interface...Can i Update entries in the file?
    there are two ways of handling your situation.
    Solution 1.
    1. Create Variable Country_Variable
    2. Create a Filter in the Source datastore in the First Interface ( SOURCE.COLUMN = #Country_Variable)
    3. Create a new Package Country File Unload
    4. Call the Variable in Country_Variable in Set Mode and provide the Country (USA )
    5. Next call the First Interface
    6. Next call the Second Interface where the Filter condition will be ( SOURCE.COLUMN ! = #Country_Variable )
    7. Now run the package .
    Solution 2.
    If you need a solution to handle through Filer.
    1. Use this Method (http://odiexperts.com/how-to-refresh-odi-variables-from-file-%E2%80%93-part-1-%E2%80%93-just-one-value ) to call the File where you wish to create store the country name into the variable Country_Variable
    2. Pretty much the same Create a Filter in the Source datastore in the First Interface ( SOURCE.COLUMN = #Country_Variable)
    3.Create a new Package Country File Unload
    4.Next call the Second Interface where the Filter condition will be ( SOURCE.COLUMN ! = #Country_Variable )
    5. Now run the package .
    Now through this way using File you can control the File.
    Please try and let us know , if you need any other help.

  • Tab character into an output file

    Hi all,
    I need to put a tab character into an output file in abap.
    I want to create an output file that can be opened in excel, but i dont want to call excel from abap, just create the file and open later.
    the tab is what automatically delimits the columns in excel
    Any Ideas ??
    Please  do let me know
    Thanks,
    Dan

    Hi daniel,
    1. while calling fm GUI_DOWNLOAD
    2. if we give
    WRITE_FIELD_SEPARATOR = 'X'
    3. then TABS will automatically come.
    4. or else u can use the tab character with
    5. CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
    regards,
    amit m.

  • Splitting program into multiple files

    Hi folks :)
    I have a looong program. And I would like to split it into 4 files. What else do I have to do, then adding the packagename? Could I call variables from one file, that is declared in another? How? And how do i call methods in another file?

    Presumably, you're using Strings and possibly even JTextPanes.
    If so, you already have all the syntax you need.
    Let's assume that your current class contains all the required functionality. You might want to break that up to make the code more maintainable. So, put all the gui code into GUI.java and then wrap up your data processing methods into a Processor.java file. Both of these should define publilc classes.
    But now your GUI class presumably won't compile because you are trying to call methods that don't exist anymore (you've just moved them). So, in you GUI class add a Processor data member (called "dataProcessor"). Instantiate this in the GUI constructor. Now, where you were calling those methods before you need to use:
    dataProcessor.someMethod(someString);You'll probably have to play around a little to make everything fit but the art of refactoring is one to be learned early.
    I hope this gives you the idea you were looking for.

  • Splitting TempDB into multiple data files.

    To avoid contention we have to split tempdb into multiple data files. But as for case suppose, there is 20 GB total space is on the drive containing 1 tempdb data file of 15 GB. And I have to create 3 more tempdb data files, and as recommendation all files
    should be of same size.Then how to handle this situation and configure all data files with same size?
    Pranshul Gupta

    But as for case suppose, there is 20 GB total space is on the drive containing 1 tempdb data file of 15 GB. And I have to create 3 more tempdb data files, and as recommendation all files should be of same size.Then how to handle this situation and configure
    all data files with same size?
    So your goal is to have 4 tempdb files, each 5GB?  Below is a sample script to accomplish the task within the 20GB space constraint.
    --reduce size of existing file to 5GB
    ALTER DATABASE tempdb
    MODIFY FILE (NAME='tempdev', Size=5GB);
    DBCC SHRINKFILE('tempdev',5120);
    --add 3 new 5GB files
    ALTER DATABASE tempdb
    ADD FILE (NAME='tempdev2', FILENAME='D:\SqlDataFiles\tempdb2.ndf', Size=5GB);
    ALTER DATABASE tempdb
    ADD FILE (NAME='tempdev3', FILENAME='D:\SqlDataFiles\tempdb3.ndf', Size=5GB);
    ALTER DATABASE tempdb
    ADD FILE (NAME='tempdev4', FILENAME='D:\SqlDataFiles\tempdb4.ndf', Size=5GB);
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Split File in File Sender

    Hi,
    I have a source file that can be up to 4MB's and I want to Split it for every 10,000 records in the file. I can't use "Recordsets per Message" because my file has a single Header and multiple Detail records.
    Is there any way to split this message in the file sender?

    i recommend you to create an xslt mapping and split the source file with it.
    in the ESR first resolve all the mapping program, then call the XSLT.
    so you ESR configuration will be:
    Message mapping: XXXX
    Opertation mapping will have two mapping:  XXXX and XSLT.
    here give you and example or XSL i use to split Idocs. the XSL receive and idoc WPUUMS01  with 1000 record and the XSL split it into Two.
    use it as reference to solve your issue
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns1="http://spsa.com/POS/DailySales">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:template match="ns1:mt_SalesValidation_response">
          <WPUUMS01>
           <xsl:for-each select="row[position() mod 500 = 1]">
             <IDOC>
                <xsl:attribute name="BEGIN">
                   <xsl:value-of select="1" />
                </xsl:attribute>
                <EDI_DC40>1
                  <SNDPRN>
                       <xsl:value-of select="../OUT_WERKS"/>
                  </SNDPRN>
                </EDI_DC40>
                <xsl:for-each select=".| following-sibling::row[position() &lt; 500]">
                   <E1WPU01>     
                      <xsl:attribute name="SEGMENT">
                         <xsl:value-of select="1"/>
                      </xsl:attribute>
                      <BELEGDATUM>
                         <xsl:value-of select="../OUT_ERSDA"/>
                      </BELEGDATUM>
                      <BELEGWAERS>PEN</BELEGWAERS>
                    <E1WPU02>
                             <xsl:attribute name="SEGMENT">
                                  <xsl:value-of select="1"/>
                                  </xsl:attribute>
                             <QUALARTNR>EANN</QUALARTNR>
                             <ARTNR>
                               <xsl:value-of select="EAN11"/>
                             </ARTNR>
                             <VORZMENGE>-</VORZMENGE>
                             <UMSMENGE>
                               <xsl:value-of select="TOT_CANTIDAD"/>
                             </UMSMENGE>
                             <UMSWERT>
                                  <xsl:value-of select="TOT_VTA"/>
                             </UMSWERT>
                    </E1WPU02>
                     </E1WPU01>
                  </xsl:for-each>
             </IDOC>
         </xsl:for-each>
          </WPUUMS01>
       </xsl:template>
    </xsl:stylesheet>
    Hope Helps
    Edited by: Rodrigo Alejandro Pertierra on May 18, 2011 12:28 PM

  • Message Split -- File to Idoc Scenario  -  ( Without BPM )

    I have multiple records coming to XI in a File and I have to create Multiple Idocs to R/3.
    Due to Complexity of mapping I'm splitting Maaping step into 2 message Mappings.
    A-->B
    B-->C
    In the 2nd Mapping step  I'm doing message Split meaning for each Source record I'm creating multiple Idocs ( To be precise each record on the source becomes 4 idocs in the Target.
    2nd Mapping step is as follows
    Source 1..1
      Sourcerecord 0.. Unbounded
        field1  0..1
        field2  0..1
        filed3  0..1
    Target
    Message 1
        Idoc   1.. Unbounded
          Idoc Structure..
    Message 2
          Idoc   1.. Unbounded
    Message 3
          Idoc   1.. Unbounded
    Message 4
          Idoc   1.. Unbounded
    So based on some criteria each record of Source will be mapped to 4 Messages (  1 each under each Message )
    Is it possible to do this without BPM?. Iam sending all these Idocs to same R/3 System.
    Thanks for any help..RK

    Hi,
    See the blog
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    <i>Basicly we have 2 ways of handling such scenarios:
    - we can use a block step and send multiple IDOCs from our BPM
    - we can also do a little trick and send multiple IDOCs from the XI without a BPM
    The first approach is a standard XI approach. It involves the use of a BPM
    so the speed of this transfer many not be very good in case you'd like to send
    hundreds or thousands of IDOCs in just one call.
    The second approach uses a little trick that was mentioned several times
    on the XI Froum by a number of XI developers but is still not very clear to the XI newbies.
    It allows us to send multiple IDOCs without the use of a BPM. Most probably this will be your choice
    if you'd like to use such 1:N (IDOCs) scenarios effectively.</i>
    Please see the bwlow threads also..
    IDOC Splitting
    File To IDOC Thru XI
    Multi-Mappings in BPM (XI 3.0)
    Please let me know , your prob..is solcev or not..
    Regards
    Chilla..

  • Split File Error !!

    Dear Experts,
    Newly I installed SAP BPC 5.1 with SQL 2005.
    I am trying to create new Dimension & Process dimension Its showing "Split File Error".
    And Whilw clicking on "Save to Server" for dimension Its showing error message "Split File Error".
    Please help me,
    Thanks in advance

    If you go into the spread sheet where the members are defined for that dimension
    Goto the bottom of the data and highlight all the empty cells to the bottom of the spreadsheet and then find "clear all" in excel (not easy in 2007!)
    I've found this usually fixes this but you may have to do it a few times as BPC holds onto excel processes. Might be worth killing all excel processes from task manager each time you do it as well

  • Split File

    Hi Gurus,
    I have an input file and i need to split it into multiple files based on a particular field in the record.I want to achieve this in easier way without using BPM.How do i go about?Please guide me.
    Thanks in advance.
    Swathi

    Yes its possible, you can do it.
    Go thro this...
    Multi-Mapping-Programm (1:n)
    for further reference chk out these links
    Mapping
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

  • SXDA split files for RMDATIND - First record in sequential file & not a session record (type 0)

    Hi gurus,
    I'm trying to perform a mass upload of material master records and for this I've have setup a Data Transfer Project in SXDA with the purpose of splitting an LSMW input file into multiple. The file split task is using Data Load Program:
    Object Type: BUS1001006
    Obj. description: AD Standard Material
    Program type: DINP
    Program: RMDATIND
    The problem I'm facing is that once the .conv (Converted Data) is split in multiple files these files are being transferred without a session record. This is causing to get the following error when running program: RMDATIND "First record in sequential file & not a session record (type 0)"
    So the questions is: How can I specify in SXDA that I want to keep that session record in all my split files?
    Thanks in advance for your help!

      Hi Chris ,
    try to re create logical file path/files for converted data.
    regards
    Prabhu

  • Help needed in splitting files using BPM

    Hello experts,
    I am working on an interface where i need to split files within BPM.
    I know,i can achieve it in Message Mapping by mapping Recordset to Target structure and then using Interface Mapping within Transformation step.But i dont want to follow this.Is there an alternative way to achieve this within BPM.
    I have an input file with multiple headers and i need to split for each header.My input file looks like this:
    HXXXXXABCDVN01
    MXXXXXXXXXXXXXX
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    HXXXXXABCDVN02
    MXXXXXXXXXXXXXX
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    HXXXXXABCDVN03
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    Is there a way, where i can specify this condition within BPM , that split files for every H.
    Thanks in advance.
    Regards,
    Swathi

    Hi,
    have your target structure with occurence as 0...unbounded in the mapping and map the header filed to the root node (repeating parent node) of the target structure....this will create as many target messages as the header fileds....if you want to send these messages separately then use a block in BPM with ForEach option....
    Splitting and Dynamic configuration can be applied in the same mapping.
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Dec 18, 2008 12:59 PM

Maybe you are looking for

  • I updated my iphone 4S to 7.1.1 and now WIFI and Bluetooth do not work.

    I updated my iphone 4S to 7.1.1. Immediately after doing this, my wifi is greyed out, (cannot even turn it on), and my bluetooth is not working at all. I have discussed with Apple several times and even went to an apple service center. They claim tha

  • S.M.A.R.T. status depends on program?

    Hi, The last couple of days I've had problems with my Macbook Pro (OS X 10.6), which seems to be a harddisk (Toshiba MK3255GSXF Media) related problem. When I run Disk Utility (Programs -> Utilities -> Disk Utility) it says that there is a hardware i

  • "save as" pop up box does not allow me to save the document.

    Hello , "save as" pop up box does not allow me to save the document. Shows a blank screen. Any idea what would cause this? I just purchased acrobat pro dc. Thanks!

  • Is there a way to see the full title names of videos?

    I have various videos on my iPhone, unfortunately they have long titles and I'm unable to see the full names when making a selection of which one to play.

  • One script to control several scripts

    I have several scripts set up to run various print jobs we do over and over. However i can't run more than one at a time. I would like to create a script where I could choose which print jobs I would like to run and have it build one mega-script base