Here is some code from a working program I have to issue a rent WTOR. You should be able to modify this for your needs......

*--------------------------------------------------------------*
* WTOR
*--------------------------------------------------------------*
         LA    R2,L'REPLY              LENGTH OF REPLY BUFFER
         LA    R3,REPLY                A(REPLY BUFFER)
         LA    R4,ECBAD                A(ECB)
         MVC   WTORD1(WTOR1L),WTOR1    INIT PLIST
         XC    ECBAD,ECBAD             CLEAR ECB
*
         WTOR  'YES OR NO',(R3),(R2),(R4),                             X
               MF=(E,WTORD1)
*
         WAIT  ECB=ECBAD               WAIT FOR RESPONSE
*
.........


Place the following by your LTORG statement:

         EJECT
WTOR1    WTOR  'YES OR NO',ROUTCDE=(9),MF=L
WTOR1L   EQU   (*-WTOR1)


Place the following in your local workarea:

*--------------------------------------------------------------*
ECBAD    DS    F             WTOR ECB
REPLY    DS    CL8           WTOR REPLY BUFFER
WTORD1   DS    0D,XL(WTOR1L) WTOR REMOTE PLIST




Ray Overby
Key Resources, Inc.
Ensuring System Integrity for z/Series^(TM)
www.zassure.com
(312)574-0007


On 3/19/2012 07:52 AM, Rob Scott wrote:
WTOR and WTO are macros that require a model parameter list to be constructed 
and populated *before* you issue the MF=E form.

Zeroing the parameter list is NOT sufficient - you must move in a model MF=L 
form just before the MF=E invocation.

More modern macros have the ",COMPLETE" option on the MF=E specification, 
unfortunately some of the older macros do not have this functionality.

Rob Scott
Lead Developer
Rocket Software
275 Grove Street * Newton, MA 02466-2272 * USA
Tel: +1.781.684.2305
Email: [email protected]
Web: www.rocketsoftware.com

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Micheal Butz
Sent: 19 March 2012 12:45
To: [email protected]
Subject: WTOR problem

Hi,



I am having problems with following coding generating a re-entrable version of 
the WTOR below is the relvant code



                               LTORG

  DEBUG_MESS DC  C'THE BASE ADDRESS IS XXXXXXXX '

  TBL      DC    240X'00'

           DC    C'0123456789ABCDEF'





WS_DSECT           DSECT

D_MSG      DS   AL2

            DS   CL29

WORKFLD    DS   CL9

BASE_ADDR  DS   XL5

REPLY_AREA DS   X

REPLY_LEN  EQU  1

REPLY_ECB  DS   F

WTO_D_LST WTOR TEXT=(,,,),MF=L

WTO_D_LST_LEN  EQU  *-WTO_D_LST





           ST    R3,BASE_ADDR

           UNPK  WORK_FLD,BASE_ADDR

           TR    WORK_FLD,TBL

           MVC   D_MSG+2(L'DEBUG_MESS),DEBUG_MESS

           MVC   D_MSG+22(8),WORK_FLD

           MVC   D_MSG(2),=AL2(L'DEBUG_MESS)

           XC    WTO_D_LST(WTO_D_LST_LEN),WTO_D_LST

          WTOR   TEXT=(D_MSG,REPLYAREA,REPLY_LEN,REPLY_ECB),MF=(E,WTO_D_L

                 ST)



                           WAIT         ECB=REPLY_ECB



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to