I thought of a way to do this, but it will require some work. Namely, create
a new SBMJOB command (duplicate the *CMD object) which calls my program. My
program then passes the parameters onto the system command except forces
HOLD(*YES). Then retrieve the name of the sumbitted job (with RCVMSG) and
issue a CHGJOB using the current date format. Then if the original command
specified HOLD(*NO) (or *JOBD and the jobd says *NO) I release the job.
This would all then be transparent and I could put the new command in the
system library list for all users.
Trouble is I need this urgently and don't have the time to figure out all the
parameters to SBMJOB which will, of course, have to be picture perfect in my
program before it will even begin to work!
Does anybody have any solutions the same, similar or otherwise that will get
me out of this bind. So far my alternative is another AS/400 and change the
system value on that.
Any help would be greatly appreciated.
Sent via Deja.com http://www.deja.com/
Before you buy.
You make no mention as to what format you need the date to be in, the
job description from what I can tell is going to dictate wheter you use
the system value and or a date. The current system value is MM/DD/YY. I
tried to do what you want to do on a job description and I am having no
luck, other system values are dictating how I can control the date parm
on the job description, these values are QDATSEP and QDATFMT, depending
on what you want you may just want to change these to give it the look
and feel for which you want.
An alternative might be to change the batch subsystem routing entry such
that a program you supply runs first in each batch job, doing a TFRCTL
to QSYS/QCMD as its last action. There are at least a couple ways to
pass data from the submitting job to the batch (submitted) job. The
local data area (*LDA) could be used to pass a date format - the routing
program could use RTVDTAARA *LDA to get it and do the CHGJOB when the
date format is present. Likewise when CPYENVVAR(*YES) is specified on
SBMJOB (a SBMJOB cmd in a lib ahead of QSYS, customized via CHGCMDDFT),
an environment variable you define could carry the date format. However
some other action would need to put the current (interactive) job's date
format into either the *LDA or environment variable.
But perhaps this will give you some ideas...
--
Karl Hanson