For Next loop in allocations

Request help in writing a allocation logic code.
The current runs for 2600 Projects and 12000 customers. This causes memory issue and the code is aborted when run.
Please suggest if this code can be run in a For/Next loop for each project..
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
*XDIM_MEMBERSET TIME = %TIME_SET%
*WHEN ACCOUNT
*IS "A1100001"
*REC(EXPRESSION = ([ACCOUNT].[A1100001])*((%VALUE%)),ACCOUNT = "A3100001")
*ENDWHEN
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET ACCOUNT = BAS(MET-SAL.3.1)
*XDIM_MEMBERSET P_PROJECT = BAS(AllProjects)
*XDIM_ADDMEMBERSET P_PROJECT = NO_PROJECT
*XDIM_MEMBERSET P_DEPARTMENT = ESG_Input
*XDIM_MEMBERSET P_ENTITY = TTEU_INP
*XDIM_MEMBERSET P_CUSTOMER = No_Customer
*XDIM_ADDMEMBERSET P_CUSTOMER = BAS(AllCustomers)
*XDIM_MEMBERSET P_ANALYSIS = BAS(AllAnalysis)
*XDIM_ADDMEMBERSET P_ANALYSIS = NO_ANALYSIS
*RUNALLOCATION
*FACTOR = 1
*DIM ACCOUNT WHAT = BAS(MET-SAL.3.1) ; WHERE = <<<;USING = <<<;TOTAL = <<<
*DIM P_PROJECT WHAT = NO_PROJECT ;WHERE = <<< ;USING = <<<;TOTAL = <<< 
*DIM P_DEPARTMENT WHAT = ESG_Input ;WHERE = <<< ;USING = <<<;TOTAL = <<< 
*DIM P_ENTITY WHAT = TTEU_INP ;WHERE = <<< ;USING = <<<;TOTAL = <<< 
*DIM P_ANALYSIS WHAT = NO_ANALYSIS ;WHERE = BAS(AllAnalysis) ;USING = <<<;TOTAL = <<< 
*DIM P_CUSTOMER WHAT = No_Customer ;WHERE = BAS(AllCustomers) ;USING = <<<;TOTAL = <<<
*ENDALLOCATION
next

I realized that while checking and have removed the section for recording expression.. and now only focusing to correct the Allocation logic. Based on your advice I have added the FOR/NEXT as below.
The code is now only running for EDCTM-0007 but fails to generate any records for EDCTM-0014.
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET ACCOUNT AS %SAL% = BAS(MET-SAL.3.1)
//*XDIM_MEMBERSET P_PROJECT = BAS(AllProjects)
*XDIM_MEMBERSET P_PROJECT AS %PRJ% = EDCTM-0007, EDCTM-0014
*XDIM_ADDMEMBERSET P_PROJECT = NO_PROJECT
*XDIM_MEMBERSET P_DEPARTMENT = BAS(AllDepartments)
*XDIM_MEMBERSET P_ENTITY = BAS(AllEntities)
*XDIM_MEMBERSET P_CUSTOMER = BAS(AllCustomers)
*XDIM_MEMBERSET P_ANALYSIS = BAS(AllAnalysis)
*XDIM_MEMBERSET RPTCURRENCY = INR, CAD, EUR, GBP, KRW, MXN, SGD, THB, USD
*FOR %PRJ% = EDCTM-0007, EDCTM-0014
*RUNALLOCATION
*FACTOR = 1
*DIM ACCOUNT WHAT = %SAL%; WHERE = <<<; USING = <<<; TOTAL = <<<
*DIM P_DEPARTMENT WHAT = ED_Input; WHERE = ED16; USING = <<<; TOTAL = <<<
*DIM P_ENTITY WHAT = PUN_C; WHERE = <<<; USING = <<<; TOTAL = <<<
*DIM P_CUSTOMER WHAT = No_Customer; WHERE = C100700; USING = <<<; TOTAL = <<<
*DIM P_PROJECT WHAT = NO_PROJECT; WHERE = %PRJ%; USING = <<<; TOTAL = <<<
*DIM P_ANALYSIS WHAT = NO_ANALYSIS; WHERE = TM_S; USING = <<<; TOTAL = <<<
*ENDALLOCATION
*COMMIT
*NEXT
log..
   FILE:\ROOT\WEBFOLDERS\ENVIRONMENTSHELL1\ADMINAPP\Planning_TTL\CP_RAVINNINE.LGF
