Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie to REXX - having problems with EXECIO read/write

1,986 views
Skip to first unread message

McHugh, Laurie

unread,
Aug 13, 2009, 11:51:13 AM8/13/09
to
Hi.

What we are trying to do is set the local equivalents to the matching volumes at our disaster recovery site. I am trying to read a file(non=pds), VB, which looks like this:

VOLUME,VOL-UCSD,COPY B,COPY C,COPY D,,
OSARES,1325,1116,1416,1709,,
OSBRES,1326,1117,1417,1520,,
OSCRES,1327,1118,1418,1521,,
SYS005,1230,121A,151A,1800,,

And write it to a PDS creating a member. I am 1st having problems reading the file. Then the system tells that it cannot write to the dataset because it's still open. I am getting confused and extremely frustrated.

Here is what I have so far:
000014 /* ----------------------------------------------------------------- */
000015 /* read SYS2.UCSD.GLOBAL.MIRROR.IPLVOL */
000016 /* ----------------------------------------------------------------- */
000017 "ALLOC FILE(EQUIV1) DA('SYS2.UCSD.GLOBAL.MIRROR.IPLVOL') SHR REUSE"
000018 "EXECIO 5 DISKR equiv1 (finis"
000019 "FREE FI(EQUIV1)"
000020 "ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR REUSE"
000021 "EXECIO * DISKW EQUIV2 (finis "
000022 EXIT 0

And this is the response from the system:
IKJ56228I DATA SET SYSLMP.SHR NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
IKJ56109I DATA SETS NOT CONCATENATED+
IKJ56109I FAILURE TO ALLOCATE DATA SET SYSLMP.SHR
20 *-* "ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR REUSE"
+++ RC(12) +++
IRX0555E The input or output file EQUIV2 is not allocated. It cannot be opened
for I/O.
IRX0670E EXECIO error while trying to GET or PUT a record.
21 *-* "EXECIO * DISKW EQUIV2 (finis "
+++ RC(20) +++

Where is it picking up a SYSLMP.SHR file? The file is not even coded anywhere. SYSLMP is my TSO userid and it appears to be appending a SHR, word onto the end. I've been hammering at this for days and still nothing. I was however successful at reading a command from SYSVIEW and creating a member in the same dataset, so I know a read/write works. My suspicions are that I will have to PARSE the input file using the absolute column value or something.

Thanks for your help. BTW - I've gotten really useful tips from reading the older blogs.

Laurie

Laurie McHugh
UCSD ACT IT Infrastructure
Systems Programmer

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Tony Netley

unread,
Aug 13, 2009, 11:55:44 AM8/13/09
to
"ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR REUSE"
should be:
"ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)') SHR REUSE"

Hi.

Laurie

-
------------------------------------------------------------------------
This email has been scanned for all known viruses by the MessageLabs
Email
Security Service and the Macro 4 internal virus protection system.
-
------------------------------------------------------------------------

- ------------------------------------------------------------------------
This email has been scanned for all known viruses by the MessageLabs Email
Security Service and the Macro 4 internal virus protection system.
- ------------------------------------------------------------------------

McHugh, Laurie

unread,
Aug 13, 2009, 11:57:20 AM8/13/09
to
Thanks - Sometime I can't see the forest for trees.

Rick Woods

unread,
Aug 13, 2009, 12:03:20 PM8/13/09
to
Laurie

"ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR REUSE"

...should be:

"ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)') SHR REUSE" (note extra paren at end of dsname)

I don't know if that's your problem, but it's *a* problem, and it's on the right statement.
- Rick


>>> "McHugh, Laurie" <lmc...@UCSD.EDU> 8/13/2009 8:49 AM >>>

Rick Woods

unread,
Aug 13, 2009, 12:04:02 PM8/13/09
to
Ack - I took too long responding!

>>> "McHugh, Laurie" <lmc...@UCSD.EDU> 8/13/2009 8:57 AM >>>

McHugh, Laurie

