Is there a way to trap member names 1 at a time to avoid the big array ?
X = OUTTRAP('LISTDS.')
"LISTDS."
'LISTDS' DSN 'MEMBERS'
"LISTDS 'PREV.POS1.JOBS' MEMBERS"
RC(-1645) +++
I then want to loop through the list of members returned.
DO A = 7 TO LISTDS.0
IF SUBSTR(LISTDS.A,3,8) > 'ZZZZZZZZ' THEN LEAVE
PDSMEM = STRIP(SUBSTR(LISTDS.A,3,8))
FOUND.PDSMEM = 'YES'
END
The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
The Royal Bank of Scotland plc is authorised and regulated by the Financial Services Authority and represents The Royal Bank of Scotland Marketing Group. The Bank sells life policies, collective investment schemes and pension products and advises only on the Marketing Group's range of these products and on a With-Profit Bond produced by Norwich Union Life (RBS) Limited.
This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate.
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
It sounds like you need to read the directory natively.
The directory is provided as a RECFM=F LRECL=256 sequential file at the
start of the PDS. Each record can contain many directory entries but each
entry has its size encoded within. The last entry is X'FFFFFFFFFFFFFFFF'.
Here's a sample, which will list all members. Just change it to suit your
purpose. It takes a dsn as an argument.
Ken
/* REXX */
dsn = Arg(1)
dd = 'MYDD' /* Change This - If Desired */
"ALLOCATE F("dd") DA("dsn") SHR REUSE",
"LRECL(256) DSORG(PS) RECFM(F B)"
"EXECIO * DISKR" dd "(STEM DIR. FINIS"
"FREE F("dd")"
Do i = 1 To dir.0
reclen = c2d(Left(dir.i, 2))
rpos = 3
Do Forever
mem = Substr(dir.i, rpos, 8)
If mem = 'FFFFFFFFFFFFFFFF'x Then
Leave i
Say 'Member=' Left(mem,8)
esize = Substr(dir.i, rpos + 11, 1)
esize = bitand(esize, '0F'x)
rvar = c2d(esize) * 2
rpos = rpos + 12 + rvar
If rpos >= reclen Then
Leave
End
End
"Scott, John (Endevor)"
<John.P...@RBS.CO.UK> To:
TSO-...@VM.MARIST.EDU
Sent by: TSO REXX Discussion List cc:
<TSO-...@VM.MARIST.EDU> Subject: OUTTRAP LISTDS MEMBERS STORAGE ABEND
Wednesday December 8, 2004 03:20 PM
Please respond to TSO REXX
Discussion List
Jack Hicks
Sr. Service Delivery Analyst
Diversified Software
904.613.6479
"Scott, John (Endevor)" <John.P...@RBS.CO.UK>
Sent by: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>
12/08/2004 10:20 AM
Please respond to
TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>
Subject
OUTTRAP LISTDS MEMBERS STORAGE ABEND
In these kinds of cases I generally look for an infinite loop in the
program logic. That could include a REXX exec invoking itself.
Was an OUTTRAP("OFF") call included?
- seb
Of course that's not a solution to Mr Scott's problem. And I've very glad
that Mr MacKenzie was led to point out how to read the directory in some
other way; I'll be trying that one out (thanks, Ken).
But you know, on second thought I'm not sure I understand why the trap
isn't working. Sixty-nine thousand 40-byte records isn't very much, after
all; I load much more data into the stack during many routine file reads.
So what's the problem in this case?
---
Bob Bridges, robert...@discoverfinancial.com, 224 405-0811
rhb...@attglobal.net, 847 520-1684 xt 243
/* As an adolescent I aspired to lasting fame, I craved factual certainty,
and I thirsted for a meaningful vision of human life -- so I became a
scientist. This is like becoming an archbishop so you can meet girls. -M
Cartmill */
"Scott, John (Endevor)" <John.P...@RBS.CO.UK>
2004-12-08 09:20
To: TSO-...@VM.MARIST.EDU
cc:
Subject: OUTTRAP LISTDS MEMBERS STORAGE ABEND
I have a problem with an OUTTRAP when doing LISTDS dsn MEMBERS for a pds
with 69000 members it abends S66D 40 GETMAIN FAILURE
The rexx is running in an Endevor processor and upping the REGION size
does
not help
I think there is a problem populating the LISTDS.
Is there a way to trap member names 1 at a time to avoid the big array ?
X = OUTTRAP('LISTDS.')
"LISTDS."
'LISTDS' DSN 'MEMBERS'
"LISTDS 'PREV.POS1.JOBS' MEMBERS"
RC(-1645) +++
I then want to loop through the list of members returned.
DO A = 7 TO LISTDS.0
IF SUBSTR(LISTDS.A,3,8) > 'ZZZZZZZZ' THEN LEAVE
PDSMEM = STRIP(SUBSTR(LISTDS.A,3,8))
FOUND.PDSMEM = 'YES'
END
----------------------------------------------------------------------