You might consider using MAKEBUF and DROPBUF around your code. You are
stacking two lines of output when the file is on the A and the X disk. You
pull one of them and leave the other on the stack. Since the second line is
CATA EXEC X2, it will execute the CATA EXEC again, which will stack two
lines, etc. Yes you have an infinite loop.

If you want to execute the EXEC only from the X disk regardless of its
possible existence on another filemode, you can EXECLOAD the copy from the
X disk and then execute it since execs in storage get priority over execs
on disk. EXECLOAD allows you to specify the filemode. EXECLOAD fn ft fm.
You can even EXECLOAD the exec as a different name. HELP EXECLOAD can help
you if you choose to use it.
pdb (Doug Breneman)
z/VM System Test   IBM   Endicott, NY



From:       Sergio Lima <sergiovm...@hotmail.com>
To:         IBMVM@LISTSERV.UARK.EDU
Date:       10/14/2010 03:20 PM
Subject:    REXX that verify what MINIDISK is a file
Sent by:    The IBM z/VM Operating System <IBMVM@LISTSERV.UARK.EDU>



Hello List,

We are changing a REXX here for that this EXEC execute only if reside on X
acessed minidisk.
So, try with STATE command without succesfull  and now try  with LISTFILE
command.
If execute like this :

     9 *-* 'LISTFILE  cataa exec x (DATE STACK LIFO'
       >>>   "LISTFILE  cataa exec x (DATE STACK LIFO"
    10 *-* if rc = 0
       >>>   "1"
       *-*  then
       *-*  do
    11 *-*   pull x1 x2 x3 .
       >>>     "CATAA"
       >>>     "EXEC"
       >>>     "X2"
       >.>     "V         83        506          4 10/14/10 15:03:32"
    12 *-*   say x1
       >>>     "CATAA"
CATAA
    13 *-*   say x2
       >>>     "EXEC"
EXEC
    14 *-*   say x3
       >>>     "X2"
X2
    15 *-*   exit

But, when try execute with filemode *, lookslike the program go to a
LOOPING :

     9 *-* 'LISTFILE  cataa exec * (DATE STACK LIFO'
       >>>   "LISTFILE  cataa exec * (DATE STACK LIFO"
    10 *-* if rc = 0
       >>>   "1"
       *-*  then
       *-*  do
    11 *-*   pull x1 x2 x3 .
       >>>     "CATAA"
       >>>     "EXEC"
       >>>     "X2"
       >.>     "V         83        506          4 10/14/10 15:03:32"
    12 *-*   say x1
       >>>     "CATAA"
CATAA
    13 *-*   say x2
       >>>     "EXEC"
EXEC
    14 *-*   say x3
       >>>     "X2"
X2
    15 *-*   exit
     9 *-* 'LISTFILE  cataa exec * (DATE STACK LIFO'
       >>>   "LISTFILE  cataa exec * (DATE STACK LIFO"
    10 *-* if rc = 0
       >>>   "1"
       *-*  then
       *-*  do
    11 *-*   pull x1 x2 x3 .
       >>>     "CATAA"
       >>>     "EXEC"

The command in the line show this :

listfile cataa exec *
CATAA    EXEC     A2
CATAA    EXEC     X2
Ready; T=0.01/0.01 16:17:00

Someone can help, how can verify if this EXEC is not running from X disk ?

Thanks very much,

Sergio Lima Costa
Sao Paulo - Brazil

Reply via email to