unread,
Aug 13, 2009, 12:10:52 PM8/13/09
to
Thank you Rick. I get so bogged down with making things match that I miss something obvious. Adding the extra paren worked.

Laurie

Arthur T.

unread,
Aug 13, 2009, 12:14:09 PM8/13/09
to
On 13 Aug 2009 08:51:13 -0700, in bit.listserv.tsorexx
(Message-ID:<E434D2A73B99BF458714D...@MBX3.AD.UCSD.EDU>)
lmc...@UCSD.EDU (McHugh, Laurie) wrote:

<snip>


>And write it to a PDS creating a member. I am 1st having
>problems reading the file. Then the system tells that it
>cannot write to the dataset because it's still open. I am
>getting confused and extremely frustrated.
>
>Here is what I have so far:

<snip>


>000020 "ALLOC FILE(EQUIV2)
>DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR REUSE"
>000021 "EXECIO * DISKW EQUIV2 (finis "
>000022 EXIT 0
>
>And this is the response from the system:
>IKJ56228I DATA SET SYSLMP.SHR NOT IN CATALOG OR CATALOG
>CAN NOT BE ACCESSED
>IKJ56109I DATA SETS NOT CONCATENATED+
>IKJ56109I FAILURE TO ALLOCATE DATA SET SYSLMP.SHR
> 20 *-* "ALLOC FILE(EQUIV2)
> DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR REUSE"
> +++ RC(12) +++

Try changing


"ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)'
SHR REUSE"

to
"ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2))'
SHR REUSE"

--
I cannot receive mail at the address this was sent from.
To reply directly, send to ar23hur "at" intergate "dot" com

Paul Gilmartin

unread,
Aug 13, 2009, 12:47:41 PM8/13/09
to
On Aug 13, 2009, at 09:55, Tony Netley wrote:

> "ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR REUSE"
> should be:
> "ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)') SHR REUSE"

> ...
>
Why doesn't TSO report a syntax error here without even attempting
the allocation? It's a disservice to the user to attempt this sort
of DWIM. What if 'SYSLMP.SHR' had actually existed?

> And this is the response from the system:
> IKJ56228I DATA SET SYSLMP.SHR NOT IN CATALOG OR CATALOG CAN NOT BE
> ACCESSED
> IKJ56109I DATA SETS NOT CONCATENATED+
> IKJ56109I FAILURE TO ALLOCATE DATA SET SYSLMP.SHR

-- gil

Lizette Koehler

unread,
Aug 13, 2009, 12:50:33 PM8/13/09
to
When I code an execio I usually use a var for the dataset name

Address TSO "ALLOC DD(SRCIN) DA('"dsname"') SHR REUSE "

EXECIO "* DISKR SRCIN (FINIS STEM SRC. "

But in the OP example I do not see a stem. var for the execio? Where is the data that is read go?

Lizette


>
>"ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR REUSE"
>should be:
>"ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)') SHR REUSE"
>

>-----Original Message-----
>From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf
>Of McHugh, Laurie
>Sent: 13 August 2009 16:50
>To: TSO-...@VM.MARIST.EDU
>Subject: Newbie to REXX - having problems with EXECIO read/write
>
>Hi.
>
>What we are trying to do is set the local equivalents to the matching
>volumes at our disaster recovery site. I am trying to read a
>file(non=pds), VB, which looks like this:
>
>VOLUME,VOL-UCSD,COPY B,COPY C,COPY D,,
> OSARES,1325,1116,1416,1709,,
> OSBRES,1326,1117,1417,1520,,
> OSCRES,1327,1118,1418,1521,,
> SYS005,1230,121A,151A,1800,,
>

>And write it to a PDS creating a member. I am 1st having problems
>reading the file. Then the system tells that it cannot write to the
>dataset because it's still open. I am getting confused and extremely
>frustrated.
>
>Here is what I have so far:

