On Sun, 22 Nov 2015 16:19:09 +0100, Leopold Strauss wrote:
>Quite simple.
>
>In unix-shell there ar prowerfull tools for going through a list,
>creating the apprpriate commands etc.
>
>In TSO there are not.
>
>And because I am very experienced in Unix ( althouigh lot of
>zOS-knowledge), I prefer Unix-shell and -tools
>
I heartily agree. Mr. Natural sez, "Use the right tool for the job."
Recently there was thread here about deleting all members of
a PDS. One suggestion used LISTDS, DFSORT, and IDCAMS.
I was aghast at its complexity. Here's a simpler alternative using
UNIX-shell and utilities (with comments, even):
rexx "/* List members of data set. */; \
address TSO 'LISTDS TEMP.CLIST MEMBERS'" |
# Skip to --MEMBERS-- header.
sed '1,/--MEMBERS--/d
# Prefix IDCAMS DELETE command; append ")"
s/^ */ DELETE user.TEMP.CLIST(/
s/$/)/
' | {
# generate JCL for IDCAMS step.
echo "\
//STEP EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=(,)
//SYSIN DD *"
# Append member list in SYSIN;
# Optimize performance by sorting in descending order.
sort -r; }
>On 19.11.2015 16:48, Peter Hunkeler wrote:
>> I'm curious to understand whay you want to run this rexx as a shell script
>> as oposed to a simple batch tso step.
>>
>> I don't see the benefit, only drawbacks
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN