There's some major misunderstanding here.
CHGJOBSCDE does NOT use the job number from the last submission of the job
as ENTRYNBR. ENTRYNBR is to be considered as a primary key, perhaps an
automatically generated Identity Column assigned at ADDJOBSCDE time. It
will have a value before the first time it submits the job. JOB is just
an index. If there is only one ENTRYNBR for one JOB then CHGJOBSCDE
allows you to omit it. If there are multiple ENTRYNBR values for one JOB
then you have to add the ENTRYNBR. If you want to be able to use
CHGJOBSCDE JOB(ARGH) ENTRYNBR(*ALL) then you will have to submit an RFE on
that.
If there are a lot of entries you could query the following and change the
user on each of these:
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/QSYS2.SCHEDULED_JOB_INFO%20-%20view
as WRKJOBSCDE SCDBY(PUTZ) only shows you who scheduled the job, not whom
the job runs under. It's the difference between these two:
Scheduled by . . . . . . . . . : PUTZ
User profile . . . . . . . . . : BUBBA
SELECT SCHEDULED_JOB_ENTRY_NUMBER, x.*
FROM QSYS2.SCHEDULED_JOB_INFO x
WHERE USER_PROFILE_FOR_SUBMITTED_JOB = 'ROB'
ORDER BY scheduled_job_entry_number
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.