>000014 /*
>----------------------------------------------------------------- */
>000015 /* read SYS2.UCSD.GLOBAL.MIRROR.IPLVOL
>*/
>000016 /*
>----------------------------------------------------------------- */
>000017 "ALLOC FILE(EQUIV1) DA('SYS2.UCSD.GLOBAL.MIRROR.IPLVOL') SHR
>REUSE"
>000018 "EXECIO 5 DISKR equiv1 (finis"
>000019 "FREE FI(EQUIV1)"

>000020 "ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR
>REUSE"


>000021 "EXECIO * DISKW EQUIV2 (finis "
>000022 EXIT 0
>

>And this is the response from the system:
>IKJ56228I DATA SET SYSLMP.SHR NOT IN CATALOG OR CATALOG CAN NOT BE
>ACCESSED
>IKJ56109I DATA SETS NOT CONCATENATED+
>IKJ56109I FAILURE TO ALLOCATE DATA SET SYSLMP.SHR

> 20 *-* "ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR
>REUSE"


> +++ RC(12) +++
>IRX0555E The input or output file EQUIV2 is not allocated. It cannot be
>opened
>for I/O.
>IRX0670E EXECIO error while trying to GET or PUT a record.
> 21 *-* "EXECIO * DISKW EQUIV2 (finis "
> +++ RC(20) +++
>
>Where is it picking up a SYSLMP.SHR file? The file is not even coded
>anywhere. SYSLMP is my TSO userid and it appears to be appending a SHR,
>word onto the end. I've been hammering at this for days and still
>nothing. I was however successful at reading a command from SYSVIEW and
>creating a member in the same dataset, so I know a read/write works. My
>suspicions are that I will have to PARSE the input file using the
>absolute column value or something.
>
>Thanks for your help. BTW - I've gotten really useful tips from reading
>the older blogs.
>
>Laurie
>

----------------------------------------------------------------------

Paul Gilmartin

unread,
Aug 13, 2009, 1:01:51 PM8/13/09
to
On Aug 13, 2009, at 10:50, Lizette Koehler wrote:

> When I code an execio I usually use a var for the dataset name
>
> Address TSO "ALLOC DD(SRCIN) DA('"dsname"') SHR REUSE "
>
> EXECIO "* DISKR SRCIN (FINIS STEM SRC. "
>
> But in the OP example I do not see a stem. var for the execio?
> Where is the data that is read go?
>

The "stack". Like you, I avoid use of the stack. It's
error-prone.

-- gil

Martin Cox

unread,
Aug 13, 2009, 1:11:12 PM8/13/09
to
Because it is syntactically correct:)

