Setting number of threads for each file sender adapter?

Hi guys,
I need to ensure file processing order based on a filename, so if I put 3 files named 1,2,3 to the directory, the 1 must be processed 1st etc..  But file adapters work in threads. What I need, is to set up each file adapter to work in just 1 thread. I then takes files one by one based on the name (config setting) and it's what I need.
Is this possible?
Thank you,
Olian

Hi,
You need to pickup the files in sequence with the file adapter. But as you have said File adapter works with multiple threads/ instances simultaneously.
So to overcome this kind of activty you can Either use BPM for processing of file or with the help of Scripting commands at OS level move the files to Source directory as one by one.
In BPM, you have to include 3 receiver steps one by one so as per the sequence it will pick up the files.
Thanks
Swarup

Similar Messages

  • Count the number of lines in  each file in a directory

    Hello,
    I would like to count the number of lines for each file in my directory and subdirectories.
    I wonder how can I count the lines of the specified files?
    Here is the program which is listed the files in the specified directory:
                        String path = "C:/User/Studies/Pracices/src/Pract1";
           String files;
           File folder = new File(path);
           File[] listOfFiles = folder.listFiles();
           for (int i = 0; i < listOfFiles.length; i++)
            if (listOfFiles.isFile())
         files = listOfFiles[i].getName();
         System.out.println(files);

    Ok so one more question.
    Actually my path is pointing to one Directory and like here I can just read from one file that the name of the file should be specified in the path is it possible to help me in that part?
    File f = new File("C:/User/Studies/Practices/src/Pract1/");
    FileReader fr = new FileReader(f);
          BufferedReader br = new BufferedReader(fr);
          String str = br.readLine();
              LineNumberReader ln = new LineNumberReader(br);
              int count = 0;
              while (ln.readLine()!=null)
                  count++;
              System.out.println("no. of lines in the file = " + count);

  • File Sender Adapter - Dinamic Source Directory and Filename

    Hi Experts,
    I have to receive in XI a file and depeding of some info, put it in diferent directories with diferent fieldnames.
    In receiver File Adapter we can set the directory and fieldname dinamically by ABAP-CLASS mapping, but not in Sender.
    I've read Michal's blog
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    and sap help
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
    But, I can't find Adapter-Specific Message Attributes in my File Adapter...:-) I've checked SP version is SP16, where are my Adapter-Specific Message Attributes?
    How can I set Directory and Fieldname at runtime for Sender File Adapter?
    Please help...
    Thanks all in advance,
    Regards.
    Urtzi.

    Hi Nilesh,
    Your threath is not about my issue...
    Answering to other friends, what I want is not to write p.e.: '/server/dir/' in each File Sender Adapter Channel, and put it with any other way looking some 'customizing' or checking a condition.
    The problem is that frecuently in the Company changes servers and we have to enter to the Directory and change every Channel one by one...We would like to reduce the maintain of the Channels with a mapping, variable, customizing table...or something similar. Do I explain?
    I don't know if its possible but I had the hope...:-)
    Thanks all.
    Urtzi.

  • File sender adapter and content conversion with polish character

    We are loading a csv file with PI 7.0 file sender adapter using "content conversion" - all fields go through EXCEPT a special character hex '208C' (space in front) looks like "Æ" is converted to hex 'C28C'.
    We are using code page UTF8
    We are using:
    enclosuresign "
    enclosuresignescape ""
    fieldcontentformatting nothing
    enclosureconversion NO
    Hope some one can help

    Hi Bohamo,
    Hope you have set the following for your file sender adapter :
    1. Transfer Mode is set to Binary,
    2. File Type Text,
    3. Encoding ISO-8859-1( for Western European Latin ).
    Inorder to recognize Polish Character, try as follows :
    Your sender file after coming into Pi has XML encoding declaration 'UTF-8'.
    Write a simple XSLT mapping to change the value of the attribute "encoding" to "ISO-8859-1" in the output XML of message mapping . Include this XSLT map as the second mapping step in your interface mapping.
    First step in your interface mapping will be your already existing message mapping.
    An example of the XSL code :
    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method='xml' encoding='ISO-8859-1' />
    <xsl:template match="/">
    <xsl:copy-of select="*" />
    </xsl:template>
    </xsl:stylesheet>
    or you can also do java mapping if you are comfortable with java code !
    Cheers,
    Ram.

  • File Sender Adapter - Throw Alerts

    Hi experts,
    I've custom a communication channel for the file sender adapter and I'd like to raise alerts in case of technical errors and functional.
    I managed to do this for functional errors, by alert rules, and runs good. But for technical errors, the alert rules, not runs good.
    I think to develop this control through Adapter User Modules. But so far I have not succeeded. Because if I remove the read permissions of the directory, the User Module is not executed.
    I don't know the solution. Any ideas?
    Thanks,
    Jose.

    Hi experts,
    My problem was a bad configuration on the parameters of the alert rule. To manage the system errors and the application errors for my process integration scenario I'm configured the next:
    System Errors:
    Rule Activated: Yes. - And - Suppress Multiple Alerts of This Rule: No.
    Description and Alert Category, the corresponds.
    Bound to message: Not relevant.
    Sender Service, Sender Interface and Sender namespace, the corresponds.
    The other conditions: *
    Where did the error occur?
    Adapter Engine: Yes. - Adapter Type: File
    Application Errors:
    Rule Activated: Yes. - And - Suppress Multiple Alerts of This Rule: No.
    Description and Alert Category, the corresponds.
    Bound to message: Yes.
    Sender Service, Sender Interface and Sender namespace, and Receiver conditions, the corresponds.
    Where did the error occur?
    No Restriction.
    Thanks to all,
    Jose.
    Edited by: Jose María Mudarra Lara on Jan 28, 2009 3:45 PM

  • Create standby maximum number of logfiles for each thread

    The oracle doc states this equation for appropriate number of standby redo log file groups
    (maximum number of logfiles for each thread +1) * maximum number of threads
    How do you get the maximum number of logfiles for each thread and the max thread?
    Thanks!

    If you are running RAC you can, in theory, be running with a diferent count
    of Online Redo Logs in each thread (instance).
    However, normally, you would have the same number of Redo Logs in each
    thread.
    The theoretical max is prescribed at the CREATE DATABASE and can be
    changed with a CREATE CONTROLFILE. If you do an
    ALTER DATABASE BACKUP CONTROLFILE TO TRACE
    the sql script in the tracefile shows the maximum number of logs and members.

  • Maximum number of logfiles for each thread

    Hi all,
    When I configure a Standby Redo Log, to determine the appropriate number of standby redo log file groups, I should use the following formula:
    appropriate number of standby redo log file groups: (maximum number of logfiles for each thread + 1) * maximum number of threads
    My question is: how can I determine the maximum number of logfiles for each thread ? Is it the online redo log file per group? or total of redo log files in all groups?
    SQL> ed
    Wrote file afiedt.buf
      1* select group#, thread#, sequence#, members from v$log
    SQL> /
        GROUP#    THREAD#  SEQUENCE#    MEMBERS
             1          1         40          1
             2          1         38          1
             3          1         39          1

    user8994263 wrote:
    Hi,
    If you have 5 redo log groups on primary, do you suggest to create 6 standby redo log groups on standby?
    If yes, why ?
    -KalidasYou did two mistakes
    1) Responded to old question Posted: Jun 1, 2010 8:52 PM
    2) Its not your question & asking into others threads.
    -- Please lock this thread

  • UDF to get the filename for File Sender Adapter

    Hi,
    I had an requirement to get the  the Filename and map to the  target payload.
    I had configured the File Sender Adapter settings in the ID
    This is the following UDF i got from SDN.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName;
    But when iam using this UDF iam getting an error
    RuntimeException in Message-Mapping transformation: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_ORDER_CRS_OB_SAP_PROXY_IB_ method Filename$[com.sap.aii.mappingtool.tf3.rt.Context@54e154e1]
    Please help me in correcting the error.
    Thanks
    Srinivas

    Hi Jayson,
    actually, in the interface mapping, it doesn't give exception.
    The DynamicConfiguration is a constant retrieved from the container object, so it will never be returned as null (given that the container object was instantiated).
    Just the retrieved value will be null (since it was not previously set), but no exception occurs.
    In the message mapping, the container object is never instantiated, and that's the reason for the NullPointerException.
    Regards,
    Henrique.

  • File sender adapter: Content conversion for very deep nested structure

    Hi all
    I have a file which looks like this
    HDOCKET    9800000660980000061911062009AA123456bbWM100012349800000619
    DDOCKET_TEST001 4012YAG1 
    WZOA00000000010000000001
    WZOA00000000020000000002
    WZOB00000000030000000003
    IAAXX000001
    IAAXX000002
    C0000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004
    T2
    and my structure is
    Header  - 1
    Detail     - 0....Unbounded
            Bag     - 0.....Unbounded   (sub node of detail)
            Track  - 0.....Unbounded    (sub node of detail)
            Customer - 0.....Unbounded    (sub node of detail)
    Trailer    - 1
    and in the file sender adapter i mentioned the following content conversion setting
    HEADER,1,DETAIL,*,Bag,*,Track,*,Customer,*,TRAILER,*
    But when i go and see in the monitoring i received the following conversion
    <?xml version="1.0" encoding="utf-8" ?>
    <ns:MT_REQ xmlns:ns="http://royalmail.com/dd_c">
    <HEADER>
      <ID>H</ID>
      <INT>DD</INT>
      <CAR>9899999660</CAR>
      <CUS>9899999619</CUS>
      <POST>11062009</POST>
      <NUMBER>AA123456bbWM10001234</NUMBER>
      <ACC>9899999619</ACC>
      </HEADER>
    <DETAIL>
      <ID>D</ID>
      <Bag>DOCKET_TEST001</Bag>
      <S>4012</S>
      <Code>YAG</Code>
      <mat>1</mat>
      <count/>
      <Mixed />
      </DETAIL>
    <Bag>
      <ID>W</ID>
      <Zone>ZOA</Zone>
      <Item>0000000001</Item>
      <Number>0000000001</Number>
      </Bag>
    <Bag>
      <ID>W</ID>
      <Zone>ZOA</Zone>
      <Item>0000000001</Item>
      <Number>0000000001</Number>
      </Bag>
    <Bag>
      <ID>W</ID>
      <Zone>ZOA</Zone>
      <Item>0000000001</Item>
      <Number>0000000001</Number>
      </Bag>
      </Bag>
    <Track>
      <ID>I</ID>
      <Item>AAXX000001</Item>
      </Track>
    <Track>
      <ID>I</ID>
      <Item>AAXX000001</Item>
      </Tracked>
    <Customer>
      <ID>C</ID>
      <OrigCustomer>00000000000000000001</OrigCustomer>
      <Field1>00000000000000000001</Field1>
      <Field2>00000000000000000002</Field2>
      <Field3>00000000000000000003</Field3>
      <Field4>00000000000000000004</Field4>
      </Customer>
    <TRAILER>
      <ID>T</ID>
      <Count>2</Count>
      </TRAILER>
      </ns:MT_REQ>
    whereas i wanted it like:
    <?xml version="1.0" encoding="utf-8" ?>
    <ns:MT_REQ xmlns:ns="http://royalmail.com/dd_c">
    <HEADER>
      <ID>H</ID>
      <INT>DD</INT>
      <CAR>9899999660</CAR>
      <CUS>9899999619</CUS>
      <POST>11062009</POST>
      <NUMBER>AA123456bbWM10001234</NUMBER>
      <ACC>9899999619</ACC>
      </HEADER>
    <DETAIL>
      <ID>D</ID>
      <Bag>DD_TEST001</Bag>
      <S>4012</S>
      <Code>egg</Code>
      <mat>1</mat>
      <count/>
      <Mixed />
    <Bag>
      <ID>W</ID>
      <Zone>zzz</Zone>
      <Item>0000000001</Item>
      <Number>0000000001</Number>
      </Bag>
    <Bag>
      <ID>W</ID>
      <Zone>zzz</Zone>
      <Item>0000000001</Item>
      <Number>0000000001</Number>
      </Bag>
    <Bag>
      <ID>W</ID>
      <Zone>zzz</Zone>
      <Item>0000000001</Item>
      <Number>0000000001</Number>
      </Bag>
      </Bag>
    <Track>
      <ID>I</ID>
      <Item>AAXX000001</Item>
      </Track>
    <Track>
      <ID>I</ID>
      <Item>AAXX000001</Item>
      </Tracked>
    <Customer>
      <ID>C</ID>
      <OrigCustomer>00000000000000000001</OrigCustomer>
      <Field1>00000000000000000001</Field1>
      <Field2>00000000000000000002</Field2>
      <Field3>00000000000000000003</Field3>
      <Field4>00000000000000000004</Field4>
      </Customer>
    </DETAIL>
    <DETAIL>
      <ID>D</ID>
      <Bag>DD_TEST002</Bag>
      <S>4012</S>
      <Code>egg</Code>
      <mat>1</mat>
      <count/>
      <Mixed />
    <Bag>
      <ID>W</ID>
      <Zone>zzzzzz</Zone>
      <Item>0000000001</Item>
      <Number>0000000001</Number>
      </Bag>
    <Bag>
      <ID>W</ID>
      <Zone>ZOA</Zone>
      <Item>0000000001</Item>
      <Number>0000000001</Number>
      </Bag>
    <Bag>
      <ID>W</ID>
      <Zone>zzz</Zone>
      <Item>0000000001</Item>
      <Number>0000000001</Number>
      </Bag>
      </Bag>
    <Track>
      <ID>I</ID>
      <Item>AAXX000001</Item>
      </Track>
    <Track>
      <ID>I</ID>
      <Item>AAXX000001</Item>
      </Tracked>
    <Customer>
      <ID>C</ID>
      <OrigCustomer>00000000000000000001</OrigCustomer>
      <Field1>00000000000000000001</Field1>
      <Field2>00000000000000000002</Field2>
      <Field3>00000000000000000003</Field3>
      <Field4>00000000000000000004</Field4>
      </Customer>
    </DETAIL>
    <TRAILER>
      <ID>T</ID>
      <Count>2</Count>
      </TRAILER>
      </ns:MT_REQ>
    i.e. i need all Bag ,Track and Customer inside detail tag.
    could anyone help me in this..i've already searched SDN and got some link as useful but none of them were totally related.
    Regards
    Naina

    Naina
    Pls. check my forum link, i had the single level hierarchy XML file which I converted into nested structure & then into flat file.
    File Conversion in Rec File Adapter with subnodes
    This can give you an idea how to go ahead. Let me know in case you need any more info about this.

  • Problem in file sender adapter for newline character

    Hi All,
         I'm trying to read a file of only one record with the following fields.
    Name
    Age
    Place
    <b>Each field is seperated by a new line</b> which is the cause of the problem.
    <b>The problem is the value 'nl' for x.fieldSeperator is not been recognised in file sender adapter.</b>
    The adapter creates a new record (new XML) for each individual field seperated by new line.
    <b>I've tried even with the corresponding hexadecimal values '0x0a' and '0x0d'.</b>
    Looking for some help.
    Thanks,
    Joe.

    Hi Shabarish,
            Thanks for your reply. But I tried that too already... It also didn't work..
    File adapter is successful... But it generates seperate records for each fields that's wat the prob is..
    Thanks,
    Joe.

  • Regarding ssis - how to handle new files in for each file enumerator

    Hi,
    I have one folder with 5 file text files by using for each file enumerator we store the files in to one folder but suddenly tomorrow one file add to that folder how to
    store the file into same destination?

    Inside foreach loop add a script task to check if file exists in destination folder. if exists set a boolean flag variable to True. Then link it to file system task you've using a conditional precedence constraint (Expression And Constraint). Set constraint
    as OnSuccess and expression as below
    @FlagVariable == False
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Can I set individual alerts (tones) for each calendar events/ reminders

    Can I set individual alerts (tones) for each calendar events/ reminders

    Thanks On my phone, these are the options under Menu>Settings & Tools>Sound Settings>Alert Sounds: 1. TXT Message 2. Multimedia Message 3. Voicemail 4. Emergency Tone  5. Missed Call . And under Service Alerts: 1. ERI 2. Minute Beep 3. Call Connect 4. Charge Complete 5. Software Update. So nothing there for the calendar. And options from the calendar that I can see are Add (here you can change the tone for one event or recurring event, but not set a default tone for the event alarm), View (gives you the options of viewing an existing event in more detail, adding a new one, and the same choices from the Options list on the first screen where you are viewing the entire month), and Options (1. lets you view weekly/monthly,  2. Go To Today  3. Go To Date   4. Search   5. Erase All   6. Erase All Old   7. Send.  So as far as I can see, there's no way to do it. I have been through all the Settings and Tools menus... and the Events menu. But...I have just discovered that if I delete ALL my alarms and change the Ringtone for the first alarm I set, that ringtone becomes the default ringtone. I will try deleting ALL my events and starting fresh with a new tone and see if that works!

  • SQL help: return number of records for each day of last month.

    Hi: I have records in the database with a field in the table which contains the Unix epoch time for each record. Letz say the Table name is ED and the field utime contains the Unix epoch time.
    Is there a way to get a count of number of records for each day of the last one month? Essentially I want a query which returns a list of count (number of records for each day) with the utime field containing the Unix epoch time. If a particular day does not have any records I want the query to return 0 for that day. I have no clue where to start. Would I need another table which has the list of days?
    Thanks
    Ray

    Peter: thanks. That helps but not completely.
    When I run the query to include only records for July using a statement such as following
    ============
    SELECT /*+ FIRST_ROWS */ COUNT(ED.UTIMESTAMP), TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD') AS DATA
    FROM EVENT_DATA ED
    WHERE AGENT_ID = 160
    AND (TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY')+(ED.UTIMESTAMP/86400)), 'MM/YYYY') = TO_CHAR(SYSDATE-15, 'MM/YYYY'))
    GROUP BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD')
    ORDER BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD');
    =============
    I get the following
    COUNT(ED.UTIMESTAMP) DATA
    1 07/20
    1 07/21
    1 07/24
    2 07/25
    2 07/27
    2 07/28
    2 07/29
    1 07/30
    2 07/31
    Some dates donot have any records and so no output. Is there a way to show the missing dates with a COUNT value = 0?
    Thanks
    Ray

  • Need help to Configure FTPS connection for File Sender Adapter

    Hi,
    I want to Configure, FTPS connection (Secured Connection) for File Sender Adapter. Could anyone please guide me, what Information I require to configure. I just want to know what Information should I request the team inorder the configure FTPS so that it can be deployed properly.
    I have checked with [SAP Help Link|http://help.sap.com/saphelp_nw04/helpdata/EN/e3/94007075cae04f930cc4c034e411e1/content.htm] and while configuring the communication channel found that I need Keystore and the X.509 Certificate and Private Key.  which needs to be deployed on the J2EE server by using the Visual Administrator.
    Is there anything else, I need to configure.
    Any help would be appreciated in this regard.
    Thanks & Regards,
    Varun.K

    The basic things are Certificate/Keys which you already know. Usually it is enough for running a sceanrio.
    However, if you have additional requirements, like FTPS for "Connection Security" for encryption, then you may need additional details like commands. Rest all settings are same as FTP.
    Regards,
    Prateek

  • It is necessary to create one header data for each file to be sent to CDFS.

    hi GUYS
    my sce anrio is FILE-XI-PROXY
    REQUIREMENT IS
    SOURCE FILE                      TARGET FILE WILL BE
    H1                                             H1                        H1                    H1
    I1                                               I1                         I2                      I3
    I2                                                F1                        F1                    F1
    I3                                           
    F1
    It is necessary to create one header data for each file to be sent to TARGET. Each file will be related to only one SAP Company Code.
    Thanks
    NAG

    aa

Maybe you are looking for

  • Excise Duties is not Calculating in Excise Invoice

    Hi Experts,            I am doing CIN configuration, i did all configuration settings, I did classify condition types also, but i am not getting Excise duties is not calculating in to Excise INVOICE, please help me with solution Thanks SESHU

  • Keyboard letter/number keys not working; Function keys OK

    The function keys on my Bluetooth AND USB keyboard work, but none of the letters or numbers work, so I can't log-in in the appropriate field. I can move the icon with the mouse, (Bluetooth or USB) I've tried 2 keyboards, one USB the other Bluetooth,

  • Shaking photo

    I've build a slider in my website and the photo is shaking... check this site in the middle http://novique3.businesscatalyst.com/index.html. Solutions? I've already resized the photo but it's still shaking :-( Thanks in advance! Frank

  • Not hard to stump the iTunes Store

    I found the perfect way to stump the iTunes Store, and I found a design flaw in the process... I tried to look up a popular country/pop music song from 1981: "Somebody's Knockin'" by John Marshall. To quote the first verse of the song... "Somebody's

  • Attaching search criteria to a site

    Hi! Is there a way to attach search criteria to a site. I mean... when you are constructing a site in dreamweaver, is there a way to sort of attach search words to the site. So that when people search for those words on google, your site comes up. Fo