KB Article #177359

Is it possible to load the profile of the account specified in the USERID of CFTRECV when the function CFTSU or cftsu is activated ?

Problem

CFTRECV set with USERID=


CFTSU is set so the EOT is executed using the USER-ID specified into the CFTRECV macro


Can the EOT be executed with the User-id's profile loaded?


What is the equivalent command CFTSU is issuing: 'su - $account' or 'su $account' ?



Resolution

The equivalent command is: su $account

The surrogate is done but the profile remains the CFT's one to avoid issues related to the CFT environment that can become unavailable after another user-id's profile is loaded.

You can still parse the user-id profile in your script or even execute it.


Note: An enhancement request is currently open in R&D for version 3.X so the User-Id's profile could be optionally loaded at EOT script execution time.

This article will be updated if such a feature become available.