The DA(.....is being treated as a list of datasets to be concatenated and,
from the manual, you can omit the closing parenthesis if it is the last
character of the command so if SYSLMP.SHR existed it would look for
SYSLMP.REUSE .

Cheers
Martin

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of

Paul Gilmartin
Sent: 13 August 2009 17:47
To: TSO-...@VM.MARIST.EDU

Subject: Re: [TSO-REXX] Newbie to REXX - having problems with EXECIO
read/write

Paul Gilmartin

unread,
Aug 13, 2009, 1:20:43 PM8/13/09
to
On Aug 13, 2009, at 11:09, Martin Cox wrote:

> Because it is syntactically correct:)
>
> The DA(.....is being treated as a list of datasets to be
> concatenated and,
> from the manual, you can omit the closing parenthesis if it is the
> last
> character of the command so if SYSLMP.SHR existed it would look for
> SYSLMP.REUSE .
>

Bad design. (Typical of TSO?) And, as demonstrated in the source
of this thread, error-prone. Maybe devised by a LISP renegade?

Rick Combest

unread,
Aug 13, 2009, 1:29:29 PM8/13/09
to
Why blame TSO for somones inability to understand how allocation works in an MVS environment. TSO did what it was told. heheh young'uns

>>> Paul Gilmartin <PaulGB...@AIM.COM> 8/13/2009 1:20 PM >>>

Ulrich Krueger

unread,
Aug 13, 2009, 1:31:31 PM8/13/09
to
> "ALLOC FILE(EQUIV2) DA('SYS2.UCSD.DR.DEV.IPLINFO(EQUIV2)' SHR REUSE"

Gil,
You don't get a syntax error in this case, because all that the ALLOC
command can see is a correctly formatted command using the FILE() and the
DAtaset() parameters. Nothing else.
Within the DA() parameter, the command "sees" a list of three subparameters,
namely dataset 'SYS2....' followed by dataset SHR and dataset REUSE (which
will be prefixed with the default-HLQ since they're not quoted, hence
'SYSLMP.SHR').
Oh, but there's no closing parentheses after the last dataset name ...
that's OK, we'll just assume that there is because the command line ends
here. And ALLOC furthermore assumes that no other parameters have been
specified and therefore uses defaults for all other parameters and options,
e.g., a default disposition of OLD, etc.

Just remember, that the DATASET() parameter is defined as "a list of one or
more dataset names, specified according to TSO-command dataset naming
conventions (with or without quotes), with blanks a separators between
dataset names".
So, if you forget the closing parentheses after your first and only dataset
name, other parameters and options specified will be misconstrued as dataset
names and give you the weird result the user got here.

What if 'SYSLMP.SHR' existed?
You would have gotten an error "missing dataset SYSLMP.REUSE".

What if both datasets, SYSLMP.SHR and SYSLMP.REUSE, existed?
In that case you would not have gotten any errors. ALLOC would have
concatenated all three datasets using DISP=OLD as a default.
What would have happened next depends very much on the file attributes and
the contents of these datasets and how the program that's reading the data
likes the contents of datasets SHR and REUSE ... or dislikes them ...

HTH
Regards,
Ulrich Krueger

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of

Paul Gilmartin
Sent: Thursday, August 13, 2009 09:47
To: TSO-...@VM.MARIST.EDU

Subject: Re: [TSO-REXX] Newbie to REXX - having problems with EXECIO
read/write

Rick Woods

unread,
Aug 13, 2009, 1:43:59 PM8/13/09
to
So, "SYSLMP" would probably be Laurie's userid. OK, that all makes sense.

But, I have to agree that syntax shortcuts shouldn't be coded into the command. When a matching close-paren isn't found, a warning message at least should be issued. I'm a big fan of consistency.
(The next obvious question is "OK wise guy, let's see *your* programming language", to which I have no response).
- Rick

>>> Ulrich Krueger <uk...@PACBELL.NET> 8/13/2009 10:31 AM >>>

Robert Zenuk

unread,
Aug 13, 2009, 3:31:04 PM8/13/09
to
While it would not have caught it in this case due to the entire command
and DSN being enclosed in the double quotes, this is why I always use the
edit HILITE command to color code my source. This will clearly identify
missing parens (assuming you select the option from the HILITE screen). This
makes missing quotes, do/end sequences, if/else sequences, etc hard to miss.
Avoids hours of wasted time looking for something stupid...

Rob


In a message dated 8/13/2009 10:29:45 A.M. US Mountain Standard Time,
Rick.C...@BCBSNC.COM writes:

Why blame TSO for somones inability to understand how allocation works in
an MVS environment. TSO did what it was told. heheh young'uns

>>> Paul Gilmartin <PaulGB...@AIM.COM> 8/13/2009 1:20 PM >>>
On Aug 13, 2009, at 11:09, Martin Cox wrote:

> Because it is syntactically correct:)
>
> The DA(.....is being treated as a list of datasets to be
> concatenated and,
> from the manual, you can omit the closing parenthesis if it is the
> last
> character of the command so if SYSLMP.SHR existed it would look for
> SYSLMP.REUSE .
>
Bad design. (Typical of TSO?) And, as demonstrated in the source
of this thread, error-prone. Maybe devised by a LISP renegade?

-- gil

0 new messages