tJoblet vs tRunjob

tJoblet tRunjob
Joblets are reusable transformations that can be called from within another job. The tRunJob component is used to run an external job from within another job.
They can access the context variables of the main job They cannot access the context variables of the main job
They can be used to modularize code and make it easier to maintain. It can be used to control the execution of the external job..
To group a set of related components together To call an external job
To create a reusable unit of code that can be called from multiple places in a job To call a job that is not part of the current job
To encapsulate complex logic To call a job that is stored in a different location
No Ability to control execution Ability to control execution
No Ability to pass parameters Ability to pass parameters
No Ability to run any job Ability to run any job
More Integration with main job Less integrated with the main job
joblets are a better choice for code reuse when the code needs to access the context variables of the main job. tRunJob components are a better choice when the code does not need to access the context variables of the main job.