On 30 August 2012 11:38, [email protected] <[email protected]> wrote: > I need some help in properly shutting down a Task (TCB) that is in a STIMERM > WAIT. > > STIMERM SET,ID=JID,TOD=JEXPIRAY,WAIT=YES > POST REFESH_ECB > > JID DS F ID RETURNED > JEXPIRAY DC X'F1F5F0F0F0F0F0F0' EXPIRATION TIME OF DAY
In passing, I think you have a mismatch between TOD= and the format of your JEXPIRAY. > In the Above snipet of code I want to have the task expier after 15:00 Hours > and POST another Subtask. Then I do some other work and reissue the STIMERM > for the next Time Od Day. > > My question is how do I properly shutdown This SUBSTASK (TCB) when its in the > STIMERM WAIT ? > > If I use the STIMER CANCEL what should the next sequential instriction be > after the STIMERM SET ? What Should I Test For. > > Can I simply DETACH the SUBTASK while its in the STIMERM WAIT ? > > I want to avoid using an STIMERM exit routine for this scenario if possible. Ah - but why? The usual solution is to use that exit, which will merely POST a local ECB. After you issue the STIMERM in your mainline, you WAIT on both that ECB, and a shutdown ECB. Whichever comes first will wake up your mainline. If it's the shutdown, then you issue STIMERM CANCEL, clean up anything else, and end the task. > What do others do to shutdown a TCB that is in a STIMER WAIT. I don't get into that wait. Tony H.
