Mark Zelden wrote:
On Tue, 18 Oct 2005 12:10:12 -0600, Steve Comstock
<[EMAIL PROTECTED]> wrote:


In our TSO CLIST course, we include a brief discussion
of the [rather arcane] TSO EDIT command; it is clear
I can include an edit command followed by various
edit subcommands in a CLIST.

But I have trouble accomplishing the same work in
a REXX exec. I've tried emulating the CLIST approach
(edit command followed by lines with edit subcommands)
and  PUSHing the edit subcommands on the stack before
issuing the edit command. To no avail.

Looks like I'll have to call a CLIST to get that
work done. Anyone able to shed any light on this one?




You need to "QUEUE", not "PUSH" so the commands are read
from the stack in the correct order.   I ran both these
examples below from TSO batch and they worked the same:

CLIST:
PROC 0
   EDIT   'userid.TEMP.CNTL' CNTL NUM OLD /* EXPECT IKJ52313I */
    VERIFY ON
    TOP
    DEL * 999
    INSERT PROC 0
    INSERT CONTROL LIST
    INSERT WRITE THIS CLIST WAS CREATED VIA TSO EDIT COMMAND IN CLIST
    INSERT EXIT CODE(0)
    TOP
    L
   SAVE
   END



REXX:
/* rexx */
 queue 'VERIFY ON'
 queue 'TOP'
 queue 'DEL * 999'
 queue 'INSERT PROC 0'
 queue 'INSERT CONTROL LIST'
 queue 'INSERT WRITE THIS CLIST CREATED VIA TSO EDIT COMMAND IN REXX'
 queue 'INSERT EXIT CODE(0)'
 queue 'TOP'
 queue 'L'
 queue 'SAVE'
 queue 'END'
 address TSO  ,
 "EDIT   'userid.TEMP.CNTL' CNTL NUM OLD"  /* EXPECT IKJ52313I */



Regards,

Mark
--

Well, you're right and you're wrong.

1. You're right because it can be done if you issue
   the subcommands in the right order

2. You're wrong because you don't have to use
   queue; you can use push; again, as long as the
   subcommands end up in the right order

I got it to work thanks to your insights, though.

Thanks.

Kind regards,

-Steve Comstock

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to