data_share

DESCRIPTION

Used for various Multi-Site Collaboration operations, such as publishing and unpublishing objects collectively and sending objects to remote sites. It can be used as a deployment tool during the initial Multi-Site Collaboration implementation phase or as a day-to-day tool for performing functions that previously were available only through the user interface. This utility is especially helpful in setting up and maintaining a hub configuration.

Use this utility to:

  • Mass publish objects to one or more Object Directory Services (ODS) sites.

  • Mass unpublish objects from one or more ODS sites.

  • Publish or unpublish an entire assembly.

  • List ODS sites currently defined in the local database and authorized for publication.

  • Send objects to other sites.

  • Delete obsolete publication records at the ODS.

  • Check current status of authorized publication sites.

  • List all the ODS sites to which an object is published.

Data can be input to this utility in the following forms:

  • Input file

  • Folder name

  • Object ID template

When sending objects to a specific user and/or group at a remote site using the –owning_user and –owning_group options, the following rules apply:

  • If both the specified user and group exist at the importing site, the imported objects are owned by the user and group regardless of whether or not the user is a member of the group.

  • If only the user is specified or if the group is specified but does not exist at the importing site, the user's default group at the importing site is the owning group of the imported objects.

  • If only the group is specified or if the user is specified but does not exist at the importing site, the user context of the remote IDSM process is the owning user of the imported objects.

SYNTAX