USER:RAVINDRA.S
APPSET:ENVIRONMENTSHELL1
APPLICATION:Planning_TTL
FACTOR:1
ALLOCATION DATA REGION:
CATEGORY:Budget,
P_PROJECT:NO_PROJECT,
P_DEPARTMENT:Admin_Entity,Admin_Group,BRT_Entity,CEO_Entity,CEO_Group,COO_Entity,COO_Group,CSR_Entity,CSR_Group,ED01,ED02,ED03,ED04,ED05,ED06,ED07,ED08,ED09,ED10,ED11,ED12,ED13,ED14,ED15,ED16,ED_Input,ESG01,ESG02,ESG03,ESG04,ESG05,ESG06,ESG07,ESG08,ESG09,ESG10,ESG_Input,Finance_Entity,Finance_Group,GDO_Entity,HR_Entity,HR_Group,IT_Ent_Apps_Entity,IT_Ent_Apps_Group,IT_Ops_Infra_Entity,IT_Ops_Infra_Group,Legal_Entity,Legal_Group,Mktg_Entity,Mktg_Group,NO_DEPT,OSM_Entity,OSM_Group,PL01,PL02,PL03,PL04,PL05,PL06,PL07,PL08,PL09,PLM_P_Input,PLM_P_Services_Input,PLM_S_Input,PP01,PP02,PP03,PP04,PP05,Products_Autodesk,Products_Dassault,Products_IBM,Products_IKS,Products_MSC,Products_Others,Products_UGS,Quality_Entity,Quality_Group,VP01,VPD01,VPD_Input,
P_ENTITY:BLO_C,BLO_Input,BLO_NC,BLR_C,BLR_Input,BLR_NC,BOM_C,BOM_Input,BOM_NC,BRG_C,BRG_Input,BRG_NC,BRZ_C,BRZ_Input,BRZ_NC,CAN,DEL_C,DEL_Input,DEL_NC,GER,GIP,HNJ_C,HNJ_Input,HNJ_NC,JSE_C,JSE_Input,JSE_NC,JSR_C,JSR_Input,JSR_NC,LKQ_C,LKQ_Input,LKQ_NC,MEX,NLD,PNQ_C,PNQ_Input,PNQ_NC,PUD_C,PUD_Input,PUD_NC,PUN_C,PUN_Input,PUN_NC,SAS,SIG,SKR,THD,THE,TTCN_INP,TTEU_INP,TTL_INP,TTMX_INP,TTPL_INP,TTTH_INP,TTUS_INP,UKG_Input,UKG_J,UKG_N,USA,
P_CUSTOMER:C000001,C000002,C000003,C000004,C000005,C000006,C000007,C000008,C000009,C000010,C000011,C000012,C000013,C000014,C000015,C000016,C000017,C000018,C000019,C000020,C000021,C000022,C000023,C000024,C000025,C000026,C000027,C000028,C000029,C000030,C000031,C000032,C000033,C000034,C000035,C000036,C000037,C000038,C000039,C000040,C000041,C000042,C000043,C000044,C000045,C000046,C000047,C000048,C000049,C000050,C000051,C000052,C000053,C000054,C000055,C000056,C000057,C000058,C000059,C000060,C000061,C000062,C000063,C000064,C000065,C000066,C000067,C000068,C000069,C000070,C000071,C000072,C000073,C000074,C000075,C000076,C000077,C000078,C000079,C000080,C000081,C000082,C000083,C000084,C000085,C000086,C000087,C000088,C000089,C000090,C000091,C000092,C000093,C000094,C000095,C000096,C000097,C000098,C000099,C000100,C000101,C000102,C000103,C000104,C000105,C000106,C000107,C000108,C000109,C000110,C000111,C000112,C000113,C000114,C000115,C000116,C000117,C000118,C000119,C000120,C000121,C000122,C000123,C000124,C000125,C000126,C000127,C000128,C000129,C000130,C000131,C000132,C000133,C000134,C000135,C000136,C000137,C000138,C000139,C000140,C000141,C000142,C000143,C000144,C000145,C000146,C000147,C000148,C000149,C000150,C000151,C000152,C000153,C000154,C000155,C000156,C000157,C000158,C000159,C000160,C000161,C000162,C000163,C000164,C000165,C000166,C000167,C000168,C000169,C000170,C000171,C000172,C000173,C000174,C000175,C000176,C000177,C000178,C000179,C000180,C000181,C000182,C000183,C000184,C000185,C000186,C000187,C000188,C000189,C000190,C000191,C000192,C000193,C000194,C000195,C000196,C000197,C000198,C000199,C000200,C000201,C000202,C000203,C000204,C000205,C000206,C000207,C000208,C000209,C000210,C000211,C000212,C000213,C000214,C000215,C000216,C000217,C000218,C000219,C000220,C000221,C000222,C000223,C000224,C000225,C000226,C000227,C000228,C000229,C000230,C000231,C000232,C000233,C000234,C000235,C000236,C000237,C000238,C000239,C000240,C000241,C000242,C000243,C000244,C000245,C000246,C000247,C000248,C000249,C000250,C000251,C000252,C000253,C000254,C0002
P_ANALYSIS:FB_M,FB_S,NO_ANALYSIS,TM_M,TM_S,
RPTCURRENCY:CAD,EUR,GBP,INR,KRW,MXN,SGD,THB,USD,
ACCOUNT:WHAT:MET-SAL.1.1,MET-SAL.5.1, MET-SAL.1.2,MET-SAL.5.2, MET-SAL.1.3,MET-SAL.5.3, MET-SAL.1.4,MET-SAL.5.4, MET-SAL.1.5,MET-SAL.5.5, MET-SAL.1.6,MET-SAL.5.6, MET-SAL.1.7,MET-SAL.5.7, MET-SAL.1.8,MET-SAL.5.8,WHERE:<<<,USING:<<<,TOTAL:<<<
P_DEPARTMENT:WHAT:ED_Input,WHERE:ED16,USING:<<<,TOTAL:<<<
P_ENTITY:WHAT:PUN_C,WHERE:<<<,USING:<<<,TOTAL:<<<
P_CUSTOMER:WHAT:No_Customer,WHERE:C100700,USING:<<<,TOTAL:<<<
P_PROJECT:WHAT:NO_PROJECT,WHERE:EDCTM-0007,USING:<<<,TOTAL:<<<
P_ANALYSIS:WHAT:NO_ANALYSIS,WHERE:TM_S,USING:<<<,TOTAL:<<<
--Read WHAT region
[P_DEPARTMENT] =ED_Input
[P_CUSTOMER] =No_Customer
[P_PROJECT] =NO_PROJECT
[P_ANALYSIS] =NO_ANALYSIS
[CATEGORY] =Budget
[RPTCURRENCY] =CAD,EUR,GBP,INR,KRW
--Time to load WHAT :0.2066 second(s).
WHAT data:1680 records.
--Apply factor
WHERE=WHAT *1
--Time to apply factor :0.003074 second(s).
--Read destination and calculate difference
[P_DEPARTMENT] =ED16
[P_CUSTOMER] =C100700
[P_PROJECT] =EDCTM-0007
[P_ANALYSIS] =TM_S
[CATEGORY] =Budget
[RPTCURRENCY] =CAD,EUR,GBP,INR,KRW
--Time to read destination and calculate difference :0.14611 second(s).
--Records succeeded to write back :1680
--Records failed to write back
--Time to run Allocation :0.390015 second(s).
FACTOR:1
ALLOCATION DATA REGION:
CATEGORY:Budget,
ACCOUNT:WHAT:MET-SAL.1.1,MET-SAL.5.1, MET-SAL.1.2,MET-SAL.5.2, MET-SAL.1.3,MET-SAL.5.3, MET-SAL.1.4,MET-SAL.5.4, MET-SAL.1.5,MET-SAL.5.5, MET-SAL.1.6,MET-SAL.5.6, MET-SAL.1.7,MET-SAL.5.7, MET-SAL.1.8,MET-SAL.5.8,WHERE:<<<,USING:<<<,TOTAL:<<<
P_DEPARTMENT:WHAT:ED_Input,WHERE:ED16,USING:<<<,TOTAL:<<<
P_ENTITY:WHAT:PUN_C,WHERE:<<<,USING:<<<,TOTAL:<<<
P_CUSTOMER:WHAT:No_Customer,WHERE:C100700,USING:<<<,TOTAL:<<<
P_PROJECT:WHAT:NO_PROJECT,WHERE:EDCTM-0014,USING:<<<,TOTAL:<<<
P_ANALYSIS:WHAT:NO_ANALYSIS,WHERE:TM_S,USING:<<<,TOTAL:<<<
"LC" has been added as default currency in allocation.
--Read WHAT region
[P_DEPARTMENT] =ED_Input
[P_CUSTOMER] =No_Customer
[P_PROJECT] =NO_PROJECT
[P_ANALYSIS] =NO_ANALYSIS
[CATEGORY] =Budget
[ACCOUNT] =MET-SAL.1.1,MET-SAL.1.2,MET-SAL.1.3,MET-SAL.1.4,MET-SAL.1.5
--Time to load WHAT :0.060259 second(s).
WHAT data:0 records.
--Apply factor
WHERE=WHAT *1
--Time to apply factor :0.000028 second(s).
--Read destination and calculate difference
[P_DEPARTMENT] =ED16
[P_CUSTOMER] =C100700
[P_PROJECT] =EDCTM-0014
[P_ANALYSIS] =TM_S
[CATEGORY] =Budget
[ACCOUNT] =MET-SAL.1.1,MET-SAL.1.2,MET-SAL.1.3,MET-SAL.1.4,MET-SAL.1.5
--Time to read destination and calculate difference :0.05125 second(s).
--Records succeeded to write back
regards, Prashant

