View previous topic :: View next topic
|
Author |
Message |
jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
?! grow up
Quote: |
Experts don't use your imbecile process to change members, experts use IPOUPDTE, |
IPOUPDTE.. really?
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Quote: |
the "free" version, PDSUPDTE, which is about 50 zillion times faster. |
Yes every shop allows free stuff to be installed. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
Or even (much) better, PDS86 from CBTTAPE.ORG. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
FYI. His complaint is that it hangs on the DISKW statement. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
His problem is that he only has a hammer, which makes every problem look like a nut. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
Ah, yes, I'm obviously in need of new glasses. |
|
Back to top |
|
|
jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
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 |
|
|
|