$IMAN_ROOT/bin/
data_share [–u=user-id –p=password –g=group] –f={ send | publish | unpublish | delete_pubrec | register | unregister | delete_exprec | list_ods | check_ods | list_pub_info | find_duplicates | list_remote_co | list_replica_co | cancel_remote_co | cancel_replica_co} {–user=user-id] [–group=group-name] [–site=remote-site-name1 –site=remote-site-name2...] [–owning_user=remote-user –owning_group=remote-group ] [ { –item_id=item-id   | template | –folder=folder-name | –name=wso-name | | –filename=file-name} {–class=wso-class-name | | –classoffile=class-name] [–exclude=relation-type1 –exclude=relation-type2...] [–batch_size=number-of-objects-per-batch] [ {–revision-selector | –rev=rev-id}] [–include_bom] [–transfer] [–attach] [–exclude_files] [–latest_ds_version] [–exclude_folder_contents] [–include_bc] [–include_supercedures] [–report=report-file-name [–h]

ARGUMENTS

Entries in parentheses are accepted abbreviations for arguments.
–u
Specifies the Teamcenter Engineering user ID. If the ID given is a privileged user, bypass privilege is set; otherwise, bypass is not set and only those objects accessible to the user are processed.

–p
Specifies the Teamcenter Engineering password associated with the user ID.

–g
Specifies the Teamcenter Engineering group associated with the user ID.

–function
Specifies the function to be performed; define one of the following options:
publish (pub)
Publishes objects to the given ODS sites. The objects to publish are determined by the –item_id, –folder or –filename arguments.

unpublish (unp)
Unpublishes objects from the given ODS sites. The objects to unpublish are determined by the –item_id, –folder or –filename arguments.

send
Sends objects to the specified remote sites.

The objects to send are determined by the –item_id, –folder or –filename arguments.

delete_pubrec (dpr)
Deletes obsolete publication records for the specified object from the local database. This must be run at the ODS site containing the publication record to be deleted. Only privileged users may use this function. Requires the –item_id option with specific item ID; no wildcards or other arguments are supported with this function.

To be used only if the master object has been deleted but publication records still exist at the ODS site.

–delete_exprec (dxr)
Deletes export records for the specified sites for objects listed in the text file identified by the –filename and –classoffile options. Does not traverse item structure. Only privileged users may use this function.

To be used only as a last resort after attempting to delete export records using the –verify option of the data_sync utility.

list_ods (lo)
Lists the authorized ODS sites, which consist of the default ODS site and the sites specified by the ODS_publication_sites site preference.

check_ods (co)
Lists the availability of authorized ODS sites.

list_pub_info (lpi)
Lists publication information about objects. Must be run at the owning site.

register
Registers item IDs to the central item ID registry.

unregister
Unregisters item IDs from the central item ID registry. The register and unregister functions must be supplied with the –item_id or –filename option.

find_duplicates
Compares all of the item IDs at the remote site specified by the –site switch. The item IDs searched for may be filtered with the –item_id, –created_after,, and –created_before switches. The output may be directed to a file using the –report option. The output is formatted to csv style, using comma-separated values.

list_remote_co
Lists master objects that are checked out by remote users based on the specified user ID, group name, and site name.

list_replica_co
Lists replica objects that are checked out from a remote site based on the specified user ID, group name, and site name.

cancel_remote_co
Cancels all remote checkouts based on the specified user ID, group name, and site name.

cancel_replica_co
Cancels replica checkouts based on the specified user ID, group name, and site name. Canceling a replica checkout also cancels the remote checkout at the owning site.


–user
Specifies the user id.

–group
Specifies the group name.

–site
Specifies the name of the site to which objects are published or from which they are unpublished. It can be given multiple times in a command line.

–owning_user (ou)
User ID of the user at the remote sites to which the objects are sent. The specified user owns the objects being sent.
–owning_group (og)
Specifies the name of the group at the remote sites to which the objects are sent. The group owns the objects being sent.
–exclude
Specifies a relation type to be excluded from the operation. This can be specified multiple times in a command line. The database name (not the display name) of the relation type must be used.

The list of relation types to be included is determined by the IMAN_relation_export preference. The –exclude option overrides the preference setting. For more information, see the Teamcenter Engineering Configuration Guide.

–exclude_files (exf)
Excludes dataset files.

–item_id (item)
Specifies the item ID or template of items to process. Mutually exclusive with –folder, –filename, and –name options. Required for the –delete_pubrec option.

–folder (fl)
Specifies the name of a Teamcenter Engineering folder containing the list of objects process. Mutually exclusive with the –name, –filename, and –item_id options.

–name
Specifies the name of a single workspace object to be precessed. If not an item, use the –class option to specify the class of the object. Mutually exclusive with the –folder, –filename, and –item_id options.

–filename (fn)
Specifies the name of the input file containing the list of IDs or names of objects to process. File entries are treated as IDs for Items and ItemRevisions and as names for other classes of objects. Mutually exclusive with the –name, –folder and –item_id options. If the input file contains names, the –classoffile argument is required.

–rev
Specifies the ID of a specific item revision to be sent to a remote site. Valid only with the –item_id option and with the –send function. Mutually exclusive with revision selectors.

–class (cl)
Specifies the Teamcenter Engineering class of the object specified by the –name argument. This option is only valid with the –name option. The default class is Item.

–classoffile
Specifies the class of the objects listed in the input text file given with the –filename argument. If not defined, the default class is Item. Required if input file has names instead of IDs.

–include_bom
Includes assembly components when sending, publishing, or unpublishing. A revision selector is required when publishing or unpublishing an assembly; if no revision selector is given, the latest_revision selector is used as the default. When sending, the default selector is all_revisions.

If not specified, this argument defaults to off.

–transfer (tf)
Transfers site ownership when sending objects. Site ownership is not transferred by default.

–attach (att)
Attaches to object to the appropriate parent item or revision at the receiving site when sending an attachment with transfer of site ownership. Use this for situations in which you attach a dataset to a replica, such as a JT file, and you want to send the JT file to the owning site with transfer of site ownership and attached to the appropriate parent item or revision.

revision-selector
If no revision selector is specified, the default selector is all_revisions.

Identifies the item revisions to send. Also used as the revision rule for identifying components when processing assemblies. When used with the –include_bom option while publishing or unpublishing, it determines which revisions' BVR to follow in traversing the assembly tree. The valid revision selectors are as follows:

–all_revisions
Sends all revisions. Not valid when publishing.

–latest_revision
Processes only the latest revision regardless of release status. This is the default if no revision selector is given when publishing or unpublishing.

–latest_working
Processes only the latest working revision.

–latest_released
Processes only the latest released revision with any release status.

–latest_working _or_any
Sends only the latest working revision. If none, the latest released revision is processed.

–release_status=release-status-type
Processes only the latest released revision with the given release status.

–all_released _revs
Sends all revisions with a release status; not valid when publishing.


–batch_size (bs)
Specifies the number of objects per batch; a new process is created per batch. Default batch size is 1000. Must be a positive integer. This is useful when processing thousands of objects, because it helps avoid memory and disk space shortage problems.

–exclude_folder_contents (efc)
Excludes the contents of folders being exported.

–include_bc (ibc)
Identifies the BomChange objects associated with the affected assemblies to send. If not specified, BomChange objects are not sent.

–include_supercedures (isc)
Identifies the supercedure objects associated with the BomChange objects to send. If not specified, supercedure objects are not sent.

–report (rep)
Specifies to output a report to the specified file.

–created_after
Restricts searches for duplicate items to those created at the target site after a specified date.

–created_before
Restricts searches for duplicate items to those created at the target site before the specified date.

–latest_ds_version (ldv)
Sends only the latest dataset version. Unless this argument is specified, all dataset versions are sent.

–h
Displays help for the utility.

RESTRICTIONS

When sending objects to a specific user and/or group at a remote site using the –owning_user and –owning_group arguments, the following rules apply:

  • If both the specified user and group exist at the importing site, the imported objects are owned by the user and group regardless of whether or not the user is a member of the group.

  • If only the user is specified or if the group is specified but does not exist at the importing site, the user's default group at the importing site is the owning group of the imported objects.

  • If only the group is specified or if the user is specified but does not exist at the importing site, the user context of the remote IDSM process is the owning user of the imported objects.

EXAMPLES

Required login information is omitted from the following examples.


  • To send a list of items specified in a text file to two sites:

    data_share -f=send -filename=my_item_list.txt -site=Site1 -site=Site2
  • To transfer ownership of a given item:

    data_share -f=send -transfer -item_id=item123 -site=Site1  
    
  • To publish an assembly item and all its components using the latest revision rule to determine components:

    data_share -f=publish -item_id=Engine100 -site=Ods1 -include_bom
  • To publish an assembly item and all its components using the latest released revision rule to determine components:

    data_share -f=publish -item_id=Item1 -site=Ods1 -include_bom  
    -latest_released
  • To unpublish an assembly item and all its components from multiple ODS sites using the default revision rule latest revision:

    data_share -f=unpublish -item_id=Item1 -site=Ods1 -site=Ods2   
    -include_bom
  • To delete a publication record in the local database:

    Use this only if the master object has been deleted but the publication record still exists.

    data_share -f=delete_pubrec -item_id=ObsoleteItem1
  • To list the authorized ODS sites:

    data_share -f=list_ods
  • To check availability of the authorized ODS sites:

    data_share -f=check_ods
  • To get publication information about a list of objects in a folder:

    data_share -f=list_pub_info -folder=myFolder
  • To send an item to a specific remote user and group:

    data_share -f=send -item_id=xyz -site=Site1 -owning_user=joe  
    -owning_group=engg  
    
  • When publishing thousands of items and you get errors after publishing several hundreds or even thousands of items, reduce the batch size:

    data_share -f=publish -item_id=A* -site=Site1 -batch_size=200
  • To publish an Engineering Change object and all its associated change objects:

    data_share -f=publish -item_id=CR0001 -site=Ods1 -include_bom  
    0-include_bc -include_supercedures  
    
  • To register an item ID with the central item ID registry:

    data_share -f=register -item_id=myItem
  • To find duplicate item IDs at another site:

    data_share -f=find_duplicates -item_id=00* -site=Site1

 

-from Siemens reference guide