ListTablesBySess
Returns a list of sources or targets used in a session. When you list sources or targets, pmrep returns source or target instance names to the window. Use ListTablesBySess in a shell script with other pmrep commands. For example, you can create a shell script that uses ListTablesBySess to return source instance names and uses Updatesrcprefix to update the source owner name.
When you use ListTablesBySess, pmrep returns source and target instance names as they appear in the session properties. For example, if the mapping contains a mapplet with a source, pmrep returns the source instance name in the following format:
mapplet_name.source_name
The ListTablesBySess command uses the following syntax:
listtablesbysess
-f <folder_name>
-s [<qualifying_path>.]<session_name>
-t <object_type_listed> (source or target)
The following table describes pmrep ListTablesBySess options and arguments:
Option | Argument | Description |
---|
-f | folder_name | Required. Name of the folder containing the session. |
-s | session_name | Required. Name of the session containing the sources or targets. You can enter a reusable or non-reusable session name. However, you cannot enter an instance of a reusable session name. To enter a non-reusable session name in a workflow, enter the workflow name and the session name as workflow_name.session_name. |
-t | object_type_listed | Required. Enter source to list sources, or enter target to list targets. |
For example, to list all sources in a reusable session, enter the following text at the prompt:
listtablesbysess -f myfolder -s s_reus_sess1 -t source
pmrep returns the following information:
ITEMS
mapplet1.ORDERS
Shortcut_To_ITEM_ID
listtablesbysess completed successfully.
When the mapping contains a mapplet with a source, pmrep includes the mapplet name with the source, such as mapplet1.ORDERS.
For example, you can list all targets in a non-reusable session in a workflow:
listtablesbysess -f myfolder -s wf_workkflow1.s_nrsess1 -t target
pmrep returns the following information:
target1_inst
ORDERS_BY_CUSTID
Shortcut_To_tgt2_inst
listtablesbysess completed successfully.