IBM i Global

 View Only

 Run sql scripts in ACS

KASHIF KAMRAN's profile image
KASHIF KAMRAN posted Mon October 13, 2025 05:11 AM

Hello Experts,

I need your suggestion on how to configure the run sql script tool that comes with acs under a specific user instead of QUSER.

We are using run sql script tool provided with Access Client Solution(ACS) to updated the records in files and these files  have trigger programs that records the user that is updating the records  but issues we are encountering is the user is logged as QUSER when ever any update is done via sql script instead of the actual user that has connected to the system via acs.

We need to guidance how can we configure ACS to run sql scripts under the actual user instead of the QUSER.

Daniel Gross's profile image
Daniel Gross IBM Champion

Which "user" does your trigger record? I mean from what source?

Because you can't run the "connection jobs" under a specific user. But the CURRENT USER special register should hold the right user.

We are using this in our CREATED_BY and LAST_CHANGED_BY fields in many tables. The jobs user is always QUSER - but CURRENT USER is set correctly.

HTH

Daniel

Satid S's profile image
Satid S

Dear Kashif

>>>>> but issues we are encountering is the user is logged as QUSER when ever any update is done via sql script instead of the actual user that has connected to the system via acs.   <<<<<

Each Run SQL Script session in the client machine is served by a QZDASOINIT (or an equivalent) job in IBM i server side and this job runs under QUSER profile by design BUT the job also recognizes the user profile that signs on from the ACS client and this client profile is stored in QZDASOINIT job attribute named CURRENT USER.   

When you mentioned the user was "logged", what logging utility did you mean?  Is it DB journal in IBM i? If so, you need to look at CURRENT USER attribute rather than JOB USER.   If you use DISPLAY_JOURNAL table function to look at each DB journal entry, you need to look at the column USER_NAME rather than JOB_USER from each journal entry.