Using the Persistent Input File
When you run pmrep with some tasks, use a persistent input file to specify repository objects that you want to process. The persistent input file represents objects already in the repository. You can create a persistent input file manually or by using pmrep.
Use a persistent input file with the following pmrep commands:
- •AddToDeploymentGroup. Add objects to a deployment group.
- •ApplyLabel. Label objects.
- •ExecuteQuery. Run a query to create a persistent input file. Use the file for other pmrep commands.
- •ListObjectDependencies. List dependency objects. This command can use a persistent input file for processing, and it can create one.
- •MassUpdate. Updates session properties for a set of sessions.
- •ObjectExport. Export objects to an XML file.
- •Validate. Validate objects. This command can use a persistent input file for processing, and it can create one.
The persistent input file uses the following format:
encoded ID, foldername, object_name, object_type, object_subtype, version_number, reusable|non-reusable
Creating a Persistent Input File with pmrep
You can create a persistent input file using the pmrep ExecuteQuery, Validate, or ListObjectDependencies commands. These commands create files that contain a list of objects with encoded IDs and a cyclic redundancy check (CRC) value. It also contains an encrypted repository GID. This ID identifies which repository the record comes from.
The pmrep commands that use a persistent input file get object information from the encoded IDs. The encoded IDs enable pmrep to process the input file quickly.
When you create a persistent input file with pmrep, it creates the file in the pmrep installation directory. You can specify a different path.
The following text shows a sample persistent input file:
2072670638:57bfc2ff-df64-40fc-9cd4-a15cb489bab8:3538944199885:138608640183285:1376256153425:131072168215:65536142655:0288235:088154:65536122855,EXPORT,M_ITEMS,mapping,none,2
1995857227:57bfc2ff-df64-40fc-9cd4-a15cb489bab8:3538944135065:13867417666804:1376256233835:19660880104:65536271545:0319425:017154:6553644164,EXPORT,M_ITEMS_2,mapping,none,3
1828891977:57bfc2ff-df64-40fc-9cd4-a15cb489bab8:3538944279765:138739712184505:137625613474:65536221345:65536133675:091734:09053:65536156675,EXPORT,M_NIELSEN,mapping,none,1
3267622055:57bfc2ff-df64-40fc-9cd4-a15cb489bab8:353894462954:138805248300075:1376256151365:6553675414:65536174015:0273455:0241435:65536261685,EXPORT,M_OS1,mapping,none,1
Example
You can use the ExecuteQuery command to create a persistent input file of objects to process in another pmrep command. For example, you want to export all logically deleted objects from the repository. You might create a query called find_deleted_objects. When you run the query with pmrep, as shown here, it finds all the deleted objects in the repository and outputs the results to a persistent input file:
ExecuteQuery -q find_deleted_objects -t private -u deletes_workfile
You can then use deletes_workfile as the persistent input file to ObjectExport:
ObjectExport -i deletes_workfile -u exported_del_file
ObjectExport exports all the referenced objects to an XML file called exported_del_file.
Creating a Persistent Input File Manually
If you want to run pmrep commands against a set of objects that you cannot identify through commands such as ExecuteQuery, you can manually create an input file.
Use the following rules and guidelines when you create a persistent input file:
- •Enter “none” for the encoded ID. The pmrep commands get the object information from the other arguments in the records.
- •For source objects, enter the object name as <DBD_name>.<source_name>.
- •For objects, such as mappings, that do not have a sub_type, enter “none” as object_subtype, or leave it blank. For more information about valid transformations and task types, see Listing Object Types.
- •For versioned repositories, enter the version number of the object you want, or enter “LATEST” to use the latest version of the object.
- •For non-versioned repositories, leave the version_number argument blank.
- •For object types, such as targets, that are not reusable or non-reusable, drop the argument.
- •You cannot include non-reusable objects. You can specify the reusable parent of the non-reusable object.
For example, you want to list the object dependencies for a non-reusable Filter transformation. You can specify the mapping that is the parent object of the transformation:
none,CAPO,m_seqgen_map,mapping,none,1,reusable
The mapping m_seqgen_map is the reusable parent of the Filter transformation. The command runs successfully when you specify the reusable parent.
Example
The following example shows a manually created persistent input file:
none,EXPORT,CustTgt,target,none,2
none,EXPORT,S_Orders,session,,2,reusable
none,EXPORT,EXP_CalcTot,transformation,expression,LATEST,reusable
In the first record, CustTgt is a target definition. Targets have no subtype, so you enter “none” for the object_subtype argument. A target cannot be reusable or non-reusable, so you drop the reusable argument. Note that the record has six arguments instead of seven.
In the second record, S_Orders is a session. Sessions have no subtype, so you leave the argument blank.
In the third record, you want the latest version of the transformation, so you enter “LATEST” for the version_number argument.