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

Allocating SYSPRINT in the foreground

668 views
Skip to first unread message

Bob Bridges

unread,
Dec 12, 2014, 2:40:43 PM12/12/14
to
This isn't really a REXX question; it has to do with TSO, I think. But I'm
trying to run in the foreground a program that normally runs in batch, and
I'm having trouble figuring out how to allocate SYSPRINT for its use.
SYSPRINT, I presume, is already in use by my TSO session. So what must I do
to run the program in the foreground? I have to allocate SYSPRINT, but I
can't allocate SYSPRINT. I figure there's either some simple "Doh!" way to
go about it, or else you'll say it can't be done. What am I missing?

---
Bob Bridges
robhb...@gmail.com, cell 336 382-7313
rbri...@InfoSecInc.com

/* Logic is an organized way of going wrong with confidence. -Kettering's
Law, quoted in _The Number of the Beast_ by Robert A Heinlein. */

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

Nims,Alva John , Al

unread,
Dec 12, 2014, 2:57:01 PM12/12/14
to
Under TSO SYSPRINT is not normally allocated, the usual default is SYSTSPRT.

You state you cannot allocate SYSPRINT, why? The ALLOC command failing with what error message?

You can do a FREE FI(SYSPRINT) then the ALLOC or add REDO to the ALLOC command.

Do you want SYSPRINT allocated to your terminal [ALLOC FI(SYSPRINT) DA(*)], to SYSOUT [ALLOC FI(SYSPRINT) SYSOUT(outclass)] or to a data set, [alloc fi(sysprint) da(---dsn--) OLD/NEW..........]?

Bob Bridges

unread,
Dec 12, 2014, 3:20:07 PM12/12/14
to
35 years in TSO and NOW I learn that the TSO session uses SYSTSPRT, not
SYSPRINT?! Guess I don't run batch programs in the foreground very often or
I would have known.

When I run it in TRACE mode my ALLOC statement looks like this:

12 *-* 'ALLOC DDN(SYSPRINT) SYSOUT'
>L> "ALLOC DDN(SYSPRINT) SYSOUT"
UTILITY DATA SET NOT ALLOCATED, SYSTEM OR INSTALLATION ERROR+
TEXT UNIT X'0018' CONTAINS INVALID PARAMETER
+++ RC(12) +++

I've tried other variations of the ALLOC, of course. My idea in the end
will be to write the data to ...

...to, um...

Ok, this is embarrassing. I just realized what the problem is. I don't
understand that message, but what I want to do is write it to a temporary
dataset, then use EXECIO to read the resulting report and parse out pieces
of it. I was going to gussy up the ALLOCATE statement more exactly once I
had the bare bones of it working. But I'll never be able to read SYSOUT
regardless.

So thanks for your reply, which forced me to spell out (where even I could
hear it) what I'm after. One question, though: I see why ALLOCATE
DDN(SYSPRINT) SYSOUT isn't suitable for my needs. But why is it
unacceptable? What if I DID want it to go to SYSOUT?

---
Bob Bridges
robhb...@gmail.com, cell 336 382-7313
rbri...@InfoSecInc.com

/* God's never been disappointed in me, because he never had any illusions
about me. -Clay McLean */

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of
Nims,Alva John (Al)
Sent: Friday, December 12, 2014 14:57

Under TSO SYSPRINT is not normally allocated, the usual default is SYSTSPRT.

You state you cannot allocate SYSPRINT, why? The ALLOC command failing with
what error message?

You can do a FREE FI(SYSPRINT) then the ALLOC or add REDO to the ALLOC
command.

Do you want SYSPRINT allocated to your terminal [ALLOC FI(SYSPRINT) DA(*)],
to SYSOUT [ALLOC FI(SYSPRINT) SYSOUT(outclass)] or to a data set, [alloc
fi(sysprint) da(---dsn--) OLD/NEW..........]?

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@vm.marist.edu] On Behalf Of
Bob Bridges
Sent: Friday, December 12, 2014 2:40 PM

This isn't really a REXX question; it has to do with TSO, I think. But I'm
trying to run in the foreground a program that normally runs in batch, and
I'm having trouble figuring out how to allocate SYSPRINT for its use.
SYSPRINT, I presume, is already in use by my TSO session. So what must I do
to run the program in the foreground? I have to allocate SYSPRINT, but I
can't allocate SYSPRINT. I figure there's either some simple "Doh!" way to
go about it, or else you'll say it can't be done. What am I missing?

Don Imbriale

unread,
Dec 12, 2014, 3:26:07 PM12/12/14
to
ALLOC DD(SYSPRINT) SYSOUT(*)
to terminal, or
ALLOC DD(SYSPRINT) SYSOUT(X)
for class X

