IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

why i need hit enter after EXECIO * DISKW , how to skip it ?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Fri May 20, 2016 9:16 pm
Reply with quote

Hi Experts,

I got the REXX program to first get member list for a PDS and then change the string in each member. each time i need to hit enter to conitine the code after "EXECIO * DISKW MYOUTDD (FINIS" so i was wordering how to change this part to skip enter and let program continue without interaction?

Thank you very much for your help!

here is the code :
Code:
 /* REXX */                                                           
 /* RENAME CERTAIN STRING FOR ALL THE MEMBERS INSIDE PDS             */
 /*                                                                   *
  THEPDS= "'TTAT.TSP.TU14.TESTT'"                                     
  X = OUTTRAP('ML1.')                                                 
  "LISTDS "THEPDS" MEMBERS"                                           
  X = OUTTRAP('OFF')                                                   
  DO A= 7 TO ML1.0                                                     
    MNAME1.A=ML1.A                                                     
    MNAME1.A=STRIP(MNAME1.A)                                           
    THEPDS2="'TTAT.TSP.TU14.TESTT("||MNAME1.A")'"                     
    /* READ THE SIGNLE MEMBER AND DO THE RENAME */                     
    "ALLOC DA("THEPDS2") F(INDD) SHR REUSE"                           
    "EXECIO  *  DISKR INDD (STEM UL0."                                 
    "EXECIO  *  DISKR INDD (FINIS"                                     
    OLDSTR = 'MQT9'         
    NEWSTR = 'MQT7'     
    DO N = 1 TO UL0.0                                               
        DO FOREVER                                                 
           S = POS(OLDSTR,UL0.N)                                   
           IF S = 0 THEN LEAVE     /* IF FOUND THEN DO THE RENMAE */
              UL0.N = SUBSTR(UL0.N,1,S-1) || NEWSTR || ,           
              SUBSTR(UL0.N,S+LENGTH(OLDSTR))                       
        END                                                         
      QUEUE UL0.N                                                   
   END                                                             
   "ALLOC DA("THEPDS2") F(MYOUTDD) SHR REUSE"                       
   "EXECIO * DISKW MYOUTDD (FINIS"                                 
   "FREE F(MYOUTDD)"                                               
 END     
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri May 20, 2016 10:09 pm
Reply with quote

From the rexx manual:
Quote:
When EXECIO writes an arbitrary number of lines from the data stack, it stops only when it reaches a null line. If there is no null line on the data stack in an interactive TSO/E address space, EXECIO waits for input from the terminal and stops only when it receives a null line.


After you have queued all of you data lines, queue a null line.

-OR-

Instead of EXECIO *, use "EXECIO" UL0.0 "etc..."
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri May 20, 2016 11:57 pm
Reply with quote

jackzhang75 wrote:
Hi Experts,

I got the REXX program to first get member list for a PDS and then change the string in each member.

Hi minkukel,

Experts don't use your imbecile process to change members, experts use IPOUPDTE, or the "free" version, PDSUPDTE, which is about 50 zillion times faster.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Sat May 21, 2016 1:35 am
Reply with quote

Quote:
Hi minkukel
icon_rolleyes.gif ?! grow up

Quote:
Experts don't use your imbecile process to change members, experts use IPOUPDTE,

IPOUPDTE.. really? icon_lol.gif
Quote:
For IPOUPDTE to work, each PDS to be searched
MUST contain a member named $$$COIBM.

Other rules regarding string replacement are as follows:
1. The string to be replaced, STRING1, must be totally contained in
positions 1 through 71 of an input record. Thus, the continuation
position, position 72, and the sequence number field, positions 73
through 80, are not affected by any updates.
2. To be eligible for replacement, STRING1 must be a "word," not
merely a string of characters imbedded within a "word." A "word"
to IPOUPDTE is any string of characters bounded on both ends by
any of several special delimiting characters. It does not have to
be an English word in the ordinary sense. For STRING1 to be a
word, it must have one of the following characters to its left and
one to its right:
' , . / < > ? " : ; ^ + _ ( ) * % | =
and blank

The only exceptions to this statement are:
* When STRING1 starts at the beginning of the input record or
ends in the last position (71) of the input record
* When the two characters '.V' or '/V' occur in an input record.
The 'V' is considered part of the delimiter, not of the word,
and so is not eligible for replacement.
NOTE: The special handling of '.V' allows IPOUPDTE to update a
VOLSER in CBIPO-format catalog names at the same time most other
references to the VOLSER are updated. Figure 21 demonstrates how
IPOUPDTE handles the '.V' special case.

The complete restrictions can be found in www-03.ibm.com/systems/z/os/zos/installation/cppupdte.txt

With all these things to consider, I would write my own program and be aware how it works rather than lookout for potholes.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Sat May 21, 2016 1:37 am
Reply with quote

Quote:
the "free" version, PDSUPDTE, which is about 50 zillion times faster.

Yes every shop allows free stuff to be installed. icon_rolleyes.gif
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat May 21, 2016 3:04 am
Reply with quote

Or even (much) better, PDS86 from CBTTAPE.ORG.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat May 21, 2016 3:07 am
Reply with quote

Ok, to answer your question, it is because you have 2 EXECIO's, both with '*' as record count. Combine them into one
Code:
 
   "EXECIO  *  DISKR INDD (STEM UL0. FINIS)"                                 

or if you insist on having 2 statements then
Code:

    "EXECIO  *  DISKR INDD (STEM UL0. )"                                 
    "EXECIO  0  DISKR INDD (FINIS"
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sat May 21, 2016 4:06 am
Reply with quote

FYI. His complaint is that it hangs on the DISKW statement.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sat May 21, 2016 11:22 am
Reply with quote

His problem is that he only has a hammer, which makes every problem look like a nut.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat May 21, 2016 3:51 pm
Reply with quote

Ah, yes, I'm obviously in need of new glasses.
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Mon May 23, 2016 10:48 pm
Reply with quote

Thank you all for your help.

Now it works for following

Code:
                                     
  "ALLOC DA("THEPDS2") F(MYOUTDD) SHR REUSE"   
  "EXECIO "QUEUED()" DISKW MYOUTDD (FINIS)"   
  "FREE F(MYOUTDD)"     
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts REXX table content on panel will be r... CLIST & REXX 6
No new posts Expected data is not coming up on Fir... CICS 2
No new posts SKIP LOCKED DATA in UPDATE statement DB2 9
No new posts trigger enter key automatically call ... CICS 17
No new posts REXX EXECIO STEM No newline CLIST & REXX 3
Search our Forums:

Back to Top