Topic
  • 14 replies
  • Latest Post - ‏2009-06-02T14:38:02Z by SystemAdmin
garret_ok
garret_ok
9 Posts

Pinned topic Synch Server variables

‏2006-10-02T08:58:55Z |
Hi,
Anyone know where I'd find the complete list of variables which can be used in the Synch Server, e.g. variables such as $USERNAME which can be used as part of the horizontal filtering?
Thanks,
Garret
Updated on 2009-06-02T14:38:02Z at 2009-06-02T14:38:02Z by SystemAdmin
  • snowkitty
    snowkitty
    64 Posts

    Re: Synch Server variables

    ‏2006-10-08T10:07:15Z  
    Hi Garret,

    $USERNAME is the only variable used in sync server filter.

    Thanks

    Alice
  • SystemAdmin
    SystemAdmin
    6968 Posts

    Re: Synch Server variables

    ‏2006-11-01T08:39:40Z  
    • snowkitty
    • ‏2006-10-08T10:07:15Z
    Hi Garret,

    $USERNAME is the only variable used in sync server filter.

    Thanks

    Alice
    How to define new variable on server, and
    How to pass value from device sync client to server?

    thank you.
  • snowkitty
    snowkitty
    64 Posts

    Re: Synch Server variables

    ‏2006-11-01T09:30:36Z  
    How to define new variable on server, and
    How to pass value from device sync client to server?

    thank you.
    Hi Yang,

    You can refer to the usage here:

    http://publib.boulder.ibm.com/infocenter/db2e/v8r2/index.jsp?topic=/com.ibm.db2e.doc/vert_filter_group.html
  • SystemAdmin
    SystemAdmin
    6968 Posts

    Re: Synch Server variables

    ‏2006-11-01T09:55:01Z  
    To define new variable on server, the steps are as below:
    1. On the Data filter page of the Create Group or Change Group notebook, click Add.
    2. Type the filter parameter name in the Parameter name field. This is the name you used when defining the horizontal mirror filter. It must begin with a colon (:) and follow DB2 UDB rules for ordinary parameters.
    3. Type a default filter parameter value in the Default value field. This value is substituted for the parameter name in the horizontal mirror filter. The DB2 Everyplace Sync Server sends all users within this group the rows that fulfill the horizontal mirror filter.
    4. Click OK to close the Add Filter window. If you have more default filter parameter name and values to define, click Apply and repeat steps 2-3.

    As for how to pass value from device sync client to server, i am sorry that i can't fully understand your question. Could you give me some detailed information? Thank you in advance.

    For more information, you can refer to DB2e Information center, and the chapter is "Adminstratering table filters in order to manager data". And I put the link below for your convenience:

    http://publib.boulder.ibm.com/infocenter/db2e/v8r2/index.jsp?topic=/com.ibm.db2e.doc/glu_admin_filters.html
  • SystemAdmin
    SystemAdmin
    6968 Posts

    Re: Synch Server variables

    ‏2006-11-01T10:07:17Z  
    How to define new variable on server, and
    How to pass value from device sync client to server?

    thank you.
    To define new variable on server, the steps are as below:
    1. On the Data filter page of the Create Group or Change Group notebook, click Add.
    2. Type the filter parameter name in the Parameter name field. This is the name you used when defining the horizontal mirror filter. It must begin with a colon ( and follow DB2 UDB rules for ordinary parameters.
    3. Type a default filter parameter value in the Default value field. This value is substituted for the parameter name in the horizontal mirror filter. The DB2 Everyplace Sync Server sends all users within this group the rows that fulfill the horizontal mirror filter.
    4. Click OK to close the Add Filter window. If you have more default filter parameter name and values to define, click Apply and repeat steps 2-3.

    As for how to pass value from device sync client to server, i am sorry that i can't fully understand your question. Could you give me some detailed information? Thank you in advance.

    For more information, you can refer to DB2e Information center, and the chapter is "Adminstratering table filters in order to manager data". And I put the link below for your convenience:
    http://publib.boulder.ibm.com/infocenter/db2e/v8r2/index.jsp?topic=/com.ibm.db2e.doc/glu_admin_filters.html
  • SystemAdmin
    SystemAdmin
    6968 Posts

    Re: Synch Server variables

    ‏2006-11-01T11:02:55Z  
    To define new variable on server, the steps are as below:
    1. On the Data filter page of the Create Group or Change Group notebook, click Add.
    2. Type the filter parameter name in the Parameter name field. This is the name you used when defining the horizontal mirror filter. It must begin with a colon (:) and follow DB2 UDB rules for ordinary parameters.
    3. Type a default filter parameter value in the Default value field. This value is substituted for the parameter name in the horizontal mirror filter. The DB2 Everyplace Sync Server sends all users within this group the rows that fulfill the horizontal mirror filter.
    4. Click OK to close the Add Filter window. If you have more default filter parameter name and values to define, click Apply and repeat steps 2-3.

    As for how to pass value from device sync client to server, i am sorry that i can't fully understand your question. Could you give me some detailed information? Thank you in advance.

    For more information, you can refer to DB2e Information center, and the chapter is "Adminstratering table filters in order to manager data". And I put the link below for your convenience:

    http://publib.boulder.ibm.com/infocenter/db2e/v8r2/index.jsp?topic=/com.ibm.db2e.doc/glu_admin_filters.html
    Hi, thank for you quick response and support!
    I under stand the variable defination now.

    for how to pass value from device sync client to server, I mean I could pass value like "Shanghai city" from sync client to server variable "city_name".

    Infocenter said:
    A vertical or horizontal mirror filter parameter value must be a constant or a special DB2 Everyplace Sync Server variable such as $USERNAME.
    Is it means that I could NOT pass value from sync client to server(only USERNAME could), I could only set value for the user on server side for the user/group?
  • SystemAdmin
    SystemAdmin
    6968 Posts

    Re: Synch Server variables

    ‏2006-11-02T02:33:28Z  
    Hi, thank for you quick response and support!
    I under stand the variable defination now.

    for how to pass value from device sync client to server, I mean I could pass value like "Shanghai city" from sync client to server variable "city_name".

    Infocenter said:
    A vertical or horizontal mirror filter parameter value must be a constant or a special DB2 Everyplace Sync Server variable such as $USERNAME.
    Is it means that I could NOT pass value from sync client to server(only USERNAME could), I could only set value for the user on server side for the user/group?
    Yes, you are right that we can't pass value like "Shanghai city" from sync client to server variable "city_name". I think you have fully understood filter parameter in DB2e.
  • SystemAdmin
    SystemAdmin
    6968 Posts

    Re: Synch Server variables

    ‏2006-11-02T02:53:22Z  
    that's ok. I think I could put "Shanghai City" in culumn "city_name" a table , and do filter with USERNAME and the table. :)
    Is it a way? thank u.
  • SystemAdmin
    SystemAdmin
    6968 Posts

    Re: Synch Server variables

    ‏2006-11-02T12:38:42Z  
    that's ok. I think I could put "Shanghai City" in culumn "city_name" a table , and do filter with USERNAME and the table. :)
    Is it a way? thank u.
    eh...Do you mean there is a table contain a column named "city_name", and you want to create a filter just like cityname='shanghai city'? If so, it do is a way to define a filter parameter, for example, CITY_NAME by yourself and specify a value to it.

    If I have misunderstood your mean, please feel free to let me know. :)
  • lenin2k
    lenin2k
    17 Posts

    Re: Synch Server variables

    ‏2009-05-30T16:06:29Z  
    • snowkitty
    • ‏2006-10-08T10:07:15Z
    Hi Garret,

    $USERNAME is the only variable used in sync server filter.

    Thanks

    Alice
    Hi Alice,

    I'm new at DB2e, I like to use the $USERNAME variable in my horizontal filters for specific users, but I dont know how to use it, I type in the field the following statement:

    USUARIO = $USERNAME

    But it doesnt work. It causes an error during the replication. In the console appears:

    java.sql.SQLException: SQL0206 La columna $USERNAME no está en las tablas especificadas.
    at com.ibm.as400.access.JDError.throwSQLException(JDError.java:594)
    at com.ibm.as400.access.JDError.throwSQLException(JDError.java(Inlined C
    ompiled Code))
    at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatem
    ent.java(Compiled Code))
    at com.ibm.as400.access.AS400JDBCStatement.executeQuery(AS400JDBCStateme
    nt.java(Compiled Code))
    at com.ibm.db2ess.repl.TriggerReplicationEngine.downloadFirstTime(Trigge
    rReplicationEngine.java:5075)
    at com.ibm.db2ess.repl.TriggerReplicationEngine.download(TriggerReplicat
    ionEngine.java:5017)
    Can you help me to fix that error?
  • SystemAdmin
    SystemAdmin
    6968 Posts

    Re: Synch Server variables

    ‏2009-06-02T07:10:32Z  
    • lenin2k
    • ‏2009-05-30T16:06:29Z
    Hi Alice,

    I'm new at DB2e, I like to use the $USERNAME variable in my horizontal filters for specific users, but I dont know how to use it, I type in the field the following statement:

    USUARIO = $USERNAME

    But it doesnt work. It causes an error during the replication. In the console appears:

    java.sql.SQLException: SQL0206 La columna $USERNAME no está en las tablas especificadas.
    at com.ibm.as400.access.JDError.throwSQLException(JDError.java:594)
    at com.ibm.as400.access.JDError.throwSQLException(JDError.java(Inlined C
    ompiled Code))
    at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatem
    ent.java(Compiled Code))
    at com.ibm.as400.access.AS400JDBCStatement.executeQuery(AS400JDBCStateme
    nt.java(Compiled Code))
    at com.ibm.db2ess.repl.TriggerReplicationEngine.downloadFirstTime(Trigge
    rReplicationEngine.java:5075)
    at com.ibm.db2ess.repl.TriggerReplicationEngine.download(TriggerReplicat
    ionEngine.java:5017)
    Can you help me to fix that error?
    Hi lenin2k,

    Please add a colon before $USERNAME as below and try again.

    USUARIO=:$USERNAME

    If no colon, Sync Server will not see it as a variable, but a column name.
  • SystemAdmin
    SystemAdmin
    6968 Posts

    Re: Synch Server variables

    ‏2009-06-02T10:43:08Z  
    • lenin2k
    • ‏2009-05-30T16:06:29Z
    Hi Alice,

    I'm new at DB2e, I like to use the $USERNAME variable in my horizontal filters for specific users, but I dont know how to use it, I type in the field the following statement:

    USUARIO = $USERNAME

    But it doesnt work. It causes an error during the replication. In the console appears:

    java.sql.SQLException: SQL0206 La columna $USERNAME no está en las tablas especificadas.
    at com.ibm.as400.access.JDError.throwSQLException(JDError.java:594)
    at com.ibm.as400.access.JDError.throwSQLException(JDError.java(Inlined C
    ompiled Code))
    at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatem
    ent.java(Compiled Code))
    at com.ibm.as400.access.AS400JDBCStatement.executeQuery(AS400JDBCStateme
    nt.java(Compiled Code))
    at com.ibm.db2ess.repl.TriggerReplicationEngine.downloadFirstTime(Trigge
    rReplicationEngine.java:5075)
    at com.ibm.db2ess.repl.TriggerReplicationEngine.download(TriggerReplicat
    ionEngine.java:5017)
    Can you help me to fix that error?
    Hi lenin2k,

    Sorry, please ignore my previous reply because it is incorrect.

    You can use the $USERNAME variable as below:

    1) In the "Subset of rows for individual users" text field on the "Advanced Replication Subscription", input: USUARIO=':param'
    2) The value of the ":param" should be specified on the group level as $USERNAME, and it can also be overridden on the user level.
  • lenin2k
    lenin2k
    17 Posts

    Re: Synch Server variables

    ‏2009-06-02T13:00:01Z  
    Hi lenin2k,

    Sorry, please ignore my previous reply because it is incorrect.

    You can use the $USERNAME variable as below:

    1) In the "Subset of rows for individual users" text field on the "Advanced Replication Subscription", input: USUARIO=':param'
    2) The value of the ":param" should be specified on the group level as $USERNAME, and it can also be overridden on the user level.
    Hi CSR,

    Thanks for your post, It helped me to do what I wanted. I followed the instructions in your last post and now it works fine.

    I've read the SyncServer docs, but I didnt find any information about another SyncServer variables available. Do you know if there is another SyncServer variables besides $USERNAME?

    Thanks
  • SystemAdmin
    SystemAdmin
    6968 Posts

    Re: Synch Server variables

    ‏2009-06-02T14:38:02Z  
    • lenin2k
    • ‏2009-06-02T13:00:01Z
    Hi CSR,

    Thanks for your post, It helped me to do what I wanted. I followed the instructions in your last post and now it works fine.

    I've read the SyncServer docs, but I didnt find any information about another SyncServer variables available. Do you know if there is another SyncServer variables besides $USERNAME?

    Thanks
    Hi lenin2k,

    I'm glad to hear you have sovled the problem.

    As Alice said before, $USERNAME is the only variable used in sync server filter.