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

TSO command synonym support?

63 views
Skip to first unread message

Mark Vitale

unread,
Jun 23, 2008, 2:43:36 PM6/23/08
to
In VM/CMS, there was (is) a "SYNONYM"
facility that allowed you to define
synonyms for commands. I used it to
invoke the same Rexx exec with different names.
The Rexx exec could then use parse source
to figure out the name under which it
had been called, and behave differently
based on that name. This was a good
way to maintain, under a single roof,
a twisty little maze of execs, all the same.

In TSO/REXX, 'parse source' exists, but
is there an equivalent TSO method for
doing command synonyms or aliases?

Thanks in advance,

Mark Vitale
Product Manager, PerfMan for CICS, DB2, & Tape Libraries
PerfMan
Intelligent IT Decisions

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

Harrington, Mark

unread,
Jun 23, 2008, 2:53:40 PM6/23/08
to
Ahhh yes , I sure miss the synonym file!
Great feature I wish mvs had it!
M.

Thanks in advance,

----------------------------------------------------------
IMPORTANT WARNING: This email (and any attachments) is only intended for the use of the person or entity to which it is addressed, and may contain information that is privileged and confidential. You, the recipient, are obligated to maintain it in a safe, secure and confidential manner. Unauthorized redisclosure or failure to maintain confidentiality may subject you to federal and state penalties. If you are not the intended recipient, please immediately notify us by return email, and delete this message from your computer.
----------------------------------------------------------

Jeff Byrum

unread,
Jun 23, 2008, 3:13:10 PM6/23/08
to
Not sure if this is exactly what you are looking for, but you can use
IEBUPDTE to save the REXX exec as a member of a PDS (or PDSE) with an
alias:

//IEBUPDTE EXEC PGM=IEBUPDTE,PARM=NEW
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD DISP=SHR,DSN=my.rexx.lib
//SYSIN DD *
./ ADD NAME=TSTALIAS
/* REXX */
PARSE SOURCE . EXECTYPE EXECNAME EXECDDN EXECDSN . EXECENV EXECADSP .
Say 'EXEC='EXECNAME
Say 'Thanks for all the fish'
Exit(0)
./ ALIAS NAME=TSTALIAX
./ ENDUP

(There are undoubtedly other ways to create an alias; I didn't look any
further...)

I actually executed this online under ISPF first as TSTALIAS and then as
TSTALIAX, and go these responses:

EXEC=TSTALIAS
Thanks for all the fish

EXEC=TSTALIAX
Thanks for all the fish


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf
Of Mark Vitale
Sent: Monday, June 23, 2008 2:37 PM
To: TSO-...@VM.MARIST.EDU
Subject: TSO command synonym support?

Ryerse, Robin

unread,
Jun 23, 2008, 3:15:42 PM6/23/08
to
Closest you get is member aliases. Warning ! Maintenance of member
aliases is difficult and prone to oversight

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf
Of Mark Vitale
Sent: June 23, 2008 2:37 PM
To: TSO-...@VM.MARIST.EDU
Subject: TSO command synonym support?

Ryerse, Robin

unread,
Jun 23, 2008, 3:41:00 PM6/23/08
to
The easiest method of creating an alias is via the (TSO) RENAME.