Don Imbriale

unread,
Dec 12, 2014, 3:33:40 PM12/12/14
to
Should be ALLOC DD(SYSPRINT) DA(*) for terminal output

As others said, REUSE may be needed. If SYSPRINT is currently open, FREE
or ALLOC with REU may fail.

On Fri, Dec 12, 2014 at 3:25 PM, Don Imbriale <don.im...@gmail.com>
wrote:

Styles, Andy , SD EP zPlatform

unread,
Dec 12, 2014, 4:06:22 PM12/12/14
to
Okay, a couple of things:

I'd advocate the use of TSO PROF MSGID to see the message ids prefixed to the errors; it helps you track down what's really going on:

"alloc fi(fred) sysout"
IKJ56246I SYSOUT DATA SET NOT ALLOCATED, FILE IN USE

ALLOC uses the DYNALLOC assembler macro, and the structure of the call is documented (for z/OS 1.13, at least) in the Authorised Assembler Services Guide, chapter 26.

26.4.4 of that book describes the 'text units' that make up the various parts of the allocate; x'0018' is the SYSOUT specification. Having said all that, I can't see why the ALLOC is failing, but you could try adding sysout class in brackets -

'ALLOC DDN(SYSPRINT) SYSOUT(X)'

or whatever. The output will be sent to your user id as the DD name allocated. I allocated FRED and wrote a line to it under my TSO session, and it appears under my user id in SDSF when I put a question mark against my user id (some systems you might need to do INPUT ON first in SDSF). I use this kind of thing when I want to hide the output from the user, but if something goes wrong, I'd like to be able to see the messages, and I don't want to allocate datasets and tidy them up again.

Incidentally, you could, if you really wanted to make it hard for yourself, use SDSF/REXX (assuming you have SDSF) to read the output of SYSOUT dataset..
Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC95000. Telephone: 0131 225 4555. Lloyds Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN. Registered in England and Wales no. 2065. Telephone 0207626 1500. Bank of Scotland plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC327000. Telephone: 08457 21 31 41. Cheltenham & Gloucester plc. Registered Office: Barnett Way, Gloucester GL4 3RL. Registered in England and Wales 2299428. Telephone: 0845 603 1637

Lloyds Bank plc, Bank of Scotland plc are authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and Prudential Regulation Authority.

Cheltenham & Gloucester plc is authorised and regulated by the Financial Conduct Authority.

Halifax is a division of Bank of Scotland plc. Cheltenham & Gloucester Savings is a division of Lloyds Bank plc.

HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC218813.

This e-mail (including any attachments) is private and confidential and may contain privileged material. If you have received this e-mail in error, please notify the sender and delete it (including any attachments) immediately. You must not copy, distribute, disclose or use any of the information in it or any attachments. Telephone calls may be monitored or recorded.

Kopischke, David G.

unread,
Dec 12, 2014, 4:59:23 PM12/12/14
to
Have you checked your session start-up PROC ??? Mine has SYSPRINT in it. Nothing has been written to it. I have a feeling it's not proper, but it's there none-the-less.

I would expect an ALLOC to fail in my environment.
This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies. OppenheimerFunds may, at its sole discretion, monitor, review, retain and/or disclose the content of all email communications.

Paul Gilmartin

unread,
Dec 12, 2014, 7:13:39 PM12/12/14
to
On 2014-12-12 14:59, Kopischke, David G. wrote:
> Have you checked your session start-up PROC ??? Mine has SYSPRINT in it. Nothing has been written to it. I have a feeling it's not proper, but it's there none-the-less.
>
It's customary; may even appear in an IBM example. Intended to
support very naive users who CALL standard utilities.

> I would expect an ALLOC to fail in my environment.
>
REUSE might help.

On 2014-12-12 12:40, Bob Bridges wrote:> This isn't really a REXX question; it has to do with TSO, I think. But I'm
> trying to run in the foreground a program that normally runs in batch, and
> I'm having trouble figuring out how to allocate SYSPRINT for its use.
> SYSPRINT, I presume, is already in use by my TSO session. So what must I do
> to run the program in the foreground? I have to allocate SYSPRINT, but I
> can't allocate SYSPRINT. I figure there's either some simple "Doh!" way to
> go about it, or else you'll say it can't be done. What am I missing?
>

Following works for me under UNIX. Should be almost as easy
under TSO or batch.

/* Rexx */ signal on novalue /*
Doc Reread a SYSPRINT
*/
trace R

RC = BPXWDYN( 'alloc dd(SYSPRINT) rtvol(V) rtdsn(D) reuse msg(WTP)' )
address 'LINKMVS' 'IEBGENER' /* (Just to write something to SYSPRINT. */

