Adding of two files occurances

Hi ,
I  am adding two files to one and sending to receiver in this if I get N as occurance of file1 and M as occurance of file2 then I need to get N+M occurance for received file
for exaple if I have 2 occurance and file 1 and 3 occurance for file 2 at this time I need to get 5 as occurance for receiver file
for this please guid how to achive this logic
regards
Krishna

Hi,
Since in your case there are 2 source files coming, so you need to use a BPM with 2 receivers for the 2 source files, one each in one of the branches of a fork, i.e you need a fork step with 2 branches. Then after the fork step , you need to insert a transformation step where you have to do the required message mapping.
After the message mapping, insert a send step which will send the output of the message mapping to the intended receiver.
In the message mapping, you need to have 2 source structures for the 2 source files i.e. there should be 2 source message types in the message mapping. Then you need to use the count node function for both the source messages to count the number of occurrences of the parent node in each of them, and then use the add  node function to count the total number of occurrences of the target node and map this to the target side's parent node.
After that, simple map the child node of both the source structures directly to the child node in the target side.
MT1                                                                               
<Node1>                                                                               
<child1>                                                                               
MT_TARGET
                                                     <NODE>
                                                       <child>
                                                                                MT2
  <Node2>
        <child2>   
Map both <child1> and <child2>   with the same child as shown above for <child1> of MT1 of source         
That's it. Hope this helps you
Thanks
Biswajit
Edited by: 007biswa on Feb 14, 2011 12:16 PM
Edited by: 007biswa on Feb 14, 2011 12:17 PM

