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

Re: Why does a CLIST execute as a REXX? - Solution

62 views
Skip to first unread message

Lizette Koehler

unread,
Apr 7, 2010, 5:27:01 PM4/7/10
to
I think I finally found the answer.

This is suppose to be a CLIST. However buried deep within this code (I did not write it) are some ISPEXEC statements.

This is the cause of my problems.

I am working on correcting this issue.

Lizette

>From: Alberto Mazzetto Wrote:
>
>Hi Lizette,
>
>a couple more suggestions:
>
>- check the member with PROF for anything weird. I once had hours of fun
>until I figured out somebody had saved something with PACK ON...
>- turn on CLIST and REXX tracing with TSO TSOTRACE and
>TSO EXECUTIL TS. Perhaps you'll see something happening before your
>member gets accessed.
>
>Hope this helps,
>- Alberto -
>
>
>Lizette Koehler wrote:
>> Steve,
>> I did not set the reply to. Not sure how that happened.
>>
>> I will check my ISP, but it may be possible that the listserver may have done that.
>>
>> The process is an ISPF application so the call to this function is done from within this app. I have verified as much as I can and there is nothing that looks like it should be calling it as a Rexx. This is pure clist invocations. But I will review some more.
>>
>> I have seen this behavior when I accidently put the clist in the SYSEXEC, but not when I have it in SYSPROC.
>>
>> Lizette
>>
>>
>> > Steve Comstock Wrote
>> >
>> > Lizette Koehler wrote:
>> > > I am having a problem with a CLIST that is on SYSPROC and not on EXEC
>> > trying to run as a REXX.
>> > >
>> > > Clist has proper PROC to start it off, but gets errors when executing.
>> > >
>> > > PROC 0 NOADD DEBUG
>> > >
>> > > /* Initialize the Consolidated Status Facility view table for ESP. */
>> > >
>> > > CONTROL NOFLUSH END(ENDO) ASIS
>> > > IF &DEBUG NE /*NULL*/ THEN +
>> > > CONTROL CONLIST SYMLIST LIST
>> > >
>> > > some more code
>> > >
>> > > CHKQUOTE: PROC 0 ZXZX()
>> > >
>> > > SET TZXZX = &NRSTR(&&)&ZXZX
>> > > SET ZXZX = &TZXZX
>> > >
>> > > IF &SYSINDEX(',&STR(&ZXZX)) NE 0 THEN +
>> > > DO
>> > > SET L = &LENGTH(&STR(&ZXZX))
>> > > DO I = 1 TO &L
>> > > SET TITLE = &STR(&SUBSTR(&I:&I,&STR(&ZXZX)))
>> > > SET DBE&I = &STR(&TITLE)
>> > > ENDO
>> > > SET TITLE = /*NULL*/
>> > > DO I = 1 TO &L
>> > > SET QQ = &&DBE&I
>> > > IF &STR(&QQ) EQ &STR(') THEN +
>> > > SET TITLE = &STR(&TITLE)&STR(')
>> > > some more code....
>> > >
>> > > When this executes it gets the following error (&SYSNIDX is on line
>> > 601).
>> > > COMMAND PROC NOT FOUND
>> > > 1 *-* PROC 0 NOADD DEBUG
>> > > +++ RC(-3) +++
>> > > 601 +++ IF &SYSINDX(',&STR(&ZXZX)) NE 0 THEN +
>> > > DO
>> > > SET L =
>> > &LENGTH(&STR(&ZXZX))
>> > > DO I =
>> > > 1 TO &L
>> > SET
>> > > TITLE = &STR(&SUBSTR(&I:&I,&STR(&ZXZX)))
>> > > SET DBE&I = &STR(&TITLE)
>> > > ENDO
>> > > SET TITLE =
>> > /*NULL*/
>> > > DO I = 1 TO &L
>> > > SET QQ = &&DBE&I
>> > > IF &STR(&QQ) EQ &STR(
>> > > 5 +++ CONTROL NOFLUSH END(ENDO) ASIS
>> > > Error running CYBESCSI, line 601: Name or string > 250 characters
>> > >
>> > >
>> > > I do not see why if this clist (and I used ISRDDN) is only in SYSPROC,
>> > I would get an error making it look like it is trying to execute a REXX.
>> > >
>> > > Thoughts?
>> > >
>> > > Lizette
>> >
>> > Sometimes it depends on the way you invoke the clist. Did
>> > you invoke it from the command line? Maybe:
>> >
>> > ===> ex 'library_name(clist_name)' clist
>> >
>> >
>> >
>> >
>> >
>> > P.S. - you might want to be sure your Reply-to is set to the
>> > list instead of yourself.
>

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

Steve Comstock

unread,
Apr 7, 2010, 5:42:07 PM4/7/10
to
Lizette Koehler wrote:
> I think I finally found the answer.
>
> This is suppose to be a CLIST. However buried deep within this
> code (I did not write it) are some ISPEXEC statements.
>
> This is the cause of my problems.
>
> I am working on correcting this issue.
>
> Lizette

I wouldn't get too excited there. CLISTs may properly
contain ISPEXEC statements; using ISPEXEC services does
not require REXX nor make a CLIST into an exec.


ISPEXEC commands are just how you invoke ISPF services
in a dialog.

[BTW, your Reply-to is back to pointing to you instead of the list.]
--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

* z/OS application programmer training
+ Instructor-led on-site classroom based classes
+ Course materials licensing
+ Remote contact training
+ Roadshows
+ Course development

richard rozentals

unread,
Apr 7, 2010, 5:52:46 PM4/7/10
to
Hi Lizette,

I don't think the problem is with the CLIST code. This is a CLIST that was written by the vendor a long time ago with no changes.

I think that Alberto may have a good idea on this. A simpler way to test his suggestions is to try running the CLIST from another user's ID. If it works then he may be right.

Another thing to try is to try running this outside of ESP in debug mode. At least you'll see if it's the libdefs of the like messing you up.

Richard

________________________________
From: Lizette Koehler <star...@MINDSPRING.COM>
To: TSO-...@VM.MARIST.EDU
Sent: Wed, April 7, 2010 5:26:55 PM
Subject: Re: [TSO-REXX] Why does a CLIST execute as a REXX? - Solution

Lizette

__________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!

http://www.flickr.com/gift/

Mickey

unread,
Apr 7, 2010, 7:10:28 PM4/7/10
to
Me, being stupid, I would run it in batch, and code ONLY the SYSPROC DD
statement. Then I would know if it was session specific, or somethingi n the
code itself.

Mickey

--------------------------------------------------
From: "richard rozentals" <r_roz...@YAHOO.COM>
Sent: Wednesday, April 07, 2010 5:52 PM
To: <TSO-...@VM.MARIST.EDU>

Seibert, Dave

unread,
Apr 7, 2010, 9:01:05 PM4/7/10
to
Hi Lizette,

I apologize if I have missed a post from you in which you already answered this.
I can cause the messages you show when I include lowercase characters. If I convert all characters to uppercase, the errors go away.
Have you tried eliminating that as a possible explanation?
Humor me and try translating all lower case to upper. There are a number of ways to do this. One is to issue the line command UC9999 on the first record of the dataset.
THere are other ways to debug this. If you've done the above, have you turned on trace?
CONTROL LIST, SYMLIST, CONLIST


As others have pointed out, there's no problem including ISPEXEC statements as long as you have the ISPF libraries. Even with those missing, you would not get the error messages you're showing.

Good luck
Dave


-----Original Message-----
From: TSO REXX Discussion List on behalf of Steve Comstock
Sent: Wed 4/7/2010 5:41 PM
To: TSO-...@VM.MARIST.EDU

Mickey

unread,
Apr 8, 2010, 11:55:31 AM4/8/10
to
So I am still pounding away at replacing this 29 year old dynaloc assembler
code with a Rexx. I have everything working, except one portion. For one
function, they have a new file (A GDG iteration) which is allocated in the
JCL. Then COBOL writes to it, and at the end of the volume, they are to call
the REXX to get the absolute dataset name, VOLSER and device type. So I
cobbled together some code to walk the TIOT to the JFCB, and from there into
SWAREQ and got the dataset name. Now, I also know the VOLSER for that
dataset is in the UCB or OCBOB.

So, can anyone point me to eiter the method here, or some quick code to get
said VOLSER?

Thanks,

Mickey

George.William

unread,
Apr 8, 2010, 12:36:03 PM4/8/10
to
If you have the absolute name for the GDG dataset why not simply use the
LISTDSI function and its returned var for volume: sysvolume?

Thanks,

Mickey

______________________________________________________________________
CONFIDENTIALITY NOTICE: This email from the State of California is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized review or use, including disclosure or distribution, is prohibited. If you are not the intended recipient, please contact the sender and destroy all copies of this email.

Pinnacle

unread,
Apr 8, 2010, 12:41:00 PM4/8/10
to

Bill, Mickey,

I think that the dataset needs to be cataloged for LISTDSI to work, but it's
worth a shot. I'm surprised that the VOLSER or a UCB pointer is not in the
TIOT or JFCB. Maybe it's in the DCB?

Regards,
Tom Conley

David S Speake

unread,
Apr 8, 2010, 12:55:41 PM4/8/10
to
If you are running under SMS it is cataloged at allocation time as a non-vsam and 'rolled into' the GDG base entry at step termination DISP=(,CATLG) and no ABEND. Catalog Search Interface should do the trick but I would certainly try LISTDSI first.

David.Speake

Ulrich Krueger

unread,
Apr 8, 2010, 12:56:23 PM4/8/10
to
> I'm surprised that the VOLSER or a UCB pointer is not in the
TIOT or JFCB. Maybe it's in the DCB?

AFAIK, the VOLSER is in the JFCB.
See field JFCBVOLS and associated field JFCBNVOL for details. You get the
first five volumes that the dataset is on.
See the Data Areas manual
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/mvs10da4/120.1.1?
SHELF=EZ2ZBK0G.bks&DT=20081112100131

Regards,
Ulrich Krueger

Mickey

unread,
Apr 8, 2010, 3:25:31 PM4/8/10
to
I of course first tried LISTDSI with the FILE and PREALLOC options. This
failed, as did a LISTCAT ENTRIES VOLUME or ALL.

Mickey

--------------------------------------------------
From: "David S Speake" <David....@BCBSSC.COM>
Sent: Thursday, April 08, 2010 12:55 PM
To: <TSO-...@VM.MARIST.EDU>
Subject: Re: [TSO-REXX] Oh, the misery

Mickey

unread,
Apr 8, 2010, 3:27:50 PM4/8/10
to
Oh, I know where it is, it is in the UCB. At offset 17 into the TIOT entry
is the 3 byte address of the UCB common segment (UCBOB). So if you go
forward 5 bytes from the JFCB, you'll have the 3 byte UCB pointer. (This is
a real address, so you don't need SWAREQ.) At decimal offset 28 into the
UCBOB is the 6 byte current volser, in character format. This much I know...
how to code it in rexx, not so much. I have not worked much with pointers or
the storage function in rexx.

Mickey


--------------------------------------------------
From: "Ulrich Krueger" <uk...@PACBELL.NET>


Sent: Thursday, April 08, 2010 12:55 PM
To: <TSO-...@VM.MARIST.EDU>
Subject: Re: [TSO-REXX] Oh, the misery

>> I'm surprised that the VOLSER or a UCB pointer is not in the

Itschak Mugzach

unread,
Apr 8, 2010, 3:38:26 PM4/8/10
to
If so, how doies the old ASM program returns the volume? Does it use
CAMLIST?, RDJFCB?

ITschak

Rick Woods

unread,
Apr 8, 2010, 3:52:25 PM4/8/10
to
Fails how?
- Rick

>>> Mickey <mic...@COMCAST.NET> 4/8/2010 12:25 PM >>>

Pinnacle

unread,
Apr 8, 2010, 5:31:59 PM4/8/10
to
----- Original Message -----
From: "Mickey" <mic...@COMCAST.NET>
Newsgroups: bit.listserv.tsorexx
Sent: Thursday, April 08, 2010 3:27 PM
Subject: Re: Oh, the misery

> Oh, I know where it is, it is in the UCB. At offset 17 into the TIOT entry
> is the 3 byte address of the UCB common segment (UCBOB). So if you go
> forward 5 bytes from the JFCB, you'll have the 3 byte UCB pointer. (This
> is
> a real address, so you don't need SWAREQ.) At decimal offset 28 into the
> UCBOB is the 6 byte current volser, in character format. This much I
> know...
> how to code it in rexx, not so much. I have not worked much with pointers
> or
> the storage function in rexx.
>
> Mickey
>

Mickey,

Here's one of Rob Zenuk's golden pieces of Rexx:

/* ------------------- REXX --------------------- *
* code to display job information from: *
* Robert Zenuk *
* ---------------------------------------------- */
tcb = storage(21c,4)
tiot = storage(d2x(c2d(tcb)+12),4)
jscb = storage(d2x(c2d(tcb)+180),4)
ssib = storage(d2x(c2d(jscb)+316),4)
jobname = strip(storage(d2x(c2d(tiot)),8))
jobtype = storage(d2x(c2d(ssib)+12),3)
jobnum = strip(storage(d2x(c2d(ssib)+15),5),l,0)
stepname = strip(storage(d2x(c2d(tiot)+8),8),l,0)
procstep = strip(storage(d2x(c2d(tiot)+16),8),l,0)
say "Jobname:" jobname"("jobtype""jobnum")"
say "Step/Procstep:" stepname procstep
exit

If you take the time to break it down, it will make sense.

Regards,
Tom Conley

Mickey

unread,
Apr 8, 2010, 6:21:09 PM4/8/10
to
CAMLIST and the BLCK macros.

--------------------------------------------------
From: "Itschak Mugzach" <imug...@GMAIL.COM>
Sent: Thursday, April 08, 2010 3:37 PM

Mickey

unread,
Apr 8, 2010, 6:22:19 PM4/8/10
to
RC = 16, Reason code 2

--------------------------------------------------
From: "Rick Woods" <Rick....@AZDOA.GOV>
Sent: Thursday, April 08, 2010 3:51 PM

Mickey

unread,
Apr 8, 2010, 6:23:31 PM4/8/10
to
That piece of code I have...not helping me wit the offsets and conversions
into the UCB for the VOLSER though

--------------------------------------------------
From: "Pinnacle" <pinn...@ROCHESTER.RR.COM>
Sent: Thursday, April 08, 2010 5:31 PM


To: <TSO-...@VM.MARIST.EDU>
Subject: Re: [TSO-REXX] Oh, the misery

> ----- Original Message -----

Robert Zenuk

unread,
Apr 8, 2010, 8:35:49 PM4/8/10
to
Try this...

/* rexx */
tcb = ptr(540)
tiot = ptr(tcb+12)
ucb = ptr24(tiot+41)
ucbvol = stg(ucb+28,6)
say ucbvol
exit 0
ptr24: return c2d(storage(d2x(arg(1)),3))
ptr: return c2d(storage(d2x(arg(1)),4))
stg: return storage(d2x(arg(1)),arg(2))

Rob

In a message dated 4/8/2010 3:23:28 P.M. US Mountain Standard Time,

Itschak Mugzach

unread,
Apr 9, 2010, 4:04:09 AM4/9/10
to
OK. If you use camlist the dataset is already cataloged. From the return
code (DAIR) it look like you used a GDG name that is not supported by TSO. I
think you have to convert the name into real name and not using the
generation (0).

ITschak

adrianstern

unread,
Apr 9, 2010, 4:08:07 AM4/9/10
to
> send email to LISTS...@VM.MARIST.EDU with the message: INFO TSO-REXX- Hide quoted text -
>
> - Show quoted text -

I could have sworn I replied to this yesterday!

1 Any command found not belonging to Exec2 is treated as a Rexx
command - which then usually fails. This happens all the time these
days.
2 Your error is a string of excessive length - was it really more than
250 chars?
3 Try the exceedingly tedious Exec2 debug by setting the control
options - I think you'll eventually see what happens

Mickey

unread,
Apr 9, 2010, 7:45:37 AM4/9/10
to
Thanks Rob.... now comes the question that just keeps nagging at me. How do
I tie this to the DDNAME I am looking for. My code is currently taking the
DDNAME, talking the TIOT into the JFCB to pick up the DDANMES, I compare it
to the one I want, and when I have a match, I head off to the SWAREQ to pick
p the actual dataset name. At which point would I bolt this code in to get
the VOLSER for that specific DDNAME.

Mickey

--------------------------------------------------
From: "Robert Zenuk" <Robz...@AOL.COM>
Sent: Thursday, April 08, 2010 8:35 PM

Mickey

unread,
Apr 9, 2010, 9:07:17 AM4/9/10
to
That much I have done. I have drilling my way into the SWAREQ and picked up
the dataset name. It's just how o get from there to t his code here to pick
up the VOLSER that I am unsure about

--------------------------------------------------
From: "Itschak Mugzach" <imug...@GMAIL.COM>

Sent: Friday, April 09, 2010 4:03 AM

Bob Bridges

unread,
Apr 11, 2010, 8:35:14 PM4/11/10
to
I don't understand: Why use FILE if you have the DSN?

---
Bob Bridges, rhb...@attglobal.net, cell 336 382-7313

/* To be humble to superiors is duty, to equals courtesy, to inferiors
nobleness. -Poor Richard */

-----Original Message-----
From: Mickey
Sent: Thursday, April 8, 2010 15:25

I of course first tried LISTDSI with the FILE and PREALLOC options. This
failed, as did a LISTCAT ENTRIES VOLUME or ALL.

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


From: "David S Speake" <David....@BCBSSC.COM>
Sent: Thursday, April 08, 2010 12:55 PM

> If you are running under SMS it is cataloged at allocation time as a


> non-vsam and 'rolled into' the GDG base entry at step termination
> DISP=(,CATLG) and no ABEND. Catalog Search Interface should do the trick
> but I would certainly try LISTDSI first.

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

Mickey

unread,
Apr 12, 2010, 5:26:29 AM4/12/10
to
Because passing the dataset didn't work.


--------------------------------------------------
From: "Bob Bridges" <rhb...@ATTGLOBAL.NET>
Sent: Sunday, April 11, 2010 8:35 PM


To: <TSO-...@VM.MARIST.EDU>
Subject: Re: [TSO-REXX] Oh, the misery

> I don't understand: Why use FILE if you have the DSN?

Bob Bridges

unread,
Apr 12, 2010, 9:54:33 AM4/12/10
to
No, you said you FIRST tried 'file'. The FILE option is for the DD name,
not the DS name. If you just misspoke, that's fine, but I suspect what's
really happening is that I misunderstood...?

---
Bob Bridges, rhb...@attglobal.net, cell 336 382-7313

Sometimes you feel like a nut. After a day of working on a walnut farm, you
don't. -Mike Rowe of the TV show "Dirty Jobs" */

-----Original Message-----
From: Mickey
Sent: Monday, April 12, 2010 05:26

Because passing the dataset didn't work.

--------------------------------------------------
From: "Bob Bridges" <rhb...@ATTGLOBAL.NET>
Sent: Sunday, April 11, 2010 8:35 PM

> I don't understand: Why use FILE if you have the DSN?
>

Rick Woods

unread,
Apr 12, 2010, 10:21:21 AM4/12/10
to
Would you mind posting your actual code? LISTDSI is somewhat anal about syntax; you might just have the wrong combination of single- and double-quotes.
- Rick

>>> Mickey <mic...@COMCAST.NET> 4/8/2010 3:22 PM >>>

Mickey

unread,
Apr 12, 2010, 10:38:06 AM4/12/10
to
I doubt it Rick, as I have tested the code with cataloged datasets, and it
works just fine. This issue is caused by the fact that the dataset is on
tape, and not yet closed for the first time.

What I really need to know is once I drill through the TCB to the TIOT, to
the JFCB and into the SWAREQ and get the dataset name, how to I then tie
that to the code provided to get the VOLSER? I know that UCB code that was
provided will get a VOLSER< just not sure how to get the voLSER for the
DDNAME or DSN I now have.

Mickey

--------------------------------------------------
From: "Rick Woods" <Rick....@AZDOA.GOV>

Sent: Monday, April 12, 2010 10:20 AM

Mickey

unread,
Apr 12, 2010, 10:38:43 AM4/12/10
to
Neither will work, as the dataset is allocated in the same step, written to
by COBOL, and not yet closed. This is a tape file, and will not be cataloged
until MVS closes the file, so in eitehr casen DDNAME or DSN, it will get the
same RC = 16, SYSREASON = 2.

Mickey

--------------------------------------------------
From: "Bob Bridges" <rhb...@ATTGLOBAL.NET>

Sent: Monday, April 12, 2010 9:54 AM


To: <TSO-...@VM.MARIST.EDU>
Subject: Re: [TSO-REXX] Oh, the misery

> No, you said you FIRST tried 'file'. The FILE option is for the DD name,

Farley, Peter x23353

unread,
Apr 12, 2010, 10:55:50 AM4/12/10
to
Won't the initial volser(s) be in the JFCB? IIRC there is room in the
JFCB for the first five volumes, I just don't know if they are filled in
before the first close, and I can't test it here because I don't have
authority to create actual tapes.

Peter

> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-...@vm.marist.edu] On
Behalf
> Of Mickey
> Sent: Monday, April 12, 2010 10:37 AM
> To: TSO-...@vm.marist.edu
> Subject: Re: Oh, the misery
>


This message and any attachments are intended only for the use of the addressee and
may contain information that is privileged and confidential. If the reader of the
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.

Gilbert C Cardenas

unread,
Apr 12, 2010, 11:12:51 AM4/12/10
to
From a rexx rookie's perspective (and since your having so much trouble with the JFCB/UCB), might another option be to set up the tape library environment within the rexx and then query for the volser?

We use TLMS so for example, I have a rexx that performs a tape to tape copy from within a dslist, i.e. TT (tape to tape). I pass the dataset name as an argument and then query the tape management system to return the dataset attributes (TLMSCARD). I then extract the information I need from the SYSPRINT file and pass the dcb information to the iebgener that performs the copy.
You should be able to extract the volser with this method as well if the tape is cataloged in the management system.

"ALLOC FILE(SYSPRINT) DATASET('"TRAPDS"') NEW CATALOG SPA(1,1) TR",
"DSORG(PS) RECFM(F,B) LRECL(133) BLKSIZE(27930) REUSE"
"ALLOC FILE(CAIVMF) DATASET('HLQ.TLMS.VMF') SHR REUSE"
"ALLOC FILE(CAIVMFI) DATASET('HLQ.TLMS.VMF') SHR REUSE"
"ALLOC FILE(CAIVMFS) DATASET('HLQ.TLMS.VMF') SHR",
"OPTCD(C) BUFNO(10) REUSE"
"ALLOC FILE(CAIRMF) DATASET('HLQ.TLMS.RMF') SHR REUSE"
"ALLOC FILE(CAIVMFXI) DATASET('HLQ.TLMS.VMFINDEX') SHR REUSE"
"ALLOC FILE(BKUP) DATASET('HLQ.TLMS.ALOG') SHR REUSE"
"ALLOC FILE(SYSIN) SPACE(1,1) TRACK LRECL(80) RECFM(F,B) BLKSIZE(80)",
"REUSE"
TLMSCARD = "DN DSN="||NEWDSN
PUSH TLMSCARD
'EXECIO 1 DISKW SYSIN (FINIS'
ADDRESS TSO

Peter

This e-mail (and any attachments) may contain information that is confidential and/or protected by law. Any review, use, distribution or disclosure to anyone other than the intended recipient(s) is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and delete all copies of this message.

Mickey

unread,
Apr 12, 2010, 11:21:11 AM4/12/10
to
That could be, and if so, that would make this easier for me, as I am
already in the JFCB. The question I would have then is, if JCL creates a +1
iteration of a GDG, is the VOLSER for THAT one stored in the JFCB, or the
first 5 volumes for the GDG as a whole.

--------------------------------------------------
From: "Farley, Peter x23353" <Peter....@BROADRIDGE.COM>
Sent: Monday, April 12, 2010 10:55 AM

Tony Harminc

unread,
Apr 12, 2010, 5:07:40 PM4/12/10
to
On 12 April 2010 10:36, Mickey <mic...@comcast.net> wrote:

> What I really need to know is once I drill through the TCB to the TIOT, to
> the JFCB and into the SWAREQ and get the dataset name, how to I then tie
> that to the code provided to get the VOLSER? I know that UCB code that was
> provided will get a VOLSER< just not sure how to get the voLSER for the
> DDNAME or DSN I now have.

I'm still not understanding the problem. You know, let's say, the
DDNAME, and you know how to find the DDNAME entry in the TIOT. And the
TIOT's DDNAME entry points to the UCB, and you already know where the
volser is in the UCB, assuming there is one.

So what's still missing?

Tony H.

Mickey

unread,
Apr 12, 2010, 8:03:13 PM4/12/10
to
Ah, there is the rub, I am not quite sure how that pointing from the DDNAME
to the VOLSER in the UCB works. Like I said, this is unchartered ground for
me.

--------------------------------------------------
From: "Tony Harminc" <tz...@ATTGLOBAL.NET>
Sent: Monday, April 12, 2010 5:06 PM


To: <TSO-...@VM.MARIST.EDU>
Subject: Re: [TSO-REXX] Oh, the misery

> On 12 April 2010 10:36, Mickey <mic...@comcast.net> wrote:

Robert Zenuk

unread,
Apr 13, 2010, 12:36:39 AM4/13/10
to
Here is a way to walk the TIOT.

/* rexx - tiotwalk */
alphanat = _'ABCDEFGHIJKLMNOPQRSTUVWXYZ@#$_
(mailto:'ABCDEFGHIJKLMNOPQRSTUVWXYZ@#$) '
say 'DDNAME VOLSER'
say '-------- ------'
tcb = ptr31(540)
tiot = ptr31(tcb+12)
tiot = tiot+24
do while ddlen <> 0
ddlen = c2d(stg(tiot,1))
dd = stg(tiot+4,8)
ucb = ptr24(tiot+17)
vol = stg(ucb+28,6)
select
when verify(left(dd,1),alphanat) > 0 then nop
when left(vol,1) = '"' then
do
vol = 'SYSOUT'
say dd vol
end
otherwise say dd vol
end
tiot = tiot+ddlen
end
exit
ptr24: return c2d(storage(d2x(arg(1)),3))
ptr31: return c2d(storage(d2x(arg(1)),4))
stg: return storage(d2x(arg(1)),arg(2))

I was not successful incorporating Gilbert Saint-flour's SWAREQ exec for
the DSN... Had to go back to some real work...

Hope This Helps,

Rob


In a message dated 4/12/2010 2:07:26 P.M. US Mountain Standard Time,

Grant Ward Able

unread,
Apr 13, 2010, 8:08:42 AM4/13/10
to
Hello fellow REXXers,

can a STEM variable be specified as a variable itself? Any suggestions of
doing this better?

e.g.

xstem = 'xx'||ii
ADDRESS TSO "EXECIO * DISKR "tmpfile" (STEM "xstem" FINIS)"
do jj = 1 to xstem||0
.
.
.
.

I have a list (of variable length) of parameters to be processed. Each of
these will produce some output that I need to handle - after having
processed all of the parameters. And to add an extra quirk to it, they all
need to be separate, which is why I was hoping to do (something like) this
with the stems.

All help/advice/tips gladly received!

--
Regards - Grant
=====================================
Note: Any opinion expressed is my own

No trees were killed in the sending of this message, but a large number of
electrons were severely disturbed.


“The views I have expressed on this website/service are my own personal
views, and are not endorsed or supported by, and do not necessarily
express or reflect, the views, positions or strategies of my employer.”

<BR>_____________________________________________________________
<FONT size=2><BR>
DTCC DISCLAIMER: This email and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email
in error, please notify us immediately and delete the email and any
attachments from your system. The recipient should check this email
and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted
by this email.</FONT>

Hardee, Charles H

unread,
Apr 13, 2010, 8:14:15 AM4/13/10
to
Hi Grant,

What's wrong with simply:

ADDRESS TSO "EXECIO * DISKR "tmpfile" (STEM xx. FINIS)"
do jj = 1 to xx.0
.
.
.
.

The EXECIO will read tmpfile into xx.1 thru xx.n and then put n into xx.0
Then process each xx.jj as you need to.

Chuck

Walter Pachl

unread,
Apr 13, 2010, 8:15:06 AM4/13/10
to
would this help
s='WALTER'
'EXECIO * DISKR IN (STEM 's'. FINIS'
Do i=1 To walter.0
say walter.i
End

---- Grant Ward Able <GWar...@DTCC.COM> schrieb:

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

Mickey

unread,
Apr 13, 2010, 8:17:22 AM4/13/10
to
Thank you sir, THIS was what I was looking for.

Mickey

--------------------------------------------------
From: "Robert Zenuk" <Robz...@AOL.COM>

Sent: Monday, April 12, 2010 10:30 PM


To: <TSO-...@VM.MARIST.EDU>
Subject: Re: [TSO-REXX] Oh, the misery

> Here is a way to walk the TIOT.

Bob Stark

unread,
Apr 13, 2010, 8:17:50 AM4/13/10
to
The value() function is your friend here.

Assuming xstem ends with a ".":

Do jj = 1 to value('xstem'0)
Say xstem''jj '=' value('xstem'jj)
End jj


Regards,

Bob Stark

ProTech - When you're serious about Systems Management
Consulting, Software, and Training for z/OS, UNIX and Internet
www.protechtraining.com 800-373-9188 x151 Cell: 412-445-8072

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

Hello fellow REXXers,

e.g.

All help/advice/tips gladly received!

--
If this email is spam, report it here:
http://www.onlymyemail.com/view/?action=reportSpam&Id=Mzg3MzE6MTA3MzE3MDI0Mzpic3RhcmtAcHJvdGVjaHB0cy5jb206ZGVsaXZlcmVk

David S Speake

unread,
Apr 13, 2010, 4:42:58 PM4/13/10
to
Mickey,

I may have missed it, but why not get the VOLSERS out of the JFCB?

(75) BITSTRING 1 JFCBNVOL - NUMBER OF VOLUME
SERIAL NUMBERS
(76) CHARACTER 30 JFCBVOLS - THE FIRST FIVE
(0) VOLUME SERIAL NUMBERS
(76) CHARACTER 22 - FIRST 22 BYTES OF
JFCBVOLS
(8C) CHARACTER 8 JFCMSVGP - ** RESERVED-O **
(MDC306)
(94) BITSTRING 1 JFCBEXTL - LENGTH OF BLOCK OF
EXTRA VOLUME SERIAL
NUMBERS (BEYOND FIVE)
(95) CHARACTER 3 JFCBEXAD - SYSTEM VIRTUAL
ADDRESS (SVA) OF
FIRST JFCB EXTENSION
BLOCK JFCBX
(IEFJFCBX) - contains
additional vols

David Speake

Bob Bridges

unread,
Apr 13, 2010, 4:47:40 PM4/13/10
to
Grant, I think you're saying that the loop below needs to be inside a larger
loop that contains a list of stem names (among other things); if I'm reading
you right, I might write it something like this:

do ii=1 to parmlist.0
'ALLOC DDN(TMPFILE) DSN('parmlist.ii') SHR'
'EXECIO * DISKR TMPFILE (STEM XX'ii'.' 'FINIS'
'FREE DDN(TMPFILE)'
do jj=1 to value('XX'ii'.0')
/* do stuff with */ value('XX'ii'.'jj)
end
end

But that's only if for some reason you need to keep all the XXn parms even
after the jj loop above. If the jj loop is the only place you're processing
those variables, you don't need a variable stem at all:

do ii=1 to parmlist.0
'ALLOC DDN(TMPFILE) DSN('parmlist.ii') SHR'
'EXECIO * DISKR TMPFILE (STEM XX. FINIS'
'FREE DDN(TMPFILE)'
do jj=1 to xx.0
/* do stuff with */ xx.jj
end
end

---
Bob Bridges, rhb...@attglobal.net, cell 336 382-7313

/* Law #6 of combat operations: If it's stupid but it works, it isn't
stupid. */

-----Original Message-----
From: Grant Ward Able
Sent: Tuesday, April 13, 2010 08:08

can a STEM variable be specified as a variable itself? Any suggestions of
doing this better? e.g.:

xstem = 'xx'||ii
ADDRESS TSO "EXECIO * DISKR "tmpfile" (STEM "xstem" FINIS)"
do jj = 1 to xstem||0
...

I have a list (of variable length) of parameters to be processed. Each of


these will produce some output that I need to handle - after having
processed all of the parameters. And to add an extra quirk to it, they all
need to be separate, which is why I was hoping to do (something like) this
with the stems.

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

Tony Harminc

unread,
Apr 13, 2010, 9:32:41 PM4/13/10
to

That's good, but it really should check the TIOT for freed entries.
That could be something like (right after the "ddlen ="):

stta = stg(tiot+1,1)
If bitand(stta,'80'x) <> '00'x then /* TIOSLTYP */
Do
tiot = tiot+ddlen
Iterate
end

Well, not tested... There's also the question of concatenations, which
will each have their own UCB and volser. Or not, if you concatenate,
say, a DD * with a DSN= .

Hardee, Charles H

unread,
Apr 14, 2010, 2:06:05 AM4/14/10
to
But using the VALUE() and quoted names is just introducing unneeded
complexity.

I posted this earlier but I don't know if it made it to the list or not
as I don't get an echo of my email.


ADDRESS TSO "EXECIO * DISKR "tmpfile" (STEM xx. FINIS)"
do jj = 1 to xx.0
say xx.jj
end

The EXECIO will read tmpfile into the stem 'xx.' positions 1 thru n and


then put n into xx.0

Once in the stem, process each xx.jj as you need to.

Chuck


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

Of Bob Bridges
Sent: Tuesday, April 13, 2010 2:19 PM
To: TSO-...@VM.MARIST.EDU

Subject: Re: [TSO-REXX] STEM question

I agree with the VALUE function, Bob, but I don't follow this example.
I
suspect a typo on your part, but it may be I'm just missing something.
Let's pretend that the variable xstem contains the value "BOB."; the
code
below is thus the equivalent of:

do jj=1 to value('xstem0') /* here's where I figure you mistook */
say 'BOB.'jj '=' value('xstem'jj)
end jj

I think you want something more like this:

do jj=1 to value(xstem'0')
say xstem'0 =' value(xstem||jj)
end

---
Bob Bridges, rhb...@attglobal.net, cell 336 382-7313

/* To be humble to superiors is duty, to equals courtesy, to inferiors
nobleness. -Poor Richard */

-----Original Message-----
From: Bob Stark
Sent: Tuesday, April 13, 2010 08:17

The value() function is your friend here.

Assuming xstem ends with a ".":

Do jj = 1 to value('xstem'0)
Say xstem''jj '=' value('xstem'jj)
End jj

-----Original Message-----
From: Grant Ward Able
Sent: Tuesday, April 13, 2010 08:08

can a STEM variable be specified as a variable itself? Any suggestions
of
doing this better?

xstem = 'xx'||ii


ADDRESS TSO "EXECIO * DISKR "tmpfile" (STEM "xstem" FINIS)"
do jj = 1 to xstem||0

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

Bob Stark

unread,
Apr 14, 2010, 12:55:56 PM4/14/10
to
It is always dangerous to post code that has not yet executed.
Bob, you fixed my Typo.

Regards,

Bob Stark

ProTech - When you're serious about Systems Management
Consulting, Software, and Training for z/OS, UNIX and Internet
www.protechtraining.com 800-373-9188 x151 Cell: 412-445-8072

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Bob Bridges
Sent: Tuesday, April 13, 2010 15:19
To: TSO-...@VM.MARIST.EDU
Subject: Re: STEM question

I agree with the VALUE function, Bob, but I don't follow this example. I suspect a typo on your part, but it may be I'm just missing something.
Let's pretend that the variable xstem contains the value "BOB."; the code below is thus the equivalent of:

do jj=1 to value('xstem0') /* here's where I figure you mistook */
say 'BOB.'jj '=' value('xstem'jj)
end jj

I think you want something more like this:

do jj=1 to value(xstem'0')
say xstem'0 =' value(xstem||jj)
end

---
Bob Bridges, rhb...@attglobal.net, cell 336 382-7313

/* To be humble to superiors is duty, to equals courtesy, to inferiors nobleness. -Poor Richard */

-----Original Message-----
From: Bob Stark

Sent: Tuesday, April 13, 2010 08:17

The value() function is your friend here.

Assuming xstem ends with a ".":

Do jj = 1 to value('xstem'0)
Say xstem''jj '=' value('xstem'jj)
End jj

-----Original Message-----
From: Grant Ward Able
Sent: Tuesday, April 13, 2010 08:08

can a STEM variable be specified as a variable itself? Any suggestions of doing this better?

xstem = 'xx'||ii


ADDRESS TSO "EXECIO * DISKR "tmpfile" (STEM "xstem" FINIS)"
do jj = 1 to xstem||0

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


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

--


If this email is spam, report it here:

http://www.onlymyemail.com/view/?action=reportSpam&Id=Mzg3MzE6MTA3MzUzOTk2Mjpic3RhcmtAcHJvdGVjaHB0cy5jb206ZGVsaXZlcmVk

Bob Stark

unread,
Apr 14, 2010, 7:03:14 PM4/14/10
to
Yes, having variable stem names is generally unnecessary in open code.

Where I use it is in generic functions, which you can call and ask for a certain piece of information to be returned into a stem variable of the caller's choosing. For example, the following, which returns you the member list of a PDS:

rc = IOMEMLST("DSNAME(SYS1.PARMLIB) STEM(member.) MASK(MPF*)")

The caller can pass anything they like for the STEM() parameter, so the function internally cannot have a hard-coded stem.

Another one in my collection that MUST use this technique is stemCopy (copies one arbitrary stem to another):

Call stemCopy 'a.', 'b.'

Your earlier post did make it onto the list.

Regards,

Bob Stark

ProTech - When you're serious about Systems Management
Consulting, Software, and Training for z/OS, UNIX and Internet
www.protechtraining.com 800-373-9188 x151 Cell: 412-445-8072

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Hardee, Charles H
Sent: Tuesday, April 13, 2010 17:01
To: TSO-...@VM.MARIST.EDU
Subject: Re: STEM question

Chuck

--


If this email is spam, report it here:

http://www.onlymyemail.com/view/?action=reportSpam&Id=Mzg3MzE6MTA3Mzc2Njk0Njpic3RhcmtAcHJvdGVjaHB0cy5jb206ZGVsaXZlcmVk

Grant Ward Able

unread,
Apr 14, 2010, 7:36:00 PM4/14/10
to
Thanks to all who have responded and given me food for thought. Once
priorities allow, I will get back to working on this...

--
Regards - Grant
=====================================
Note: Any opinion expressed is my own

No trees were killed in the sending of this message, but a large number of
electrons were severely disturbed.


“The views I have expressed on this website/service are my own personal
views, and are not endorsed or supported by, and do not necessarily

express or reflect, the views, positions or strategies of my employer.”

"Hardee, Charles H" <Charles...@CA.COM>
Sent by: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>
04/13/2010 10:01 PM
Please respond to
TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>


To
TSO-...@VM.MARIST.EDU
cc

Chuck

<BR>_____________________________________________________________

Paul Gilmartin

unread,
Apr 15, 2010, 3:23:03 AM4/15/10
to
On Apr 12, 2010, at 08:36, Mickey wrote:

> I doubt it Rick, as I have tested the code with cataloged datasets, and it
> works just fine. This issue is caused by the fact that the dataset is on
> tape, and not yet closed for the first time.
>
> What I really need to know is once I drill through the TCB to the TIOT, to
> the JFCB and into the SWAREQ and get the dataset name, how to I then tie
> that to the code provided to get the VOLSER? I know that UCB code that was
> provided will get a VOLSER< just not sure how to get the voLSER for the
> DDNAME or DSN I now have.
>

DYNALLOC's support of tape is generally miserable. Once,
needing to read a few dozen data sets, one of which was
catalogued, I opened the first and fetched the volser from
the TIOT.

o DYNALLOC won't allow me to allocate the second while the
first remained allocated. JCL imposes no such restriction.

o If I FREE the first, then ALLOCATE the second, etc., the
volume is unloaded at each FREE, reloaded. DYNALLOC has
no RETAIN option.

I gave up and preallocated all the data sets in JCL before
processing them with Rexx. Ouch.

-- gil

Walter Pachl

unread,
Apr 15, 2010, 9:46:00 AM4/15/10
to
No it won't
xx.1. is NOT a stem!!!
Walter

---- Bob Bridges <rhb...@ATTGLOBAL.NET> schrieb:
> I read your earlier post, Chuck, and I agree, except for one thing: Grant
> is apparently running this loop inside an outer loop that for each EXECIO a)
> allocates a dataset and b) sets a different stem to hold the input. His
> logic processes each set of input as soon as he gets it, but retains all the
> input even after processing it. If his logic needs to look at each set of
> input again, then just putting it in xx each time isn't enough. In that
> case (only), VALUE might be useful.
>
> Actually, even then he can probably do without it. Let's see:
>
> do ii=1 to dsnlist.0
> 'ALLOC DDN('tmpfile') DSN('dsnlist.ii') SHR'
> 'EXECIO * DISKR' tmpfile '(STEM XX.'ii'. FINIS'
> 'FREE DDN('tmpfile')
> do jj=1 to xx.ii.0
> /* do things to */ xx.ii.jj
> end
> end
>
> Yeah, that'll work, won't it? I think so. So no need for VALUE even if he
> needs to keep around all the input afterward.


>
> ---
> Bob Bridges, rhb...@attglobal.net, cell 336 382-7313
>

> /* Democracy is where you can say what you think even if you don't think. */


>
> -----Original Message-----
> From: Hardee, Charles H
> Sent: Tuesday, April 13, 2010 17:01
>
> But using the VALUE() and quoted names is just introducing unneeded
> complexity. I posted this earlier but I don't know if it made it to the
> list or not as I don't get an echo of my email.
>
> ADDRESS TSO "EXECIO * DISKR "tmpfile" (STEM xx. FINIS)"
> do jj = 1 to xx.0
> say xx.jj
> end
>
> The EXECIO will read tmpfile into the stem 'xx.' positions 1 thru n and

> then put n into xx.0. Once in the stem, process each xx.jj as you need to.


>
> -----Original Message-----
> From: Bob Bridges
> Sent: Tuesday, April 13, 2010 2:19 PM
>

> I agree with the VALUE function, Bob, but I don't follow this example.
> I suspect a typo on your part, but it may be I'm just missing something.
> Let's pretend that the variable xstem contains the value "BOB."; the
> code below is thus the equivalent of:
>
> do jj=1 to value('xstem0') /* here's where I figure you mistook */
> say 'BOB.'jj '=' value('xstem'jj)
> end jj
>
> I think you want something more like this:
>
> do jj=1 to value(xstem'0')
> say xstem'0 =' value(xstem||jj)
> end
>

> -----Original Message-----
> From: Bob Stark
> Sent: Tuesday, April 13, 2010 08:17
>
> The value() function is your friend here.
>
> Assuming xstem ends with a ".":
>
> Do jj = 1 to value('xstem'0)
> Say xstem''jj '=' value('xstem'jj)
> End jj
>
> -----Original Message-----
> From: Grant Ward Able
> Sent: Tuesday, April 13, 2010 08:08
>
> can a STEM variable be specified as a variable itself? Any suggestions
> of doing this better?
>
> xstem = 'xx'||ii
> ADDRESS TSO "EXECIO * DISKR "tmpfile" (STEM "xstem" FINIS)"
> do jj = 1 to xstem||0
>

Walter Pachl

unread,
Apr 15, 2010, 2:14:30 PM4/15/10
to
I stand corrected!! (Thanks Bob)

xx.1. is not a stem but EXECIO works with it anyway (tested)

Walter


----- Original Message -----
From: "Walter Pachl" <christel....@CHELLO.AT>
To: <TSO-...@VM.MARIST.EDU>
Sent: Thursday, April 15, 2010 12:10 PM
Subject: Re: [TSO-REXX] STEM question

jerome

unread,
Apr 15, 2010, 5:19:11 PM4/15/10
to
It will ! even if xx.l. is not a stem. Because in execio, the thing
following keyword STEM hasn't to be a stem. EXECIO simply put number in
sequence just after this thing for evereline read and, at the end, put
the number of line in "thing"0.

Bob Bridges

unread,
Apr 15, 2010, 11:39:27 PM4/15/10
to
I read your earlier post, Chuck, and I agree, except for one thing: Grant
is apparently running this loop inside an outer loop that for each EXECIO a)
allocates a dataset and b) sets a different stem to hold the input. His
logic processes each set of input as soon as he gets it, but retains all the
input even after processing it. If his logic needs to look at each set of
input again, then just putting it in xx each time isn't enough. In that
case (only), VALUE might be useful.

Actually, even then he can probably do without it. Let's see:

do ii=1 to dsnlist.0
'ALLOC DDN('tmpfile') DSN('dsnlist.ii') SHR'
'EXECIO * DISKR' tmpfile '(STEM XX.'ii'. FINIS'
'FREE DDN('tmpfile')
do jj=1 to xx.ii.0
/* do things to */ xx.ii.jj
end
end

Yeah, that'll work, won't it? I think so. So no need for VALUE even if he
needs to keep around all the input afterward.

---

/* Democracy is where you can say what you think even if you don't think. */

-----Original Message-----
From: Hardee, Charles H

Sent: Tuesday, April 13, 2010 17:01

But using the VALUE() and quoted names is just introducing unneeded
complexity. I posted this earlier but I don't know if it made it to the
list or not as I don't get an echo of my email.

ADDRESS TSO "EXECIO * DISKR "tmpfile" (STEM xx. FINIS)"
do jj = 1 to xx.0
say xx.jj
end

The EXECIO will read tmpfile into the stem 'xx.' positions 1 thru n and

then put n into xx.0. Once in the stem, process each xx.jj as you need to.

-----Original Message-----
From: Bob Bridges
Sent: Tuesday, April 13, 2010 2:19 PM

I agree with the VALUE function, Bob, but I don't follow this example.
I suspect a typo on your part, but it may be I'm just missing something.
Let's pretend that the variable xstem contains the value "BOB."; the
code below is thus the equivalent of:

do jj=1 to value('xstem0') /* here's where I figure you mistook */
say 'BOB.'jj '=' value('xstem'jj)
end jj

I think you want something more like this:

do jj=1 to value(xstem'0')
say xstem'0 =' value(xstem||jj)
end

-----Original Message-----

Bob Bridges

unread,
Apr 16, 2010, 1:03:15 AM4/16/10
to
I agree with the VALUE function, Bob, but I don't follow this example. I
suspect a typo on your part, but it may be I'm just missing something.
Let's pretend that the variable xstem contains the value "BOB."; the code
below is thus the equivalent of:

do jj=1 to value('xstem0') /* here's where I figure you mistook */
say 'BOB.'jj '=' value('xstem'jj)
end jj

I think you want something more like this:

do jj=1 to value(xstem'0')
say xstem'0 =' value(xstem||jj)
end

---

/* To be humble to superiors is duty, to equals courtesy, to inferiors
nobleness. -Poor Richard */

-----Original Message-----
From: Bob Stark
Sent: Tuesday, April 13, 2010 08:17

The value() function is your friend here.

Assuming xstem ends with a ".":

Do jj = 1 to value('xstem'0)
Say xstem''jj '=' value('xstem'jj)
End jj

-----Original Message-----
From: Grant Ward Able
Sent: Tuesday, April 13, 2010 08:08

can a STEM variable be specified as a variable itself? Any suggestions of
doing this better?

xstem = 'xx'||ii


ADDRESS TSO "EXECIO * DISKR "tmpfile" (STEM "xstem" FINIS)"
do jj = 1 to xstem||0

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

Bob Bridges

unread,
Apr 16, 2010, 4:37:31 PM4/16/10
to
In a private conversation I told Walter that it definitely will -- that "I
do it all the time". Granted that "all the time" is an exaggeration (the
need doesn't come up very often), I know I've done it.

...But do I? I'm not uncertain that I've used it, but when I try to
remember a SPECIFIC program in which I did it I can't think of any. I'm not
where I can test it on a real MVS box, so I'd appreciate confirmation.

---
Bob Bridges, rhb...@attglobal.net, cell 336 382-7313

/* Democracy is where you can say what you think even if you don't think. */

-----Original Message-----
From: Hardee, Charles H

Sent: Thursday, April 15, 2010 11:58

Walter is correct, it is a compound symbol....The question (for which I
don't have an answer) is whether or not EXECIO will accept a compound symbol
in the STEM parameter. I can't say that I've ever tried it. Anybody out
there know whether this can be done?

-----Original Message-----
From: Walter Pachl
Sent: Thursday, April 15, 2010 5:10 AM

No it won't
xx.1. is NOT a stem!!!

---


> Actually, even then he can probably do without it. Let's see:
>
> do ii=1 to dsnlist.0
> 'ALLOC DDN('tmpfile') DSN('dsnlist.ii') SHR'
> 'EXECIO * DISKR' tmpfile '(STEM XX.'ii'. FINIS'
> 'FREE DDN('tmpfile')
> do jj=1 to xx.ii.0
> /* do things to */ xx.ii.jj
> end
> end

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

Mickey

unread,
Apr 16, 2010, 5:42:54 PM4/16/10
to
For data incoming via EXECIO, this works fine. However, if you have stems
that you need to build manually, and update the counters manually, and you
have several going at once (I faced this exact issue writing a dupe check
process for Changeman), I found it simpler to just use INTERPRET. Yes, I
know everyone hates it, but there are times when it just makes more sense.

Mickey

--------------------------------------------------
From: "Bob Bridges" <rhb...@ATTGLOBAL.NET>
Sent: Tuesday, April 13, 2010 3:19 PM
To: <TSO-...@VM.MARIST.EDU>


Subject: Re: [TSO-REXX] STEM question

> I agree with the VALUE function, Bob, but I don't follow this example. I

Hardee, Charles H

unread,
Apr 17, 2010, 5:56:06 AM4/17/10
to
Walter is correct, it is a compound symbol::

From z/OS V1R8.0 TSO/E REXX Reference (ikj4a370.pdf)

<quote>
A compound symbol permits the substitution of variables within its name when you refer to it. A compound symbol contains at least one period and at least two other characters. It cannot start with a digit or a period, and if there is only one period in the compound symbol, it cannot be the last character.

The name begins with a stem (that part of the symbol up to and including the first period). This is followed by a tail, parts of the name (delimited by periods) that are constant symbols, simple symbols, or null. The derived name of a compound symbol is the stem of the symbol, in uppercase, followed by the tail, in which all simple symbols have been replaced with their values. A tail itself can be comprised of the characters A–Z, a–z, 0–9, and @ # $ ¢ . ! ? and underscore. The value of a tail can be any character string, including the null string and strings containing blanks. For example:

taila=’* (’
tailb=’’
stem.taila=99
stem.tailb=stem.taila
say stem.tailb /* Displays: 99 */
/* But the following instruction would cause an error */
/* say stem.* ( */

You cannot use constant symbols with embedded signs (for example, 12.3E+5) after a stem; in this case, the whole symbol would not be a valid symbol.

These are compound symbols:

FRED.3
Array.I.J
AMESSY..One.2.

Before the symbol is used (that is, at the time of reference), the language processor substitutes the values of any simple symbols in the tail (I, J, and One in the examples), thus generating a new, derived name. This derived name is then used just like a simple symbol. That is, its value is by default the derived name, or (if it has been used as the target of an assignment) its value is the value of the variable named by the derived name.

The substitution into the symbol that takes place permits arbitrary indexing (subscripting) of collections of variables that have a common stem. Note that the values substituted can contain any characters (including periods and blanks). Substitution is done only one time.

To summarize: the derived name of a compound variable that is referred to by the symbol

s0.s1.s2. --- .sn

is given by
d0.v1.v2. --- .vn

where d0 is the uppercase form of the symbol s0, and v1 to vn are the values of the constant or simple symbols s1 through sn. Any of the symbols s1-sn can be null. The values v1-vn can also be null and can contain any characters (in particular, lowercase characters are not translated to uppercase, blanks are not removed, and periods have no special significance).

Some examples follow in the form of a small extract from a REXX program:

a=3 /* assigns ’3’ to the variable A */
z=4 /* ’4’ to Z */
c=’Fred’ /* ’Fred’ to C */
a.z=’Fred’ /* ’Fred’ to A.4 */
a.fred=5 /* ’5’ to A.FRED */
a.c=’Bill’ /* ’Bill’ to A.Fred */
c.c=a.fred /* ’5’ to C.Fred */
y.a.z=’Annie’ /* ’Annie’ to Y.3.4 */
say a z c a.a a.z a.c c.a a.fred y.a.4
/* displays the string: */
/* "3 4 Fred A.3 Fred Bill C.3 5 Annie" */

You can use compound symbols to set up arrays and lists of variables in which the subscript is not necessarily numeric, thus offering great scope for the creative programmer. A useful application is to set up an array in which the subscripts are taken from the value of one or more variables, effecting a form of associative memory (content addressable).

Implementation maximum: The length of a variable name, before and after substitution, cannot exceed 250 characters.
<\quote>

Following the section on compound symbols, the manual covers the subject of STEM variables in a separate section. The first statement in that section is:

<quote>
A stem is a symbol that contains just one period, which is the last character. It cannot start with a digit or a period.
<\quote>

The question (for which I don't have an answer) is whether or not EXECIO will accept a compound symbol in the STEM parameter.
I can't say that I've ever tried it. Anybody out there know whether this can be done?

Chuck

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Walter Pachl
Sent: Thursday, April 15, 2010 5:10 AM

To: TSO-...@VM.MARIST.EDU
Subject: Re: [TSO-REXX] STEM question

No it won't
xx.1. is NOT a stem!!!
Walter

> Actually, even then he can probably do without it. Let's see:

Paul Gilmartin

unread,
Apr 17, 2010, 6:26:06 PM4/17/10
to
On Apr 15, 2010, at 15:19, jerome wrote:

> It will ! even if xx.l. is not a stem. Because in execio, the thing
> following keyword STEM hasn't to be a stem. EXECIO simply put number in
> sequence just after this thing for evereline read and, at the end, put
> the number of line in "thing"0.
>

And, always important when you get into things such as this,
does EXECIO use the symbolic or direct interface to variables
in storage?

-- gil

Paul Gilmartin

unread,
Apr 18, 2010, 1:22:52 AM4/18/10
to
On Apr 16, 2010, at 15:20, Mickey wrote:

> For data incoming via EXECIO, this works fine. However, if you have stems
> that you need to build manually, and update the counters manually, and you
> have several going at once (I faced this exact issue writing a dupe check
> process for Changeman), I found it simpler to just use INTERPRET. Yes, I
> know everyone hates it, but there are times when it just makes more sense.
>

I'm mystified? Why? Can you supply an example? Is this related
to the fact that expressions can't be used in compound tails?

-- gil

Walter Pachl

unread,
Apr 18, 2010, 5:32:58 AM4/18/10
to
I tested this (on z/OS)
Did you see that append? It never came back to me...

I stand corrected!! (Thanks Bob)

xx.1. is not a stem but EXECIO works with it anyway (tested)

Walter

----- Original Message -----
From: "Bob Bridges" <rhb...@ATTGLOBAL.NET>
To: <TSO-...@VM.MARIST.EDU>
Sent: Friday, April 16, 2010 10:12 PM
Subject: Re: [TSO-REXX] STEM question

Mickey

unread,
Apr 19, 2010, 10:06:44 PM4/19/10
to
Exactly ;)

--------------------------------------------------
From: "Paul Gilmartin" <PaulGB...@AIM.COM>
Sent: Saturday, April 17, 2010 10:43 AM


To: <TSO-...@VM.MARIST.EDU>
Subject: Re: [TSO-REXX] STEM question

> On Apr 16, 2010, at 15:20, Mickey wrote:

Paul Gilmartin

unread,
Apr 20, 2010, 11:59:32 AM4/20/10
to
On Apr 19, 2010, at 16:36, Mickey wrote:

> Exactly ;)
>
> --------------------------------------------------
> From: "Paul Gilmartin"

> Sent: Saturday, April 17, 2010 10:43 AM
>>
>>>

>>> process for Changeman), I found it simpler to just use INTERPRET. Yes, I
>>> know everyone hates it, but there are times when it just makes more
>>> sense.
>>>
>> I'm mystified? Why? Can you supply an example? Is this related
>> to the fact that expressions can't be used in compound tails?
>>

Of course with INTEPRET on must take care that the evaluated
tail doesn't result in:

o An invalid symbol, causing a syntax error

o A symbol which is re-evaluated with undesired results.

o A semicolon or a function call which can cause execution
of arbitrary code.

VALUE() is susceptible to all but the last of these. Safest
is an assignment to set the tail followed by an assignment to
the compound. In a few cases, this can be done with a single
PARSE instruction:

PARSE VALUE Whatever WITH I A.I

Rick Woods

unread,
Apr 22, 2010, 11:31:30 AM4/22/10
to
Hi Listers

I need help from wiser heads than myself. We're in the middle of a bad situation that I don't have time to describe, but what I need to do is write a quick exec that will load a module from the linklist, and allow me to look at it. I've never done this, and I'm R-ingTFM right now.
Does anyone have a quick and dirty they could share with me?
Thanks in advance
- Rick

Paul Gilmartin

unread,
Apr 22, 2010, 1:04:13 PM4/22/10
to
On Apr 22, 2010, at 09:30, Rick Woods wrote:
>
> I need help from wiser heads than myself. We're in the middle of a bad situation that I don't have time to describe, but what I need to do is write a quick exec that will load a module from the linklist, and allow me to look at it. I've never done this, and I'm R-ingTFM right now.
> Does anyone have a quick and dirty they could share with me?
>
I like Rexx. But, I think for that you want not Rexx but AMBLIST.
(But you might use Rexx to filter and reformat the AMBLIST output,)

-- gil

Rick Woods

unread,
Apr 22, 2010, 6:26:39 PM4/22/10
to
YES!!!
Lizette K. just sent me this same info, it's exactly what I was looking for!
Thank you, thank you everyone!
- Rick

>>> Itschak Mugzach <imug...@GMAIL.COM> 4/22/2010 9:15 AM >>>
Use ISRDDN under ISPF, then enter LOAD moodname. You'll get it in a window.

ITschak

On Thu, Apr 22, 2010 at 6:40 PM, Binyamin Dissen <bdi...@dissensoftware.com
> wrote:

> On Thu, 22 Apr 2010 08:30:49 -0700 Rick Woods <Rick....@AZDOA.GOV>
> wrote:
>
> :>I need help from wiser heads than myself. We're in the middle of a bad


> situation that I don't have time to describe, but what I need to do is write
> a quick exec that will load a module from the linklist, and allow me to look
> at it. I've never done this, and I'm R-ingTFM right now.
> :>Does anyone have a quick and dirty they could share with me?
>

> Use TSO.
>
> TEST *(modname)
>
> L whatever
>
> --
> Binyamin Dissen <bdi...@dissensoftware.com>
> http://www.dissensoftware.com
>
> Should you use the mailblocks package and expect a response from me,
> you should preauthorize the dissensoftware.com domain.
>
> I very rarely bother responding to challenge/response systems,
> especially those from irresponsible companies.

Bob Bridges

unread,
Apr 22, 2010, 8:07:07 PM4/22/10
to
"Look at it"? Can't you just Browse it?

---
Bob Bridges, rhb...@attglobal.net, cell 336 382-7313

/* The historian Macaulay famously said that the Puritans opposed
bearbaiting not because it gave pain to the bears but because it gave
pleasure to the spectators. The Puritans were right: Some pleasures are
contemptible because they are coarsening. They are not merely private vices,
they have public consequences in driving the culture's downward spiral.
-George Will, "The challenge of thinking lower", 2001-06-22 */

-----Original Message-----
From: Rick Woods
Sent: Thursday, April 22, 2010 11:31

I need help from wiser heads than myself. We're in the middle of a bad
situation that I don't have time to describe, but what I need to do is write
a quick exec that will load a module from the linklist, and allow me to look
at it. I've never done this, and I'm R-ingTFM right now.
Does anyone have a quick and dirty they could share with me?

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

Binyamin Dissen

unread,
Apr 22, 2010, 8:22:59 PM4/22/10
to
On Thu, 22 Apr 2010 08:30:49 -0700 Rick Woods <Rick....@AZDOA.GOV> wrote:

:>I need help from wiser heads than myself. We're in the middle of a bad situation that I don't have time to describe, but what I need to do is write a quick exec that will load a module from the linklist, and allow me to look at it. I've never done this, and I'm R-ingTFM right now.


:>Does anyone have a quick and dirty they could share with me?

Use TSO.

TEST *(modname)

L whatever

Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

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

Robert Zenuk

unread,
Apr 22, 2010, 11:43:01 PM4/22/10
to
Take a look at the help for ISRDDN. It has a LOAD command to load and
browse modules...

Tutorial ---------------------- Help for ISRDDN ---------------------
Tutorial
Command ===>

More: - +

Commands for browsing storage and loaded modules:


o LOAD modname Explicitly load and browse a module.


o WHERE address Determine what module an address refers to. If address

is a module name, the storage is browsed.

o Browse modname {+offset}

Browse a load module as it exists in storage. modname may also be an
absolute address or an indirect addressing string in TSO TEST syntax.
Absolute addresses must be terminated with a period. Recursive browse
(module or address) is supported.

While you are browsing storage, you can use any of the regular
facilities of ISPF Browse. You can also scroll UP past the 'Top of
Data' line until you reach the beginning of the readable contiguous
storage.

When already browsing storage, you may use the following primary
commands:

- BROWSE modname Browse a module that is already loaded. If it is
not loaded, you can use the LOAD command to explicitly load and
browse it. You may also specify an address terminated with a
period.
If modname is not specified and the cursor is on an 8 character
address, that address is browsed (similar to point and shoot).
- CANCEL Leave all nested browse sessions.
- REFRESH Return to the original address that was used to start this
browse session. Use the REFRESH command after you have scrolled up
from the base address (at offset +0) to return to the +0 location.
- LOAD modname Explicitly load and browse a module.
- FORMat or DUMP View storage in dump format.
- DATA Browse unformatted storage with offsets.
- RAW Browse storage without any formatting.
- WIDE or NARRow Switch between wide and narrow display formats.
- DISASM ON Disassemble the load module being browsed.
- DISASM OFF Cancel the DISASM function.
- SETDATA offset Specify that the data at the specified offset is

not an instruction, while browsing a disassembly.
- LIMIT Show the address limits and size of the contiguous storage
area being browsed and reset the currently browsed address to the
lowest address in that storage.
- CHAIN offset length Display elements of a linked list. Offset is
a hexadecimal offset of the 4 byte pointer to the next link.
Length is a hexadecimal minimum length to show for each link. The
default for offset is zero. The default for length is whatever
will fit on one line in the current display format.
- ARRAY dim length Display storage as an array. Dim is a decimal
number of elements in the array. Length is the hexadecimal length
of each element. Length defaults to 4.
- ARRAYP dim length Use storage as an array of pointers and display
the storage addressed by each element of the array, Dim is the
decimal number of pointers in the array, Length is the hexadecimal
length of each element pointed to by the pointer. The default for
length is whatever will fit on one line in the current display
format.

Examples of the Browse command:

- Browse IEFBR14 - View module IEFBR14.
- Browse IGDZILLA+40 - View '40'x into module IGDZILLA.
- Browse 10. - View storage at location '10'x.
- B 0.+21c?+b4?+108?+8 - Use indirect addressing to view a control
block.
- B +20 - View 32 bytes past the current base address.

The Browse command can be enhanced to view control blocks by name by
allocating a sequential file to DD name ISRDDN and placing in that
file a control block name and TSO TEST locator string on each line.
The first string on the line is a control block name. The second
string is a locator string. Everything else on the line is ignored.
With the following file, you could type B ASCB to view the ASCB:

CVT 10.? Communications Vector Table
ASCB CVT?+C? Address Space Control Block

Rob


In a message dated 4/22/2010 8:31:24 A.M. US Mountain Standard Time,
Rick....@AZDOA.GOV writes:

Hi Listers

I need help from wiser heads than myself. We're in the middle of a bad
situation that I don't have time to describe, but what I need to do is write a
quick exec that will load a module from the linklist, and allow me to look
at it. I've never done this, and I'm R-ingTFM right now.
Does anyone have a quick and dirty they could share with me?

Thanks in advance
- Rick

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

Itschak Mugzach

unread,
Apr 22, 2010, 11:43:09 PM4/22/10
to
Use ISRDDN under ISPF, then enter LOAD moodname. You'll get it in a window.

ITschak

On Thu, Apr 22, 2010 at 6:40 PM, Binyamin Dissen <bdi...@dissensoftware.com
> wrote:

Rick Woods

unread,
Apr 23, 2010, 2:29:52 AM4/23/10
to
Hi again
I'm not getting any of your responses on this list, my apologies if I'm not acknowledging anyone. Lizette responded to me directly, and she copied someone else's response which I didn't get either.
We're in trouble here. I may have to write some assembler to get out of this.
- Rick

>>> Rick Woods 4/22/2010 8:30 AM >>>

Bob Stark

unread,
Apr 23, 2010, 2:30:20 AM4/23/10
to
1. You can look at storage via IPCS. I think it is something like
SETDEF active


2. Go to the READY prompt

test 'sys1.linklib(iefbr14)'
TEST
l +0 l(8)
+0 1BFF07FE 00000000 00000000
TEST
l +0 l(8) i
+0 SR 15,15 00000000
+2 BCR 15,14
IKJ57245I INVALID INSTRUCTION CODE AT +4
TEST


Regards,

Bob Stark

ProTech - When you're serious about Systems Management
Consulting, Software, and Training for z/OS, UNIX and Internet
www.protechtraining.com 800-373-9188 x151 Cell: 412-445-8072

-- gil

--


If this email is spam, report it here:

http://www.onlymyemail.com/view/?action=reportSpam&Id=Mzg3MzE6MTA3OTkxNTY3Njpic3RhcmtAcHJvdGVjaHB0cy5jb206ZGVsaXZlcmVk

Bob Stark

unread,
Apr 23, 2010, 5:16:21 AM4/23/10
to
Go to the READY prompt

test 'sys1.linklib(iefbr14)'
TEST
l +0 l(8)
+0 1BFF07FE 00000000 00000000
TEST
l +0 l(8) i
+0 SR 15,15 00000000
+2 BCR 15,14
IKJ57245I INVALID INSTRUCTION CODE AT +4
TEST


Regards,

Bob Stark

ProTech - When you're serious about Systems Management
Consulting, Software, and Training for z/OS, UNIX and Internet
www.protechtraining.com 800-373-9188 x151 Cell: 412-445-8072

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Paul Gilmartin
Sent: Thursday, April 22, 2010 13:04
To: TSO-...@VM.MARIST.EDU
Subject: Re: Bad Situation

-- gil

--

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

Rick Woods

unread,
Apr 23, 2010, 5:16:28 AM4/23/10
to
Thanks, Bob.

I've been able to look at the module (actually a loaded table) via ISRDDN, and it was OK. So we're past this issue, but still in trouble. But I've learned a couple of very useful things here!

Thanks, everyone, for all your help and support.
- Rick

>>> Bob Stark <bst...@PROTECHPTS.COM> 4/22/2010 10:19 AM >>>

Rick Woods

unread,
Apr 26, 2010, 8:43:00 AM4/26/10
to
Hi Bob,
I can browse the file on dasd, but what I needed was to see what it looked like actually loaded in storage. TSO TEST couldn't help me, as the module was an assembled table, not executable code.

I ended up using the ISRDDN facility several of you suggested. Several responses are starting to show up on my list now, thanks to everyone who responded!
We think we've isolated the problem. The browsing of the module in storage was just one of my WAGs that I was trying to run down, as we all sweated this one out. As it turned out, the module was fine.
Thanks again,
- Rick

>>> Bob Bridges <rhb...@ATTGLOBAL.NET> 4/22/2010 12:22 PM >>>

Binyamin Dissen

unread,
Apr 26, 2010, 9:25:13 AM4/26/10
to
On Mon, 26 Apr 2010 05:41:57 -0700 Rick Woods <Rick....@AZDOA.GOV> wrote:

:>Hi Bob,


:>I can browse the file on dasd, but what I needed was to see what it looked like actually loaded in storage. TSO TEST couldn't help me, as the module was an assembled table, not executable code.

TEST can load an assembled table. What problem did you have?

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

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

Rick Woods

unread,
Apr 26, 2010, 10:24:37 AM4/26/10
to
I didn't get past the initial try. I was seeing commands to step through a program instruction by instruction, which was not what I wanted. ISRDDN did exactly what I needed, and so I stopped there. I'm sure TEST would have done it, had I kept on in that direction.
- Rick

>>> Binyamin Dissen <bdi...@DISSENSOFTWARE.COM> 4/26/2010 5:49 AM >>>

Jeremy Nicoll - ls tsrx

unread,
Apr 26, 2010, 3:39:20 PM4/26/10
to
Binyamin Dissen <bdi...@DISSENSOFTWARE.COM> wrote:

> On Mon, 26 Apr 2010 05:41:57 -0700 Rick Woods <Rick....@AZDOA.GOV>
wrote:
>
> :>Hi Bob,
> :>I can browse the file on dasd, but what I needed was to see what it
looked like actually loaded in storage. TSO TEST couldn't help me, as the
module was an assembled table, not executable code.
>
> TEST can load an assembled table. What problem did you have?

If you needed storage dumped, IPCS could probably have done it, or a SLIP
dump.

--
Jeremy C B Nicoll - my opinions are my own.

Rick Woods

unread,
Apr 26, 2010, 4:51:32 PM4/26/10
to
Jeremy,
We thought about a slip, but were having trouble deciding just when it should pop. The error seemed to be happening in the JCL interpreter phase. We didn't spend a lot of time on that (or IPCS, either), though, since ISRDDN was what I needed and I got the information I wanted (i.e. that it was a red herring) almost immediately.

I'm taking notes on all these alternatives, though.
(Why, I'm not quite sure, since I retire in a month. Force of habit, I guess.)

Thanks again to everyone. You guys all came through when we really needed some help.
- Rick

>>> Jeremy Nicoll - ls tsrx <jn.ls....@WINGSANDBEAKS.ORG.UK> 4/26/2010 12:38 PM >>>

0 new messages