It's all about the answers!

Ask a question

Progammatically change the dataset associated wit a zFolder


Luis Bazo (6832019) | asked Jul 15 '13, 1:27 p.m.
JAZZ DEVELOPER
edited Jul 23 '13, 9:05 a.m. by Kevin Doyle (60425)
Hi guys,

Do you know if there is something to progammatically change the dataset associated wit a zFolder?

This is what we've already tested so far,

1. Change zFolder property "Dataset Definition" with scm set property command. It does not work for us because it duplicates the property "Dataset Definition" but does not change the Dataset Definition associated.
2. We have tried with ant tasks as explained in https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.scm.doc/topics/t_RTCz_usingLDG.html&scope=null. This works but we would like to run this ant outside of eclipse (from a script) by running something like "ant -f oursetuprtcz.xml -lib required_libs -verbose all".

Accepted answer


permanent link
Justin Spadea (661) | answered Jul 17 '13, 10:41 a.m.
Hi Luis,

I checked out the scm tool to update the property and it appears to be working for me. Here are the commands I ran - take a look and see if you were specifying the same values (in particular the key used for the property). When I use the tool I see it updating the value, not adding a duplicate (I don't even see an option to allow duplicates).

All these commands were run from inside the root workspace directory, and I previously logged in with the scm login command.

View the original property values with 'list'
$ scm property list MortgageApplication-Common/zOSsrc/BIND/
/home/justin/.workspaces/runtime/404/MortgageApplication-Common/zOSsrc/BIND
 jazz.read-access                    - Public
 team.enterprise.resource.definition - _2FT6oOzAEeKdUMn7rmHprw

Change the value with 'set'
$ scm property set team.enterprise.resource.definition _9PAz0O4WEeKv7ZtQSfUk4Q MortgageApplication-Common/zOSsrc/BIND/
team.enterprise.resource.definition successfully set to _9PAz0O4WEeKv7ZtQSfUk4Q

View the properties again to verify it's using the new value
$ scm property list MortgageApplication-Common/zOSsrc/BIND/
/home/justin/.workspaces/runtime/404/MortgageApplication-Common/zOSsrc/BIND
 jazz.read-access                    - Public
 team.enterprise.resource.definition - _9PAz0O4WEeKv7ZtQSfUk4Q

I also verified in the Eclipse client that the new data set definition is being used, and saw the outgoing property change in the Pending Changes view (scm could also be used to check in/deliver the property change).

Also, as you probably noticed above the property works with the UUID of the data set definition, not the name you gave it. You can run File > Export > System Definition IDs to generate an XML file that contains the name-to-UUID mapping.

Let me know if you're still having problems with this.

-Justin
Luis Bazo selected this answer as the correct answer

Comments
Luis Bazo commented Jul 22 '13, 9:57 a.m.
JAZZ DEVELOPER

Hi Justin,

That´s correct.

My fault was to use "Dataset Definition" property instead of "team.enterprise.resource.definition".

It works ok now

Thanks!

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.