Similar Messages

  • FOR/NEXT loop produces Error in ProcessSQL: Subscript out of range

    Hi all,
    The 2nd FOR/NEXT loop in the following code produces Subscript ouf of Range error:
    *LOOKUP RATEAPP
    *DIM MODEL:RATEENTITYDIM= DRIVEDIM.DRIVER_ENTITY
    *DIM MODEL:RATEACCOUNTDIM= DRIVEDIM.DRIVER
    *DIM MODEL:INPUTCURRENCYDIM = "EUR"
    *ENDLOOKUP
    // Select lookup and normal members by group
    *SELECT(%DRIVERSA%, ID, DRIVEDIM, "[GROUP] = 'A' AND [DRIVER] <> ''")
    *SELECT(%MANUALSA%,ID,DRIVEDIM, "[GROUP] = 'A' AND [SOURCE] = 'MAN'")
    *XDIM_MEMBERSET DRIVEDIM= %MANUALSA%, "U_TEMP"
    *WHEN ACCOUNTDIM.ACCTYPE
    *IS *
         *REC(EXPRESSION=1, NOADD, DRIVEDIM="U_TEMP")
    *ENDWHEN
    *GO
    // this is ok
    *FOR %MANSET% = %MANUALSA%
         *WHEN DRIVEDIM
         *IS %MANSET%
         *WHEN %VALUE%
         *IS <> 0
                   *REC(FACTOR=GET(DRIVEDIM="AD.TEMP"),DRIVEDIM="AD.TEMP")
         *ENDWHEN
         *ENDWHEN
    *GO
    *NEXT
    *XDIM_MEMBERSET DRIVEDIM= %DRIVERSA%, "U_TEMP"
    // this is not OK
    *FOR %DRIVSET% = %DRIVERSA%
         *WHEN DRIVEDIM
         *IS %DRIVSET%
              *WHEN %VALUE%
              *IS <> 0
                   *REC(FACTOR= GET(DRIVEDIM="U_TEMP") * LOOKUP(MODEL),DRIVEDIM="U_TEMP") //  * LOOKUP(MODEL)
              *ENDWHEN
         *ENDWHEN
    *GO
    *NEXT
    If I remove the FOR/NEXT loop, this runs fine. The error occurs everywhere - in logic debugger, in DB, in ExecuteBaseLogic if included in Default logic. The REC statement inside the loop can be anything, even as simple REC(FACTOR=1,DRIVEDIM="U_TEMP"), so the problem is in the loop, not anything else. It validates nicely and the compiled logic looks just as expected.
    This error could occur sometimes if the membersets are too large. However, in this example, the number of members is rather limited. In the debugger is is possible to limit the data region to single specific intersection and the DRIVEDIM membersets combined is exacly 15.
    Could it be possible that the error is caused by member ID-s like AD.1.AVGWAGEGROWTH (length=18)? Is there anything else that can cause  trouble?
    Any ideas appreciated.
    Thanks
    Madis
    Edited by: Madis Udam on Mar 24, 2011 11:06 AM

    I don't think you should have"." dot's in you ID's.
    think about it, in your code you have ACCOUNTDIM.ACCTYPE, which represents the account type of the dimension.
    If you have an id "AD.1.AVGWAGEGROWTH"; wouldn't it think that you are trying the get a value of some member?
    That's just a guess, we established that we wouldn't use any special characters on our id's
    It's working so far
    Try changing the line
    *IS %DRIVSET%
    to
    *IS "%DRIVSET%"
    Edited by: Leandro Cardoso Feliciano on Mar 28, 2011 10:45 PM

  • I want to use for next loop to reduce code for doing removechild()'s

    I have working if (addChild(bmp1)) ----removeChild(bmp1). But I need to do it 20 times. I thought I could use a for/next loop, but so far can't seem to get it right.
    for (var i:Number=0; i<21; I++)
    my_bmp.name = "bmp" + 1;
    if (addChild(my_bmp))
    removeChild(my_bmp);
    This code passing the compiler, but when I execute it I get "A term is undefined and has no properties". I'm thinking it has something to do with  my_bmp.name? I've tried several things and just can't crack it.

    The name of an object is just a string.  to have the compiler treat it as an object you can use the getChildByName() method or even the bracket notation.
    removeChild(this.getChildByname(my_bmp));
    OR
    removeChild(this[my_bmp]);
    I am guessing that you intend to use "bmp"+String(i) instead of "bmp"+1

  • 106 nested for next loops!

    Well, this is not a problem, but I just had to mention that I could not believe that Java would actually process 106 nested for next loops. I had an hour of free time yesterday and we needed to run an exhaustive branch test of an application that we have, to do so we needed to have 104 data elements generated with all possible cases. I thought, what the heck, and tried it in Java--our old language wouldn't do that on it's best day and in our dreams! Java did it, it not only did it, but it left a clean environment after it was done!

    well, here is more the thing that comes to mind with i think about loop limits: in VB when you get a dozen or so pending closing parentesis, things start to go funny in memory and in some cases, the formula/routine becomes too complicated to interpret. Just how many pending closing parentesis will be accepted before things go bonkers.

  • For next loop

    I want to see this in a Java applet:
    1 2 3 4 5 6 7 8 9 10
    but I only see then in my Applet. What do I wrong??
    this is the code:
    package untitled9;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class Applet1 extends Applet
    int x = 10;
    int y;
    int i;
    public void paint(Graphics g)
    g.setColor(Color.blue);
    for ( i = 1; i<=9 ; i++);
    g.drawString("" + i , x, 10);
    x = x + 10;
    I make the X 10 higher each time... so I don't understand why I only see 10 in the applet...

    ok, but the question is why there come no numbers like this:
    1 2 3 4 5 6 7 8 9
    you understand what I mean now??

  • Quick key launch for next frame in sequenced loop?

    Hi, 
    I want go quickly through my sequence loop. Is there a key combo for next frame?
    Thanks
    Solved!
    Go to Solution.

    ctrl + mousewheel will skip through frames in all structures
    - Cheers, Ed

  • Wait for Next Sample Clock error, or 'How do I put this VI on a diet'?

    Hello!
    In the attached VI I've been running since June, I have all the functionality I need.  No questions there at all, thanks to much time and help from this board!
    My nagging problem is that any time I use the PC for other minor tasks other than Labview, it will display the following error:
    209802 occurred at DAQmx Wait For Next Sample Clock.vi:1
    A search earlier in the month indicated that it could have been a result of my old and outdated PC; I've since replaced it with a brand-new dell dimension 1100.  Celeron 2.53ghz with 1.00gb of ram.  Should be enough to service Labview and other minor tasks (automatic antivirus updating and also maintenance tasks).  However, any time any other program opens or even if the screen is scrolled around on Labview quickly, I get that same error.
    Resource usage when idle, with nothing but this VI running is 5-10%, all labview.  Upon scrolling the VI, it quickly jumps to the 58-60% and above mark and soon throws that error.
    I know that there's a lot of code here that can be cleaner--I know that even though it's functioning correctly, there could be a less resource-hogging way to go about it.  Can anyone give me any suggestions on how to make this VI a little 'lighter'?
    Thanks so much in advance,
    Ralph
    Still confused after 8 years.
    Attachments:
    Currently Running 063006.vi ‏899 KB

    Hi Ralph,
    The wait.vi waits until the amount of time has passed. While the wait on next ms.vi uses some kind of quotient and remainder on the computer time until the remainder passed zero.
    In this way you can synchronize 2 loops, and somehow it is less time-consuming. The only difference you will see is in the first run!
    There you see a smaller amount of time:
    Message Edited by TonP on 10-04-2006 04:21 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Example_BD.png ‏2 KB

  • "for each" loop - under the hood question

    Question about the for each loop. Is it optomized? I think this is a poor use of memory management -
    for (int i = 0; i < stop; i++) {
    Object obj = new Object();
    doSomething(obj);
    }And this is the ideal, using the same object -
    Object obj = new Object();
    for (int i = 0; i < stop; i++) {
    doSomething(obj);
    }So underneath the hood, which is the for each loop comparable to? I love the syntax, it's very clean-looking in the code, but at the same time I don't want to hurt performance.

    Question about the for each loop. Is it optomized? I
    think this is a poor use of memory management -
    for (int i = 0; i < stop; i++) {
    Object obj = new Object();
    doSomething(obj);
    }And this is the ideal, using the same object -
    Object obj = new Object();
    for (int i = 0; i < stop; i++) {
    doSomething(obj);
    }So underneath the hood, which is the for each loop
    comparable to? I love the syntax, it's very
    clean-looking in the code, but at the same time I
    don't want to hurt performance.That depends on YOU. You CANNOT write a for-each loop for the code you provided. A for-each loop requires an Iterable. (I think that's what it requires--it at least requires something to iterate over, not just an index variable as you have.)
    Consider the following, however:
    Object o1 = new Object();
    for (Foo foo : fooList) {
        Object o2 = new Object();
         foo.doStuff(o1, o2);
    } It will be equivalent to this:Object o1 = new Object();
    for (Iterator iter = foo.iterator(); iter.hasNext();) {
        Foo foo = (Foo)iter.next();
        Object o2 = new Object();
        foo.doStuf(o1, o2);
    } How could it be any different? It has to keep the behvior of the "old fashioned" iteration.

  • For each activity for sibling Loops

    Hi All,
    I have a below type of xml structrure. I am trying to use XSLT for transforming this format to separate xml which I will to insert data in DB using db adapter
    <Loop-2000A>
    <Element-628>1</Element-628>
    <Element-734 xsi:nil="true"/>
    <Element-735>20</Element-735>
    <Element-736>1</Element-736>
    </Loop-2000A>
    <Loop-2000B>
    <Element-98>PR</Element-98>
    <Element-1065>2</Element-1065>
    <Element-1035>ABC PQR</Element-1035>
    <Element-1036 xsi:nil="true"/>
    <Element-1037 xsi:nil="true"/>
    <Element-1038 xsi:nil="true"/>
    <Element-1039 xsi:nil="true"/>
    <Element-66>PI</Element-66>
    <Element-67>953893470</Element-67>
    </Loop-2000B>
    <Loop-2000B>
    <Element-98>PR1</Element-98>
    <Element-1065>22</Element-1065>
    <Element-1035>abcd DDH</Element-1035>
    <Element-1036 xsi:nil="true"/>
    <Element-1037 xsi:nil="true"/>
    <Element-1038 xsi:nil="true"/>
    <Element-1039 xsi:nil="true"/>
    <Element-66>PI</Element-66>
    <Element-67>953893470</Element-67>
    </Loop-2000B>
    <Loop-2000B>
    <Element-98>PR2</Element-98>
    <Element-1065>24</Element-1065>
    <Element-1035>pqrDCH</Element-1035>
    <Element-1036 xsi:nil="true"/>
    <Element-1037 xsi:nil="true"/>
    <Element-1038 xsi:nil="true"/>
    <Element-1039 xsi:nil="true"/>
    <Element-66>PI</Element-66>
    <Element-67>953893470</Element-67>
    </Loop-2000B>
    <Loop-2000A>
    <Element-628>1</Element-628>
    <Element-734 xsi:nil="true"/>
    <Element-735>20</Element-735>
    <Element-736>1</Element-736>
    </Loop-2000A>
    <Loop-2000B>
    <Element-98>PL</Element-98>
    <Element-1065>12</Element-1065>
    <Element-1035>RAS BKU</Element-1035>
    <Element-1036 xsi:nil="true"/>
    <Element-1037 xsi:nil="true"/>
    <Element-1038 xsi:nil="true"/>
    <Element-1039 xsi:nil="true"/>
    <Element-66>PI</Element-66>
    <Element-67>953893470</Element-67>
    </Loop-2000B>
    <Loop-2000B>
    <Element-98>PS2</Element-98>
    <Element-1065>28</Element-1065>
    <Element-1035>pqrDMH</Element-1035>
    <Element-1036 xsi:nil="true"/>
    <Element-1037 xsi:nil="true"/>
    <Element-1038 xsi:nil="true"/>
    <Element-1039 xsi:nil="true"/>
    <Element-66>PI</Element-66>
    <Element-67>953893470</Element-67>
    </Loop-2000B>
    In this case LOOP-2000A reprsents hospitals.while LOOP-2000B represents patients.One hospital can have multiple patients.Though in xml,LOOP-2000B is not child of LOOP-2000A. Actually it is like that:one LOOP-2000A is followed by many LOOP-2000B..that means one hospital has that many patients.Then next loop 2000A is followed by another set of LOOP 2000B which represents next hospital has that many patients.
    I have a requirement where I need to insert records in DB,where each patient will have one record in DB.I am trying to use for-each at loop 2000A and subsequently for-each at LOOP-2000B,but it is not working.It is not iterating on next set of patients.It is always copying the same patient.
    Any pointers in this regard will be helpful.

    The xml was,
    <ns:A xmlns ns="A">
    <ns:a>1</ns:a>
    <ns:a>2</ns:a>
    <ns:a>3</ns:a>
    <ns:A>
    Edited by: Prabu on Aug 30, 2010 12:55 PM
    Edited by: Prabu on Aug 30, 2010 12:55 PM
    Edited by: Prabu on Aug 30, 2010 12:56 PM

  • For Each Loop: Enumerator Configuration In the For each loop Editor Help needed

    Hi All,
    I have a package that runs and updates a table with everytime someone adds a flat file in the source folder. One of the requirement is to upload files with the following
    ACA Flat files will have a naming convention of “ACA_ccyy_<julian date>”  : How can I add this?
    Under Files this is how I have setup the qualifies "ACA_*.*"
    Is there anyway to pass the entire naming convention in the file section? If so how can I ?
    Please help?
    FM

    As you have ACA_*.* set in Files Filter, it will return all the files from the folder which start with ACA_.
    You can have one dummy Sequence Container inside FE Loop Container. Connect it to your starting task and do right click on Precedence Constraint and write the expression the way you want by using SSIS functions. If the expression is evaluated to True only
    then it will go to the next task.
    In this way you can skip Non-ACA files.
    Please refer:
    SSIS Skip Certain Files in a For Each Loop
    - Vaibhav

  • LV PDA 8 wait for ms and wait for next N ms multiple costs extrem performance.

    Dear LV PDA users.
    There is another bug using the PDA toolkit.
    The usage of wait for ms and wait for next N ms multiple costs me 200ms while the input is 1ms.
    I have tried it without the wait functions and the looptiming was 0..1ms.
    One possible workaround is to use timout events with while loops.
    This works fine without delays.
    With kind regards
    Martin Kunze
    KDI Digital Instrumentation.com
    e-mail: [email protected]
    Tel: +49 (0)441 9490852

    This issue has already been reported to the R&D group at NI (at least that is what I'm told) ...  refer to this thread ... Here

  • How to  open the file writer for next entry after stream is close?

    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.Scanner;
    public class TryOut {
         public static void main(String args[]) throws IOException{
              int inputQuestionnAireNum = 0;
              int inputPostCode = 0;
              int inputGender = 0;
              int inputAge = 0;
              int x=0;
              Scanner input = new Scanner(System.in);
              FileWriter fwrite = new FileWriter("tryout.txt", true);
              BufferedWriter out = new BufferedWriter(fwrite);
              boolean invalidNum = false;           
              do{
                   System.out.print("1 new entry or 0 print");
                   x = Integer.parseInt(input.nextLine());  
                   if(x == 1)
                      //Questionnaire Number
                        System.out.print("Enter Questionnaire Number [ ] ");
                        inputQuestionnAireNum = Integer.parseInt(input.nextLine());
                        out.write("NumBER OF Q: "+inputQuestionnAireNum+", ");
                        //Postal code
                        System.out.print("Enter Postal Code [ ] ");     
                        inputPostCode = Integer.parseInt(input.nextLine());
                        out.write("PostCode: "+inputPostCode+", ");
                        //Age
                        System.out.print("Enter Age [ ] ");
                        inputAge = Integer.parseInt(input.nextLine());
                        out.write("Age: "+inputAge+", ");
                        //Gender
                        System.out.print("Enter Gender '1' for Male and '2' for for female [ ] ");
                        inputGender = Integer.parseInt(input.nextLine());
                        out.write("Gender: "+inputGender+", \n");
                        out.close();          
                           } while(x != 0);
         Result:
    1 new entry or 0 print1
    Enter Questionnaire Number [ ] 2
    Enter Postal Code [ ] 1
    Enter Age [ ] 3
    Enter Gender '1' for Male and '2' for for female [ ] 4
    1 new entry or 0 print1
    Enter Questionnaire Number [ ] 2
    Exception in thread "main" java.io.IOException: Stream closed
         at java.io.BufferedWriter.ensureOpen(BufferedWriter.java:98)
         at java.io.BufferedWriter.write(BufferedWriter.java:203)
         at java.io.Writer.write(Writer.java:126)
         at TryOut.main(TryOut.java:31)
    Hi, how can i open the file writer stream again for next entry after it is has been closed? if i do not close(); all my entry will not be recorded to the text file. how can i solve this ?
    Edited by: metaroot on Feb 18, 2008 6:39 PM

    The short answer to your question: use out=new BufferedWriter(fwrite) inside the do loop as well.The only difference that would make would be to make the problem worse. It is poor practice. Stream stacks should be constructed once for the life of the stream.
    What he needs to do is close his stream outside the loop, possibly calling flush() where he presently has close().
    The more relevant answer is: Why are you not wrapping the user-friendly PrintWriter class, wrapping it around the BufferedWriter?Possibly because he doesn't like the fact that PrintWriter swallows exceptions? which makes it less user-friendly IMO.
    The println and print methods are very useful, and do not need closing between loop iterations.Neither does anything else.
    By the way,you say that without a close() the BufferedWriter doesn't output to the file.I don't know: I never used/tried it.Even if it doesn't, it will surely output after you come out of the loop.If you don't want to use a PrintWriter, why don't you investigate this?Posting guesses here isn' t really much help, especially about something you've never used. A BufferedWriter has a buffer and it doesn't write anything until the buffer is full, you flush it, or your close it.

  • Hostscan is waiting for next scan

    Hi gurus
     Everytime I start annyconnect it goes through all the steps but hangs on 
    " hostscan is waiting for next scan" and do nothing
    Thanks a bunch gurus

    Having this problem too recently with one of company machines. It gets stuck on the hostscan phase and just keeps looping with that same error " hostscan is waiting for next scan". If I disable the hostscan on the ASA for that specific VPN profile it works fine. We have hundreds of other machines that work fine, so this is limited issue being experienced on one machine so far.
    Would appreciate it if anyone has found a solution for this. AnyConnect Version 3.1.04072, hostscan version 3.104072, Windows 7
    Thanks

  • Highest speed for a loop in the microprocessor of my CRIO?

    Hello:
    Im trying to develop a control system for an inverter with with my CRIO 9022, the speed of my system is 10 kHz(the switching frequency for the inverter is 10 kHz).
    Im trying to develop the controller using the microprocesor, but I was reading that the highest speed achievable for a loop in the microprocessor is around 1 Khz, is this true?
    If is it, how can I develop a control with a loop of 10 Khz? this speed is only achievable using the FPGA?
    Thanks a lot!
    Regards

    Sorry for dont attach the subVI, but the calculation that I perform inside are not diffcult, the first one is only aritmetic calculations and the second one is a PID (I attach them).
    Maybe I can try to move them to the FPGA, but would be very tedious because I need huge times for compile and if I want to make any change will be very more difficult.
    Do you think that the processor can not carry out these loop a higher speed than 400 Hz?
    Thanks
    Attachments:
    SubVI1.PNG ‏50 KB
    SubVI2(PID).PNG ‏81 KB

  • Creating new 'category/index' for apple loops in logic

    As well as the standard apple loops, I currently have an additional apple loops jampack & a number of self-made apple loops.
    These have been indexed automatically, & can be referenced via the drop-down on the top right of the loop browser as 'jampack' & 'my loops' respectively.
    I've just bought a 3rd party dvd of apple loops, & would like to be able to reference these via the same kind of category in the loopbrowser drop down, however, the 3rd party DVD has no 'installer' like the official jampack, but instead just has folders of 'apple-loopyfied' AIFFs to drop in the loop browser.
    I assume if this is the case they will appear by default under 'my loops', which isn't ideal - is there a way I can manually create another category(/folder?) for these loops which I can reference via Logic's loop browser drop-down?
    Any help appreciated
    Adam

    ok, still stuck on this but have found the following from page 61 on 'new in logic 7.2'
    http://manuals.info.apple.com/en/NewFeatures_in_Logic_Pro7.2.pdf
    'To keep things tidy, the loop browser offers advanced loop management tools, the jam pack management drop-down allows you to limit the display to loops from a specific jam pack, or other folder' .....then....describing an option from the pull-down, 'vendor x - choose to play loops from a specific third party vendor'
    - this looks perfect for what i want to do, but i assume a vendor must include certain data/meta-data in their loops for this indexing to work & display under vendor x as a dropdown, how do i know if the dvd I have bought will have this? hmmmm....

Maybe you are looking for