RC = BPXWDYN( 'alloc rtddn(DD) vol('V') dsn('D') shr reuse msg(WTP)' )
address 'MVS' 'EXECIO * DISKR' DD '(stem S. finis'

say DD S.0
do L = 1 to S.0; say S.L; end

Output is:

user@HOST: showsysprint
6 *-* RC = BPXWDYN( 'alloc dd(SYSPRINT) rtvol(V) rtdsn(D) reuse msg(WTP)' )
>>> "0"
7 *-* address 'LINKMVS' 'IEBGENER' /* (Just to write something to SYSPRINT. */
>>> "IEBGENER"
+++ RC(12) +++
9 *-* RC = BPXWDYN( 'alloc rtddn(DD) vol('V') dsn('D') shr reuse msg(WTP)' )
>>> "0"
10 *-* address 'MVS' 'EXECIO * DISKR' DD '(stem S. finis'
>>> "EXECIO * DISKR SYS00001 (stem S. finis"
12 *-* say DD S.0
>>> "SYS00001 2"
SYS00001 2
13 *-* do L = 1 to S.0
>>> "1"
>>> "2"
*-* say S.L
>>> "1DATA SET UTILITY - GENERATE PAGE 0001 "
1DATA SET UTILITY - GENERATE PAGE 0001
*-* end
*-* do L = 1 to S.0
*-* say S.L
>>> "-IEB316I DDNAME SYSIN CANNOT BE OPENED "
-IEB316I DDNAME SYSIN CANNOT BE OPENED
*-* end
*-* do L = 1 to S.0
user@HOST:

-- gil

Steve Coalbran

unread,
Dec 13, 2014, 5:29:21 AM12/13/14
to
If the DDname SYSPRINT is allocated in your JCL logon proc then you will
not be able to FREE it or ALLOC REUSE it.
This is PERMALC (permanent allocation) by the JCL and come what may you
cannot reallocate by TSO.
(that I know of! I know I've only been playing on my MVS toy(s) for
approaching 38 years, but that's my accumulated understanding)(but I'm no
sysprog!?)
/Steve



From: Paul Gilmartin <PaulGB...@AIM.COM>
To: TSO-...@VM.MARIST.EDU,
Date: 2014-12-13 01:14
Subject: Re: [TSO-REXX] Allocating SYSPRINT in the foreground
SÃ¥vida annat inte anges ovan: / Unless stated otherwise above:
IBM Svenska AB
Organisationsnummer: 556026-6883
Adress: 164 92 Stockholm

Thomas Berg

unread,
Dec 13, 2014, 5:29:44 AM12/13/14
to
Generally, when a REXX has a possibility to run in multiple environments, I usually begin it with:

x = BPXWDYN('ALLOC DD(SYSTSPRT) SYSOUT')

The same goes with any other potentially needed DD's.



Best Regards,
Thomas Berg
___________________________________________________________________
Thomas Berg Specialist zOS/RQM/IT Delivery Swedbank AB (Publ)

retired mainframer

unread,
Dec 13, 2014, 12:30:46 PM12/13/14
to
Our logon proc allocates SYSPROC, various ISPxLIB, and probably SYSPRINT. I
do not recall ever having a problem using free/allocate or alloc...reuse
with any of them.

> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf
> Of Steve Coalbran
> Sent: Saturday, December 13, 2014 12:45 AM
> To: TSO-...@VM.MARIST.EDU
> Subject: Re: Allocating SYSPRINT in the foreground
>
> If the DDname SYSPRINT is allocated in your JCL logon proc then you will
> not be able to FREE it or ALLOC REUSE it.
> This is PERMALC (permanent allocation) by the JCL and come what may you
> cannot reallocate by TSO.
> (that I know of! I know I've only been playing on my MVS toy(s) for
> approaching 38 years, but that's my accumulated understanding)(but I'm no
> sysprog!?)

Paul Gilmartin

unread,
Dec 13, 2014, 11:17:54 PM12/13/14
to
On 2014-12-13, at 01:44, Steve Coalbran wrote:

> If the DDname SYSPRINT is allocated in your JCL logon proc then you will
> not be able to FREE it or ALLOC REUSE it.
>
I'm skeptical about that, but I suspect that SYSTSPRT allocated in JCL
is held open by the TMP and can not be FREEd.

> This is PERMALC (permanent allocation) by the JCL and come what may you
> cannot reallocate by TSO.
> (that I know of! I know I've only been playing on my MVS toy(s) for
> approaching 38 years, but that's my accumulated understanding)(but I'm no
> sysprog!?)

0 new messages