User Id in Pgm DS in case of Scheduled Batch Job.

IBM iSeries
System monitoring
tips and tricks
Hi All. An user's id can be retrieved inside the pgm from system Data Structure which contains the User Id invoking the pgm. Normally this is passed to a file field before writing/updating the file. If the file is updated by a Batch pgm then the Id of user submitting the job goes to the system DS and hence to the file. I want to know what happens in case of auto scheduled job? If one schedule a job to run automatically on some days of week/month , then what will be the value of User id in system DS?? Will it be the Id of user scheduling the job or some system profile like QUSER?? Is it possible to assign a different user profile while scheduling a job/pgm which runs automatically on sceduled date/time?? If yes then is it necessary that this user profile(to be assigned while scheduling)should exist on the system( I mean can we assign a user profile which has not been created on the system)? Will this profile goes to system DS user portion?? If not then what will be the value of User id in Program status DS?? What will be the value of user id in system DS when a Pgm is invoked through web using ODBC?? Will it be QUSER or anything else?? Kindly help me. I need answer to these qs. to resolve some problem. Thanks & Regards Dipendra

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi Dipendra

You didn’t say which job scheduler you are using, but generally speaking most scheduling software (OS/400, Robot, Maximise, etc) will allow you to specify a user ID that the job is to be submitted under. For example, the ADDJOBSCDE command for the OS/400 scheduler has a USER parameter that can contain *CURRENT (default), *JOBD or a user ID value.

The user ID specified will have to exist on the AS/400 otherwise the system won’t have any idea of what authorities, etc are to be applied. The user ID will be put in the appropriate part of the SDS.

I’m not too sure on the value in the SDS for Web/ODBC connections. If I remember correctly, for ODBC connections you have to provide a user ID and password to make the connection, but the connection job runs under a QUSER or other system profile while the connection ID provided is used for authority checking, etc. I would hope that the connection ID would be placed in the SDS, but can’t say for definite. Sorry.

All the best



Note that by specifying *JOBD for the scheduler job entry, you can change the user on the job description at any time in the future. When the scheduled job runs, it will run under the profile that is named on the job description at that time.

A user profile must exist in order to be named on a job description.

Also, CHGJOBSCDE USER( newname ) can simply change the scheduler entry at any time.


Discuss This Question: 4  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Byimw02
    I concur with Jonathan. What is the specific problem? Whatever you are trying to accomplish, remember all initiated jobs require a user profile. Where the user profile is retrieved is dependent on how the job is initiated. The profile can be explicitly provided using the various submit commands and signon screens/panels or implicitly in job descriptions and device descriptions. A batch job will have the user profile assigned to it at submission. All job scheduler packages allow the option to assigned it explicitly in a command parameter or implicitly from a job description. The user id in the PDS will be the user assigned at the job's submission. Hope this helps. Ciao.
    0 pointsBadges:
  • Dipendra
    Hi, Actually one file has some records with User value 'QUS'.Other records contains the user id of the user who updated the record using interactive menus. The client has asked me to find from where these records with user id 'QUS' is comming. Since QUS user profile does not exist on the system, I suppose this must be done from a job running under system user profile QUSER whose first 3 char( user field in the file have length 3)is QUS. Can you suggest a reason/way to track the job/pgm doing this. Thanks & Regards Dipendra
    0 pointsBadges:
  • Byimw02
    The QUSER profile exists on all iSeries systems as part of the basic OS install. It is possible someone at the user installation delete it (not recommended) or you do not have the proper authority to view the Q* profiles. I am not sure what the user id info has QUS? Someone could have created a profile named QUS. First of all, I would look up all programs that update this PF and examine how the programs are referenced, e.g., via menu, explicit call from command line. Also check if file can be updated via DBU, DFU or other file utility which bypass all pre-set error and logging functions. With a file utility, someone can enter a non-existent profile id into the field along with other questionable data. Hope this helps.
    0 pointsBadges:
  • TomLiotta
    To general possibilities seem to make sense: 1) Journal the file through database journaling, perhaps only for *AFTER images and onitting *OPNCLO. The journal entry will record everything that's appropriate. 2) Turn on object auditing for the file object. The system security audit journal can then track accesses of the file object and again record the needed info. I haven't seen only the first three characters before, but I have seen where the servers report userid as a null-terminated string. We've submitted problem reports to IBM and gotten PTFs created. This _could_ be a similar situation.
    125,585 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: