TSO wait state 
Author Message
 TSO wait state


Quote:
>[snip]
>Is there any way of putting a TSO Rexx program into a (definable) wait
>state?
>[snip]

Could you be a little more clear on "what" you would want to drive the REXX
exec out of it's "wait state"?

Dave Rupp
Texas Instruments
Dallas, Texas  USA
(972)575-4277
(972)575-5522 FAX
/ADMD=MCI/PRMD=TI/C=US/G=DAVID/I=M/S=RUPP

http://www.*-*-*.com/



Sun, 08 Aug 1999 03:00:00 GMT  
 TSO wait state

I'm sure this has been dealt with before, but I can't see anything in
the FAQs.

Is there any way of putting a TSO Rexx program into a (definable) wait
state? A colleague says he was told, on a course, to read in a file &
write it out again, but this seems a bit crude to be the state of the
art. No TSO equivalent for CMS's wakeup?

yours, Patrick
________________________________________________________

Disclaimer: The form is BT but the essence is me.

"Occam's razor is so sharp, I bought the whole argument"



Sun, 08 Aug 1999 03:00:00 GMT  
 TSO wait state


: >Is there any way of putting a TSO Rexx program into a (definable) wait
: >state?

: Could you be a little more clear on "what" you would want to drive the REXX
: exec out of it's "wait state"?

Clock comparator, for example.  This is a classic wish in TSO, always falling
on the vendor's deaf ears.

- gil



Sun, 08 Aug 1999 03:00:00 GMT  
 TSO wait state

Quote:

> I'm sure this has been dealt with before, but I can't see anything in
> the FAQs.

> Is there any way of putting a TSO Rexx program into a (definable) wait
> state? A colleague says he was told, on a course, to read in a file &
> write it out again, but this seems a bit crude to be the state of the
> art. No TSO equivalent for CMS's wakeup?

Patrick, it should be a simple task to write a tiny assembler routine
to issue a STIMER WAIT... I would guess that no more than 20 lines of
code would need to be written... Something akin to the SLEEP command.

I don't have any of my MVS books handy, or I'd give you a cut-paste
example...

Ciao,

Bill B.



Sun, 08 Aug 1999 03:00:00 GMT  
 TSO wait state

Quote:


> >Is there any way of putting a TSO Rexx program into a (definable) wait
> >state?

> Could you be a little more clear on "what" you would want to drive the REXX
> exec out of it's "wait state"?

Well, since you're asking, any possible event type... Seriously it's
really just a number of seconds that is needed, but putting a tag on,
say, a file, so that you get an interrupt when it's opened or closed is
the stuff of dreams I guess.

Since my first posting I've been told that some version of MVS/TSO has a
PAUSE
command in it, presumably PAUSEing for a fixed number of
seconds/milliseconds. Anyone
know which version this is & how useful the command is?

yours, Patrick
________________________________________________________

Disclaimer: The form is BT but the essence is me.

"Occam's razor is so sharp, I bought the whole argument"



Mon, 09 Aug 1999 03:00:00 GMT  
 TSO wait state

Quote:


> > I'm sure this has been dealt with before, but I can't see anything in
> > the FAQs.

> > Is there any way of putting a TSO Rexx program into a (definable) wait
> > state? A colleague says he was told, on a course, to read in a file &
> > write it out again, but this seems a bit crude to be the state of the
> > art. No TSO equivalent for CMS's wakeup?

> Patrick, it should be a simple task to write a tiny assembler routine
> to issue a STIMER WAIT... I would guess that no more than 20 lines of
> code would need to be written... Something akin to the SLEEP command.

> I don't have any of my MVS books handy, or I'd give you a cut-paste
> example...

> Ciao,

> Bill B.

I wrote a routine (called WAKEUP, funnily enough) - I have posted it here
before.  I will try to remember to repost it when I get home tonight.
--
Ken MacKenzie
(Of course, my opinions are not necessarily
 those of my employers)


Mon, 09 Aug 1999 03:00:00 GMT  
 TSO wait state

Quote:



> > > I'm sure this has been dealt with before, but I can't see anything in
> > > the FAQs.

> > > Is there any way of putting a TSO Rexx program into a (definable) wait
> > > state? A colleague says he was told, on a course, to read in a file &
> > > write it out again, but this seems a bit crude to be the state of the
> > > art. No TSO equivalent for CMS's wakeup?

> > Patrick, it should be a simple task to write a tiny assembler routine
> > to issue a STIMER WAIT... I would guess that no more than 20 lines of
> > code would need to be written... Something akin to the SLEEP command.

> > I don't have any of my MVS books handy, or I'd give you a cut-paste
> > example...

> > Ciao,

> > Bill B.

> I wrote a routine (called WAKEUP, funnily enough) - I have posted it here
> before.  I will try to remember to repost it when I get home tonight.
> --
> Ken MacKenzie
> (Of course, my opinions are not necessarily
>  those of my employers)

Well, here it is - good luck:
WAKEUP   TITLE 'Wait for a time period or terminal input'
*  ********************************************************
*  *                                                      *
*  *  Author: Ken MacKenzie - Sometime in the early 90's  *
*  *                                                      *

*  *                                                      *
*  *   Usage: From the command line: TSO WAKEUP (parm)    *
*  *               From a REXX exec: "WAKEUP (parm)"      *
*  *                                                      *
*  *   Parms: +hh:mm:ss or +mm:ss or +ss to wait for a    *
*  *          specific period.                            *
*  *                                                      *
*  *          hh:mm:ss or hh:mm to wait until a specific  *
*  *          time                                        *
*  *                                                      *
*  * Apology: The comments within the code are crap,      *
*  *          sorry.  Maybe I'll update them some day.    *
*  *                                                      *
*  ********************************************************
         PRINT GEN
         SPACE 1
WAKEUP   CSECT
WAKEUP   AMODE 24
WAKEUP   RMODE 24
R0       EQU   0
R1       EQU   1
R2       EQU   2
R3       EQU   3
R4       EQU   4
R5       EQU   5
R6       EQU   6
R7       EQU   7
R8       EQU   8
R9       EQU   9
R10      EQU   10
R11      EQU   11
R12      EQU   12
R13      EQU   13
R14      EQU   14
R15      EQU   15
         SPACE 3
         SAVE  (14,12),,*
         BALR  R12,0
         USING *,R12
         LR    15,13                    * CHAIN
         LA    13,CNV00001              * THE
         ST    13,8(15)                 * SAVE
         ST    15,4(13)                 * AREAS.
         B     CNV00001+72              * BRANCH AROUND
CNV00001 DC    18A(0)                   * SAVE AREA.
         B     A000
         DC    CL8'WAKEUP    '         PROGRAM ID.
         EJECT
A000     EQU   *
         L     R1,0(R1)
         MVC   PARMAREA,0(R1)
         LA    R1,PARMAREA
         XR    R2,R2
         XR    R3,R3                   * TSO PASSES THE WHOLE COMMAND
         IC    R2,1(R1)                * LINE (INCLUDING PROGRAM NAME)
         SH    R2,=H'4'                * AND 2 LENGTHS. SUBTRACT 4 FROM
         IC    R3,3(R1)                * OVERALL LENGTH.
         SR    R2,R3                   * SUBTRACT 2ND LENGTH FROM 1ST
         LTR   R2,R2                   * IF ZERO - NO PARAMETERS ...
         BZ    A002                    * ... SO JUST CARRY ON
         LA    R1,4(R3,R1)             * R1 NOW ADDRESSES FIRST PARM
         BAS   R10,GETPARMS            * SORT OUT VARIOUS PARAMETERS
         CLI   TIMTYPE,X'FF'
         BE    A999
A002     EQU   *
         CLI   TIMTYPE,X'01'
         BE    A003
         STIMERM SET,ID=TIMADR1,BINTVL=WAITTIME,EXIT=STIMERX
         B     A010
A003     EQU   *
         STIMERM SET,ID=TIMADR1,TOD=WAITHMS,EXIT=STIMERX
A010     EQU   *
         CLI   TIMEXP,X'01'
         BNE   A015
         LA    R15,2
         B     A999
A015     EQU   *
         TGET  INBUF,L'INBUF,NOWAIT
         CLI   INBUF,0
         BNE   A020
         CLC   WAIT1,WAITTIME
         BL    A018
         MVC   WAIT1,WAITTIME
A018     EQU   *
         STIMERM SET,ID=TIMADR2,BINTVL=WAIT1,WAIT=YES
         B     A010
A020     EQU   *
         LA    R15,6
A999     EQU   *
         L     R13,4(,R13)
         RETURN (14,12),T,RC=(15)      * Off we go.
GETPARMS EQU   *
         CLI   0(R1),C'+'
         BE    G100
         MVI   TIMTYPE,X'01'
         MVC   WAITHMS(2),0(R1)
         MVC   COLON(1),2(R1)
         MVC   WAITHMS+2(2),3(R1)
         C     R2,=F'5'
         BNH   G010
         MVC   COLON+1(1),5(R1)
         MVC   WAITHMS+4(2),6(R1)
G010     EQU   *
         CLC   COLON,=C'::'
         BE    G999
         XR    R15,R15
         BCTR  R15,0
         MVI   TIMTYPE,X'FF'
         B     G999
G100     EQU   *
         C     R2,=F'9'
         BH    G140