Be aware that this method copies the directory entry of the base entry
then toggles "on" the alias bit. As such if the base entry includes ISPF
statistics, the ISPF statistics are copied but never referenced or shown
(by IBM software. A directory entry with ISPF statistics is 44 bytes. A
minimal directory entry (including the alias bit) is 12 bytes. Thus to
economize directory space, before assigning an alias, the ISPF
statistics should be removed. If the ISPF statistics are valuable and to
kept, then a method must be used to capture them before they are removed
and re-apply them after the alias is assigned.

Bob Bridges

unread,
Jun 24, 2008, 5:06:07 PM6/24/08
to
...or a twisting maze of (12) little execs, all the same. Ah, the
memories!

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

/* The thing that most Europeans simply do not grasp is the size of the US.
From where I lived in Wiesbaden, Germany, I could drive for six hours in
any direction and be in almost any country in Europe -- excepting Spain,
Greece, and maybe Norway/Sweden depending on ferry connections. You can
drive in the US for six hours and still be in west Texas. -Charley Seavey
in the Patrick O'Brian discussion forum
(http://www.wwnorton.com/forums/POB/POBforum.htm), May 2000. */

-----Original Message-----
From: Mark Vitale
Sent: Monday, June 23, 2008 14:37

In VM/CMS, there was (is) a "SYNONYM"
facility that allowed you to define
synonyms for commands. I used it to
invoke the same Rexx exec with different names.
The Rexx exec could then use parse source
to figure out the name under which it
had been called, and behave differently
based on that name. This was a good
way to maintain, under a single roof,
a twisty little maze of execs, all the same.

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

Bob Bridges

unread,
Jun 24, 2008, 5:09:54 PM6/24/08
to
If MVS is lacking this facility, is there any disadvantage to simply
creating a one-line entry for each synonym of the command you want that
calls that command with an argument identifying the source?

I have a routine called BEV that is rarely called by that name; instead I
refer on the TSO command line to BR, ED and VW, each of which call BEV, the
only purpose being to save me a little thought and a few keystrokes. Seems
to me this could be applied pretty broadly. And you're not having to
maintain many copies of similar code; the synonymous routines don't do
anything but invoke the "root" routine.

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

/* The thing that most Europeans simply do not grasp is the size of the US.
From where I lived in Wiesbaden, Germany, I could drive for six hours in
any direction and be in almost any country in Europe -- excepting Spain,
Greece, and maybe Norway/Sweden depending on ferry connections. You can
drive in the US for six hours and still be in west Texas. -Charley Seavey
in the Patrick O'Brian discussion forum
(http://www.wwnorton.com/forums/POB/POBforum.htm), May 2000. */

-----Original Message-----
From: Mark Vitale
Sent: Monday, June 23, 2008 14:37

In VM/CMS, there was (is) a "SYNONYM"
facility that allowed you to define
synonyms for commands. I used it to
invoke the same Rexx exec with different names.
The Rexx exec could then use parse source
to figure out the name under which it
had been called, and behave differently
based on that name. This was a good
way to maintain, under a single roof,
a twisty little maze of execs, all the same.

In TSO/REXX, 'parse source' exists, but
is there an equivalent TSO method for
doing command synonyms or aliases?

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

Frank Clarke

unread,
Jun 24, 2008, 7:12:56 PM6/24/08
to
On 23 Jun 2008 11:43:36 -0700, mark....@PERFMAN.COM (Mark Vitale) wrote:
<A03B7EC28A6F3942BF67...@34093-EVS2C1.exchange.rackspace.com>

>In VM/CMS, there was (is) a "SYNONYM"
>facility that allowed you to define
>synonyms for commands. I used it to
>invoke the same Rexx exec with different names.
>The Rexx exec could then use parse source
>to figure out the name under which it
>had been called, and behave differently
>based on that name. This was a good
>way to maintain, under a single roof,
>a twisty little maze of execs, all the same.
>
>In TSO/REXX, 'parse source' exists, but
>is there an equivalent TSO method for
>doing command synonyms or aliases?

I do it all the time. "PARSE SOURCE" delivers the name by which the code was
called, so if the member is ALIASed it's (almost exactly) the same as having a
synonym.


(change Arabic number to Roman numeral to email)

Isaac Yassin

unread,
Jun 25, 2008, 7:44:10 AM6/25/08
to
XYZZY / PLUGH

Isaac Yassin

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Bob Bridges
Sent: Wednesday, June 25, 2008 12:05 AM
To: TSO-...@VM.MARIST.EDU
Subject: Re: TSO command synonym support?

Jeff Byrum

unread,
Jun 25, 2008, 8:19:08 AM6/25/08
to
Or...use the ISPF command table (3.9). Assuming ISPF is set up for
this, you can define 'synonym' commands for yourself only, or for the
whole site:

ALIAS1 0 SELECT CMD(%REALNAME ALIAS1)
ALIAS2 0 SELECT CMD(%REALNAME ALIAS2)
...etc...

Jeff

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf
Of Bob Bridges
Sent: Tuesday, June 24, 2008 5:09 PM
To: TSO-...@VM.MARIST.EDU
Subject: Re: TSO command synonym support?

Ryerse, Robin

unread,
Jun 26, 2008, 9:09:29 AM6/26/08
to
Here is an example of an exec/function that exploits member aliases in
about as complex manner as possible, but it works. Choose whatever
variable names that appear in the exec then assign those variable names
as member aliases and voila you have a new function without coding
any rexx

/* REXX Gather various system values

Any variable name can be an alias. The significant ones are:

IPLDATE IPLTIME IPLVOL IPLADDR

SMFID FMID FMNAME SERIAL#

Use native MVSVAR('SYMDEF','SYSNAME') rather than SYSID as synonym
*/

numeric digits 11

cvt = c2d(storage(10,4))

sca = c2x(storage(d2x(cvt+196),4))

ucb_ipl = c2x(storage(d2x(cvt+48),4))

parse value storage(sca,344) with 17 smfid 21 337 ipt 341 ipd

parse value storage(ucb_ipl,34) with 14 ipladdr 17 29 iplvol

if \datatype(ipladdr,'X') then ipladdr =
c2x(substr(storage(ucb_ipl,6),5,2))
yyddd = substr(c2x(ipd),3,5)

ipldate = translate(date('O',yyddd,'J'),'-','/')

alpha_date = date('W',yyddd,'J')',' date(,yyddd,'J')

t2 = c2d(ipt) % 100

ss = right(t2//60,2,'0')

t2 = t2 % 60

mm = right(t2//60,2,'0')

hh = right(t2%60,2,'0')

ipltime = hh':'mm':'ss

pvc = c2x(storage(d2x(cvt+764),4))

pca = c2d(storage(pvc,4))+0

do i = 0 to 15 while pca = 0

pca = c2d(storage(d2x(pca+i*4),4))

end

parse value storage(d2x(pca),16) with 9 serial# 17 9 ser 13 mdl

parse value storage(d2x(cvt-40),16) with fmname 9 fmid

sysid = mvsvar('SYMDEF','SYSNAME')

parse source . exec_type alias id_ddname .
command = exec_type == 'COMMAND'

CVTIXAVL = C2d(Storage(D2x(CVT+124),4))
IOCIOVTP = C2d(Storage(D2x(CVTIXAVL+208),4))
IOCIOCDA = C2d(Storage(D2x(IOCIOVTP+024),4))
IODF = Storage(D2X(IOCIOCDA+32),11)

if \command then
do
if symbol(alias) = 'VAR' then return value(alias)
else return serial# ipldate ipltime fmid fmname smfid sysid,
ipladdr iplvol vtamid()
end


say 'SMFID :' smfid ' SYSID :' sysid
say 'Cpu Serial number:' ser ' Cpu Model number:' mdl
say 'MVS Product name :' fmname 'MVS FMID value :' fmid
say 'IPL address :' ipladdr ' IPL volume :' iplvol
say 'IPL date :' alpha_date '@' ipltime


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

Of Mark Vitale
Sent: June 23, 2008 2:37 PM
To: TSO-...@VM.MARIST.EDU
Subject: TSO command synonym support?

0 new messages