on 09-10-2008 12:37 PM
Counter to be maintained for every execution of map.Requirement is to generate sequence number which should be like counter.Whenever this map runs and file is created, sequnece numberhas to be generated and it should be appended accordingly when it runs for second time.Like on a particular day, if this interface runs once, counter should be populated as once and next time when it runs it should be incremented to 2
Hi,
there is a option of add counter in File Construction Mode of Receiver file adapter. U can try to use that I m not sure whether it will work for ur specific requirement or not? but atleast u can give a try.
chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wat I understood is
first time ur mapping is run the counter value is set to 1 and is mapped to target.
second time the same mapping is run counter shud be incremented by one and mapped to target field.
this is wat u r looking for.
if yes:
what u can do is u can maintain one table which shud hold the interface no and count no.
first time when mapping runs the table will be updated with count value one. when the mapping run second time the counter value will be incremented n it will update the data in that table.
u have to use the lookup.
chirag
Hi,
We can do through UDF, develop simple UDF function for counter and result will be stored in file along with date along with reference number. Each transaction function will search automatically if reference number is exit or not, if exit increment counter and pass to target structure else store the value in file and pass counter value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
you can do this by using global container veriable in the UDF.
This object enables you to cache the values that you want to read again when you next call the same user-defined function or a different user defined function .
you can create container veriable by using
GlobalContainer globalContainer;
globalContainer = container.getGlobalContainer( );
and to set the value you can use these method
void setParameter (String parName, Object obj);
and to get the value again use
Object getParameter(String parName);
regards,
navneet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.