G110     EQU   *
         C     R2,=F'9'
         BL    G120
         PACK  PACKHRS,1(2,R1)
         LA    R1,3(,R1)
G120     EQU   *
         C     R2,=F'6'
         BL    G130
         PACK  PACKMINS,1(2,R1)
         LA    R1,3(,R1)
G130     EQU   *
         C     R2,=F'3'
         BL    G140
         PACK  PACKSECS,1(2,R1)
         LA    R1,3(,R1)
         ZAP   PACKWAIT,PACKHRS
         MP    PACKWAIT,=P'60'
         AP    PACKWAIT,PACKMINS
         MP    PACKWAIT,=P'60'
         AP    PACKWAIT,PACKSECS
         MP    PACKWAIT,=P'100'
         CVB   R4,PACKWAIT
         ST    R4,WAITTIME
         B     G999
G140     EQU   *
         XR    R15,R15
         BCTR  R15,0
         MVI   TIMTYPE,X'FF'
G999     EQU   *
         BR    R10
STIMERX  EQU   *
         SAVE  (14,12),,*
         USING STIMERX,R15
         LR    14,13                    * CHAIN
         LA    13,CNV00002              * THE
         ST    13,8(14)                 * SAVE
         ST    14,4(13)                 * AREAS.
         B     CNV00002+72              * BRANCH AROUND
CNV00002 DC    18A(0)                   * SAVE AREA.
         OI   TIMEXP,X'01'
*        TGET  INBUF,L'INBUF,WAIT
         L     R13,4(,R13)
         RETURN (14,12),T,RC=0         * Off we go.
         DC   C'*PARMAREA*'
PARMAREA DC   CL100' '
PACKHRS  DC   PL2'0'
PACKMINS DC   PL2'0'
PACKSECS DC   PL2'0'
PACKWAIT DS   PL8
COLON    DC   CL2'::'
INBUF    DS   CL10
TIMEXP   DC   X'00'
TIMTYPE  DC   X'00'
WAITTIME DC   F'6000'
WAITHMS  DC   C'00000000'
WAIT1    DC   F'200'
TIMADR1  DS   F
TIMADR2  DS   F
         END

--
Ken MacKenzie
(Of course, my opinions are not necessarily
 those of my employers)



Tue, 10 Aug 1999 03:00:00 GMT  
 TSO wait state

Quote:



> > >Is there any way of putting a TSO Rexx program into a (definable) wait
> > >state?

> > Could you be a little more clear on "what" you would want to drive the REXX
> > exec out of it's "wait state"?

> Well, since you're asking, any possible event type... Seriously it's
> really just a number of seconds that is needed, but putting a tag on,
> say, a file, so that you get an interrupt when it's opened or closed is
> the stuff of dreams I guess.

> Since my first posting I've been told that some version of MVS/TSO has a
> PAUSE
> command in it, presumably PAUSEing for a fixed number of
> seconds/milliseconds. Anyone
> know which version this is & how useful the command is?

> yours, Patrick
> ________________________________________________________

> Disclaimer: The form is BT but the essence is me.

> "Occam's razor is so sharp, I bought the whole argument"

I don't remember which system supported it, but years ago I wrote
a "timer" program, much like the one  Ken MacKenzie posted. As a result,
I did not do any further investigation on "PAUSE"

It would be nice however, if IBM would provide an MVS facility that
would be like or identical to the functionality provided by the IBM VM
"WAKEUP" program. (Including support for incoming TRANSMIT/RECEIVE
messages.)

Recommend you use Ken's code, and modify it if needed...

/s/ Bill Turner, wb4alm



Thu, 12 Aug 1999 03:00:00 GMT  
 TSO wait state

Quote:
> Is there any way of putting a TSO Rexx program into a (definable) wait
> state? A colleague says he was told, on a course, to read in a file &
> write it out again, but this seems a bit crude to be the state of the
> art. No TSO equivalent for CMS's wakeup?

Note that if you have OpenEdition active you could use the sleep command
as illustrated below:

/* rexx */
call syscalls 'ON'
call time 'E'
address syscall 'sleep 10'
say 'I waited 'time('E')' seconds'
return


Lockheed Martin
US EPA National Computer Center



Mon, 16 Aug 1999 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. interfacing non-WAIT state cpu buses to slow peripherals with WAIT signal

2. TSO REXX - timed wait/sleep routine?

3. Wait states

4. CLIPPER WAIT STATES

5. wait state timeout function

6. FSM and Wait States

7. wait states

8. Checking the state of a tri-state input signal in a Verilog testbench

9. Help with large state machine design (62 states)

10. State Machine - State Definition Question

11. Return to Known State From Unused States

12. finite state machines, state cad

 

 
Powered by phpBB® Forum Software