My boss wants a query that is user aware. For example, if Jim Smith, user ID 123456, runs the query then the results will be records matching user ID 123456. Meanwhile, if Jane Doe, user ID 654321, runs the query at the same time it will return results matching user ID 654321.
Now the sticky parts: this needs to be done using just the Query 400 menu (and I don't think it's the newest version, there's no SQL options). I have no methods for opening a ODBC connection to the 400 system, nor do I even have access to the server itself other than the query screen.
I have thought about creating a macro in Attachmate's Extra Basic which would prompt the user for their user id, copy the base query to a temp query, hard code their user id, then run the query but I have no methods for deleting the "temp queries" as running the query interactively rather than in a batch will really bog down the system, and I don't want the Macro (and the user) to be kept in a "waiting" state until the batch report finishes just so the macro can delete it.
I have thought about creating one new query for each person who needs it, hard coding their user IDs into the query, but there are over 130 people who will be running this, and that's just too big a mess to make.
So are there any suggestions? Is there any function for returning the current user's ID similar to the current(date) query feature?
AC
Now the sticky parts: this needs to be done using just the Query 400 menu (and I don't think it's the newest version, there's no SQL options). I have no methods for opening a ODBC connection to the 400 system, nor do I even have access to the server itself other than the query screen.
I have thought about creating a macro in Attachmate's Extra Basic which would prompt the user for their user id, copy the base query to a temp query, hard code their user id, then run the query but I have no methods for deleting the "temp queries" as running the query interactively rather than in a batch will really bog down the system, and I don't want the Macro (and the user) to be kept in a "waiting" state until the batch report finishes just so the macro can delete it.
I have thought about creating one new query for each person who needs it, hard coding their user IDs into the query, but there are over 130 people who will be running this, and that's just too big a mess to make.
So are there any suggestions? Is there any function for returning the current user's ID similar to the current(date) query feature?
AC