I don't think there's a way to do this with code. The process flow is really an EG thing, not a SAS thing. For example, assume you have EG on your desktop, attaching to a SAS server. The SAS server doesn't tell EG to add icons for datasets to your process flow. Instead, EG monitors (I assume) the datasets that are created during the SAS session, and decides whether or not to add icons to the process flow. Since it's an EG decision, I think the EG option is your best way to control it. Since I'm not a fan of datasets in my process flows, I generally set the option to 0.
... View more