Similar Messages

  • Append two files with added time stamp

    Hi experts,'
    MY Requirement is I need to pick two files from two different FTP Locations and append them to file receiver FTP Location with Added timestamp.
    How to achive this as with append we do not get option of adding time stamp.
    Other thing is I want all the appended files should be there  in Receiver folder means like if we get two files today they should be appended to one and shld be put in Receiver folder then two files for tomorrow and they shoud be appended as a separate file in Receiver Folder.
    How to achive this??
    Regards,
    Nidhi

    Hi Nidhi,
    >>MY Requirement is I need to pick two files from two different FTP Locations and append them to file receiver FTP Location with Added timestamp
    Use BPM and pick the two files
    >>Other thing is I want all the appended files should be there in Receiver folder means like if we get two files today they should be appended to one and shld be put in Receiver folder then two files for tomorrow and they should be appended as a separate file in Receiver Folder.
    Use variable substitution and create the directory and filename dynamically...
    Use Dynamic configuration module in receiver adapter and do as specified in this blog:
    /people/madanmohan.agrawal/blog/2009/05/20/combining-three-different-aspects-of-pi-asma-af-module-and-variable-substitution-in-one-shot
    Regards
    Suraj

  • Create PDF from two files in sub folder automation

    I am looking to create an automation tool that does the following to help save time (the current process takes about 20 min):
    First, take two specific files (The first page is a single worksheet excel file that is fitted to one page.  The second is a word document.)  in a user defined location and combine them into one document.  Currently this is done manually through Acrobat 8 via the Create PDF function for each file then the Combine PDF function.
    Second, I would like to have the Bookmark and Attachment pane set for initial view, but there is not a preset option for this.  Is this even possible?  Currently, I set the initial view to bookmarks and page, and include a not one the first page on how to open the attachment pane.
    Third, all external links to documents, via hyperlinks, are added as attachements and the links are changed to point to the attachment so that all information is contained within one document.
    Lastly, this newly created document is posted to an intranet location.
    Any help in part or whole would be great.
    NOTE:  All code must be included as an add-in to Acrobat as this is within a corporate environment and server side scripts are not allowed.

    I have created the following script as a start to trying to figure this out, but I am getting unexpected results.  When I run this script, I get the two files, Temp and Combined.  The Temp file is, as expected, a pdf version of the last file in the array, but the Combined file is where the problem is.  With the Combined file, I have one blank page, then my single worksheet from the workbook, and then only the first page of the word document which is 26 pages.  Any idea what I am doing wrong?
    In addition, is there a way to prompt the user to select the filepath through a Windows Explorer interface?
    Current code:
    var filepath = "/c/filepath/"
    // Create a new PDF document for Profile:
    doc = app.newDoc();
    doc.saveAs({ cPath: filepath + "Temp.pdf" });
    doc.closeDoc(true);
    doc = app.openDoc({cPath: filepath + "Temp.pdf" })
    // List of files of different extensions
    aFiles = new Array( "Doc1.xls", "Doc1.doc");
    for ( var i=0; i < aFiles.length; i++) {
    // Open and convert the document
    newDoc = app.openDoc({
    oDoc: doc,
    cPath: aFiles[i],
    bUseConv: true
    // Save the new PDF file to a temp folder
    newDoc.saveAs({ cPath: filepath + "Combined.pdf" });
    // Close it without notice
    newDoc.closeDoc(true);
    // Now insert that PDF file just saved to the end of the first document
    doc.insertPages ({
    nPage: doc.numPages-1,
    cPath: filepath + "Combined.pdf",
    nStart: 0

  • BPM was Picking two files but it was not processing 2nd file data in target

    Hi all,
    I have designed scenario for picking two files and i want to merge this files into single structure and send it target.when i am try to testing my bpm was picking two files but it is processing only file it went target system.i have steructe for source like
    source1     target
    root        header
    a           item 0 to unbounded
    b            a
    c            b
                 c
    source2     item1 duplicated structure
    a            a
    b            b
    c            c
    i am getting two source files with the same structure but i have to map it one target structure and i want to map both source fileds to one target structre under item node so i was duplicated item node and mapped a b c fields from both(2 source structures).while testing BPM is picking two file bu in the target i am getting only first file data under item node,whatever i mapped with duplicate structure with second file i am not getting into target file(target is standard proxy structure so cant' create new one item node in that occurance is 0 to unbounded thats y i duplicated node while testing interface mapping its working fine).can anyone suggest solution for this problem.
    Thanks,
    Seshagiri.

    Hi,
    In BPM follow the below steps and hopefully your problem will be solved.
    1.     Configure one sender CC to get the files from your application server, once the files hit the BPM now you need to
                         configure your BPM accordingly.
    2.     Use the Receiver step in BPM to receive the messages. Use the correlation step to get the correct files.
    3.     Use container and append the files, so both the files will be append, this means the message content will
                         have 1header, body, footer, 2header, body, footer.
    4.     If you want to split the message to different receiver then use the fork step else leave it.
    5.     Use the transformation step, the transformation step will call the message mapping. Provide the correct message
                         mapping.
    6.     Now use the sender step to send the message to the receiver-target system. In this step use the split value for each
                          concept if you want to generate two different files.
    7.     Configure 1 receiver CC to generate both the files.
    Hope this helps.
    Cheers,
    Jay

  • How to merge/append two files in sequence using BPM

    Hi All,
    My senario is to append two files data into a  new file on target system, only if the two files are available on source system. In case one file on the source system, no need to process file. Data in the new file should be in sequence means 1st file data then 2nd file data.
    Please suggest me how can i achieve this functionality using BPM.
    Thanks & Regards
    Sreeni

    For the first part (two files required) design as per Prateek's suggestion
    Data in the new file should be in sequence means 1st file data then 2nd file data.
    create a data structure which will be a combined structure of File1 and File2....target structure should have first reference for File1 and then for FIle2....than having two MTs (File1 and File2) at the source and the target MT at the receiver create your mapping......this will ensure that File1 data occures first and then File2 data.
    Regards,
    Abhishek.

  • Two File Adapter

    HI.
    Our system have two instances, and we use file adapter(sender). These file directory is same.
    If the two file adapter try to get file at same time,
    does the locking error may occurred?
    Have anyone met the this kind of problem?
    regards,

    >>If the two file adapter try to get file at same time, does the locking error may occurred?
    I guess you would not get any locking error as the file adapter does not support the file locking.
    For more information on file locking have a look at the note 821267 Question 3.
    From SAP Note
    Q: I sometimes observe that files are processed only partially,
    i.e., only a fragment from the file's start is converted into an XI
    message. Nevertheless, the file is usually archived completely.
    Does the File Sender Adapter honor if another process has locked a
    file for exclusive use?
    o A: Unfortunately, the J2EE 1.3 technology the File Adapter is built
    upon does not support file locking. This limitation affects the
    File Adapter's operation. Depending on whether the JRE
    implementation for the operating system under which the adapter
    runs uses mandatory file locking or advisory file locking, opening
    a file that is currently being written to by another process will
    fail or not.
    If opening the file fails, no problem exists and the adapter will
    try to open the file each poll interval until it succeeds.
    However, if opening the file is not prevented by the operating
    system, the adapter starts to process the file although it is still
    being modified.
    Thanks
    SaNv...

  • CS4 Save as creates two files

    When "saving" or "saving as" legacy files two files get saved. One has the suffix added as "-01". Is there a preference to turn off because I have to keep going back to kill the duplicate file.
    Mac OSX 10.4.11
    Illustrator version 14.0.0 (CS4)
    Thanks in advance, Bob

    do you have more than 1 artboard?  Uncheck the option of saving artboards. But think, if you do this, you are going to save the current artboard and lose the others....

  • How to compare two files char by char

    Hi,
    I want to compare two files and after Comparison i want all the differences in the new file has to be updated to old file (Without deleteing the contents of the file)?
    Any help will be appriciated.
    Thanks.

    I think i have to elaborate my question�.. for
    example take a file called xyz.xml which contain some
    data which I don�t want to get deleted� after some
    days this file has been modified (i.e. some more data
    has been added) . Now without overwriting the file
    /deleting the earlier contents of file xyz.xml. How
    do I update xyz.xml file?
    Now I think iam clear.
    Thanks.This does not make sense at all! Either your file has been changed or it has not. If it has been changed then there is nothing to do. If it has not been changed then there is nothing to do.

  • Adding a fragment file (*.jspf) to a *.jsp file

    Adding a fragment file (*.jspf) to a *.jsp file
    What I did:
    1. Mkdir Web Pages\pages\common
    2. Create a *.jspf in directory
    3. Mkdir Web Pages\pages\common
    4. Create a *.jsp in directory
    5. Select page fragment
    Outcome:
    My *.jspf file is not shown in the combo list box of the "Select Page Fragment" dialig box, unless I create the *.jspf in the Web Pages directory.
    Question:
    Why?

    Since you're talking about "mkdir" etc. it sounds like you're trying to do this outside of the IDE. If so, you should note that a fragment is NOT just a .jspf file! All web forms in Creator have two files: a markup file (.jsp or .jspf) and a backing bean (.java). You must create both, by the same name, in the correct location, for the form to be considered a valid fragment. It's best to do this through the IDE.
    In case you did use the IDE and it's still not working, perhaps there's an issue with creating page fragments in subfolders. I know we had some bugs with creating regular forms in subfolders and most of those bugs were fixed but perhaps there are some additional issues for fragments.
    -- Tor

  • How to read two files (one is updating every second, the other is constant) simoltaneously

    Dear All,
    I will appreciate if somebody help me.
    I want to read two files, one is temperature wich is updating every second, and the other is hysteresis energy which has specific rows and is constant.
    I got a program in discussion forum which read a file as it is updating. I checked this program in my case and it works.
    Then I added reading hysteresis energy file to the existing file. But while i am running the program, the hysteresis energy file is read with all rows.
    But the aim is that everytime which temperature updates, I need to read just one row of the hysteresis energy file.
    so, in this way in every second i have a new temperature data and one row of the other file.
    I tried to used "for loop" inside the program, but it did not work, becuase reading temperature will be stopped untill for loop ends.
    I attached the program.
    Could somebody help me how to read just one row of hysteresis energy file everytime temperature updates?
    Solved!
    Go to Solution.
    Attachments:
    Readfiles.vi ‏23 KB

    I do not understand relationship between your two files.
    You have another VI or app that is writing data to both files and when new temperature data added you wish just to read the new data and then read one new line of the hysteresis file?????
    But is one is constant, why do you need to keep reading it?
    Anyway…
    The “Read From Spreadsheet File.vi” preformed an Open and a Close for each time it is called (if you will open the VI up and drill down and you will see). So that resets the file pointer back to the beginning and there for will read in the whole file from the first to the last each time if you do not set the start of read offset or number of rows.
    Now the Read from Binary File does not reset the file pointer and leaves the file pointer just past the last byte read so it will start with any new bytes automaicly only giving you the new data.
    I do not think you need to do the math with the Previous EOF=0 and the File size to get what I think you are trying to do.
    Plus use shift reg for the Data string instead of local var
    Set the mechinacl action of the stop botton to Latched
    So you do not need to init the two controls
    Also, I do not get the End of file encountered error (4) from the Read from Binary file if I attempt to read past. It just returns and empty string.
    Omar
    Attachments:
    Readfiles.vi ‏22 KB

  • How to run two files with same url-  urgent

    hi,
    i created two servlet page and both are working very fine.but at same time i only able to run one file with same url. Is possible to run two or more file at same time with same url name..
    if you r not understanding what i want to ask then, i have two file names under helloWeb directory
    1) helloWorld.java(servletname s1, url /man)
    2) helloWeb.java (servletname s2,url /man)
    to run - http://localhost:7001/helloWeb/man - it runs very first file which is added to deployment module.
    so i want to know how i can run both file with same url, for this what i have to pass on my address bar.
    plz help me i m wating
    <b></b>

    Hi,
    We can give same url mapping to both Servlets but we can access the servlet which is entered first in web.xml because whenever we send a request to the webserver then webserver look at the elements in web.xml file one by one.
    When it finds the corresponding url mapping then immediately sends the response to the client.The same url mapping for the next element will be ignored.
    I think there is no possibility to access both servlets with same url.
    Regards
    Anilkumar kari

  • Items in the Itunes library were not copied because of one or two errors occurred. How to fix this problem?

    Items in the Itunes library were not copied because of one or two errors occurred. How to fix this problem?

    Hello mobyash,
    Have you tried converting each of these 8 tracks to a different file format and seeing if they will then sync to your iPod.  See this Apple support document for information and instructions on how to convert a song to a different format.
    iTunes: How to convert a song to a different file format
    B-rock

  • Adding a .smi File to a .mov quicktime movie

    I have an unsubbed Quicktime movie and both .smi and .srt files containing subs for the movie. How can I attach the subs in the .smi or .srt files to the .mov file? I also have the video in .mkv format, and used the application SmartConverter to change it into a quicktime movie. Is there a way to add the .smi or .srt file to the .mkv file then convert it into a quicktime movie or something?

    Hi,
    There is also a Myth buster from Paul Randal which says you do not need to keep tempdb data files equal to processor core
    Myth-Tempdb data file should always have one data file per processor core
    But if you read Microsoft blogs it would say you should have tempdb files  as per cores.
    Tempdb best prctices
    It all boils down to fact that are you facing issue with Tempdb. Does recommendation that tempdb data file equal to logical core always holds true, no it does not always that is what Paul Randal tried to show in his Article. You start with two data files
    on different drive and monitor performance of Tempdb if you see PFA,GAM SGAM contention adding a data file would help. These recommendations generally hold true for huge OLTP environment where MS tested various features and your environment might not be same
    as the one tested. Its a Good practice not an ideal. Ideal is one that suits your requirement and that would require a testing.
    SQL Server tempddb Number of files a raw truth
    If you want to Identify contention in Tempdb use below link
    Identifying Contention In Tempdb
    Recommendation to reduce allocation contention in Tempdb
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Linux Diff tool as External tool in Jdev to compare two files

    Hi, I was looking for adding any diff tool to compare two files in Jdev. I added the usual Linux "diff <file1> <file2>" to compare two files. The way I have provided arguments compares a file against itself.
    Program: diff
    Arguments: ${file.name} ${file.name}
    Directory: ${file.dir}
    My requirement to to right click on the two files which I want to compare and the open them in any diff tool.
    Any ideas?
    Regards,
    Ramesh

    Which jdev version?
    I don't see how this can be done. How do you select two files in jdev?
    As you provided the same name as file1 and file2 it's clear that you compare the file to itself.
    Timo

  • Which Algorithm to search two files

    hi everyone, I am a Computer Science student and I am new to java. I just got a project.
    Would anyone please suggest me which algorith is best to use for it, please?
    Thanks a lot:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    I need to Write a java program which takes two files and tells me which words in the second file also occur in the first file, and which words do not.
    The program should run as fast as possible.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Project:
    1)Take in two filenames as arguments
    ---1st file: List of words in alphabetical order, containing 10000 words
    ----2nd file: Set of query words (not ordered), containing 10000 words
    2)Print out the set of query words from the queries file, with beside each word a �y� if the word occurs in the alphabetical-list file, and a �n� if not.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Sample File and output:
    1st file: apple banana cabbage grape
    2nd file: queries.txt: potato cabbage turnip
    java Project1 list.txt queries.txtpotato n
    cabbage y
    turnip n
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Thank you for reading this far.

    I'm not going to do your homework for you, but if you load the list of words into something like a java.util.ArrayList, you can then use the static method java.util.Collections.binarySearch( List list, Object key ).

Maybe you are looking for

  • After updating CP8 to 8.0.1.242 Quiz buttons dissapear

    I installed the latest patch yesterday. Before the patch I published my quiz and everything worked fine except the final slide audio would start after the first correct answer (no clue why). After the patch all my quiz buttons disappear. They are cus

  • VxVM v3.5, unencapsulation and no rootdg

    Hello I would appreciate some help please. Using VxVM & VxFS v3.5 on Solaris 9. The root disks were encapsulated with two extra volumes on non root disks. There are two data volumes within the cdrdg disk group. I have unencapsulated the root disk and

  • Xcelsius version control

    Can we use a version control system, specifically SVN to store XLF files and will the usual version control functionality work with XLF files, e.g. branch, trunc, etc? Thanks - John

  • Mail.app making excessive number of connections

    I have had (as have many other folks I know) this annoying issue of Mail.app suddenly throwing up a dialog asking for my password for a mailserver. For unknown reasons (until now) sooner or later the behavior would self-correct and the password reque

  • Catalog and Non catalog?

    Hi, what is the difference between catalog and non catalog ? Thanks,