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

getting the member name of allocated PDS

34 views
Skip to first unread message

Phil Clowes

unread,
Jul 5, 2002, 10:55:44 AM7/5/02
to
I want to be able to recover the full dataset name allocated to a batch
ddname.
I have a utility exec which, when passed a DDNAME, returns the dataset name,
using LISTDSI(ddname 'FILE').
Up until now, my exec has made the assumption that the ddname will be
allocated to a sequential dataset. That's been fine for a LISTDSI query on
the FILE.
Now, I have to be able to return the PDS and MEMBER name to the exec.
Is this possible from a simple call ? Anyone have any sample code?

TiA
Phil Clowes


OneHandClapping

unread,
Jul 5, 2002, 6:00:35 PM7/5/02
to
if you leave the tso environment and use the library management services
from ispf it may be possible... I think there is an lmquery service for
dataset query

Doug Nadel

unread,
Jul 5, 2002, 7:07:19 PM7/5/02
to

/* REXX - Find a dsname and member for a given ddname */
/* doug nadel - swareq routine by Gilbert Saint-flour */
parse upper arg ddname
say get_dsn(ddname)
Return


get_dsn:
Procedure /* get 1st dsn(mem) for ddname*/
ddname=translate(left(Arg(1),8))
tiotptr=24+ptr(12+ptr(ptr(ptr(16)))) /* Get ddname array */
tioelngh=c2d(stg(tiotptr,1)) /* Length of 1st entry */
Do Until tioelngh=0 /* Scan until dd found */
tioeddnm=strip(stg(tiotptr+4,8)) /* Get ddname from tiot */
If tioeddnm = ddname Then
Do
tioelngh=c2d(stg(tiotptr,1)) /* Length of next entry */
tioejfcb=stg(tiotptr+12,3)
jfcb=swareq(tioejfcb) /* Convert sva to 31-Bit addr */
dsname=strip(stg(jfcb,44)) /* Dsname jfcbdsnm */
member=strip(stg(jfcb+44,8)) /* member name */
If member <> '' Then
dsname=dsname'('member')'
Return dsname
End
tiotptr=tiotptr+tioelngh /* Get next entry */
tioelngh=c2d(stg(tiotptr,1)) /* Get entry length */
End
Return ''
/*-------------------------------------------------------------------*/
ptr:
Return c2d(storage(d2x(Arg(1)),4)) /* Return a pointer */
/*-------------------------------------------------------------------*/
stg:
Return storage(d2x(Arg(1)),Arg(2)) /* Return storage */
/*-------------------------------------------------------------------*/
swareq:
Procedure
If right(c2x(Arg(1)),1) <> 'F' Then /* Swa=Below ? */
Return c2d(Arg(1))+16 /* Yes, return sva+16 */
sva = c2d(Arg(1)) /* Convert to decimal */
tcb = ptr(540) /* Tcb psatold */
jscb = ptr(tcb+180) /* Jscb tcbjscb */
qmpl = ptr(jscb+244) /* Qmpl jscbqmpi */
qmat = ptr(qmpl+24) /* Qmat qmadd */
Do While sva>65536
qmat = ptr(qmat+12) /* Next qmat qmat+12 */
sva=sva-65536 /* 010006F -> 000006F */
End
Return ptr(qmat+sva+1)+16

Doug Nadel
----------------------------------------
ISPF and OS/390 Tools & Toys page:
http://www.sillysot.com/mvs
Mail containing HTML or any attachments, including vcf files, is
automatically discarded. If you need to send me an attachment,
please let me know so that I can change my email filters.

William H. Sweeney

unread,
Jul 9, 2002, 9:15:35 AM7/9/02
to
In a recent article in Technical Support magazine, title 'RSA Encryption
Explained to T-REXX Dinosaurs', the author defines REXX as '...in one of the
most dinosaur-like, although very powerful, programming language: REXX.' The
author is Thierry Falissard, of which I am sure many have visited his web
site.

Would anyone on the list be willing to give their opinion on what is meant
by 'dinosaur-like'? I use REXX extensively as a tool for performing System
Programming tasks, as well as writing applications. It was a good article, I
was just curious about the reference.

Bill Sweeney
whsw...@sscmainframe.com

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

Dave Salt

unread,
Jul 9, 2002, 9:33:19 AM7/9/02
to
What was his name again, Theory False? Says it all, doesn't it?

Dave Salt


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

Mullen, Chuck

unread,
Jul 9, 2002, 9:33:34 AM7/9/02
to
A class of animals that lasted 70 times longer than primates have so far,
assuming primates have been around for 5 million years?

Or maybe he meant anything that runs on a mainframe and so must be quaintly
obsolete - unlike Perl or the vi editor?

(Note to the easily offended: look up "irony")


- Chuck Mullen
OS/390 Platform Support
617 572-6093
s390.jhancock.com


-----Original Message-----
From: William H. Sweeney [mailto:whsw...@SSCMAINFRAME.COM]
Sent: Tuesday, July 09, 2002 8:18 AM
To: TSO-...@VM.MARIST.EDU
Subject: REXX is a Dinosaur-Like Language

Gardiner, Roy

unread,
Jul 9, 2002, 9:33:20 AM7/9/02
to
> From: William H. Sweeney [SMTP:whsw...@SSCMAINFRAME.COM]

>
> Would anyone on the list be willing to give their opinion on what is meant
> by 'dinosaur-like'?
>
Goodness knows.

This has struck a chord with me because I'm looking at
www.slickedit.com where they designed a new, C-like syntax for their macro
language instead of using Rexx. Why would anyone do this? (I'm going to ask
them). They did know about Rexx; they lifted the PARSE statement from it
(with acknowlegement).

If you go to Java sites you will often find mention of JPython as an
alternative method of generating Java classes, but NetRexx is never
mentioned.

I've never understood this negative attitude to Rexx.

Roy


The Royal Bank of Scotland plc ('the Bank') is regulated by the Financial
Services Authority and is a member of The Royal Bank of Scotland Marketing
Group. The only packaged products (life policies, unit trusts and other
collective investment schemes and stakeholder and other pensions) the Bank
advises on and sells are those of the Marketing Group, whose other members
are Royal Scottish Assurance plc and Royal Bank of Scotland Unit Trust
Management Limited, both regulated by the Financial Services Authority.

The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB.

Agency agreements exist between members of The Royal Bank of Scotland Group.

This e-mail message is confidential and for use by the addressee only. If
the message is received by anyone other than the addressee, please return
the message to the sender by replying to it and then delete the message from
your computer. Internet e-mails are not necessarily secure. The Royal Bank
of Scotland plc does not accept responsibility for changes made to this
message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will not
adversely affect its systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry out
such virus and other checks as it considers appropriate.

Gray, Alastair

unread,
Jul 9, 2002, 10:36:18 AM7/9/02
to
At least REXX had found its way into the language family tree in "Wired"
last month as a 'live' language. (Haven't got the article in front of me,
perhaps someone else can recall the project they were talking about).

Alastair Gray
Systems Type

> -----Original Message-----
> From: Gardiner, Roy [mailto:roy.ga...@RBS.CO.UK]
>
> > From: William H. Sweeney [SMTP:whsw...@SSCMAINFRAME.COM]
> >
> > Would anyone on the list be willing to give their opinion
> on what is meant
> > by 'dinosaur-like'?
> >
> Goodness knows.
>
> This has struck a chord with me because I'm looking at
> www.slickedit.com where they designed a new, C-like syntax
> for their macro
> language instead of using Rexx. Why would anyone do this?
> (I'm going to ask
> them). They did know about Rexx; they lifted the PARSE
> statement from it
> (with acknowlegement).
>
> If you go to Java sites you will often find mention
> of JPython as an
> alternative method of generating Java classes, but NetRexx is never
> mentioned.
>
> I've never understood this negative attitude to Rexx.

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

Robert Zenuk

unread,
Jul 9, 2002, 11:20:36 AM7/9/02
to
In a message dated 07/09/2002 5:25:14 AM US Mountain Standard Time,
cmu...@JHANCOCK.COM writes:


> Or maybe he meant anything that runs on a mainframe and so must be quaintly
> obsolete - unlike Perl or the vi editor?

I agree implicitly about the vi editor, but Perl is my second favorite
language... There is a port of Perl for OS/390, but it only runs on the USS
side and never seems to be the most current release, unless you build it
yourself. So maybe we can write a Dinosaur article about Perl too...

Perl has actually accomplished one of the goals of REXX - to be a "write
once, run anywhere" language and is a favorite for writing CGI code. It is
an extremely extensible free language with a massive "free" support structure
at www.perl.com and the Perl lists. There are hundreds of authors constantly
contributing free "modules" (Perl equivalent of Function Packages) for every
technique and technology under the sun. I know REXX is available on almost
all platforms, but as I found,

<DIG>
most UNIX weenies won't take ownership of anything that looks, smells or
taste like a dinosaur (REXX). This originally drove me to Perl for non-
mainframe projects (UNIX and NT). But, I have also found there are so few
UNIX or NT Sysadmins with programming skills, let alone proficient Perl
programmers, that anything that resembles elegant, reusable code, is shunned
(or generates follow-on work). So, many times (as a UNIX contractor) you are
forced to write things in the second worst interpretive language (Bourne
Shell). DOS batch files are THE worst interpretive language (let's here it
for NT). Both of these are that "lowest, free, already installed, common
denominator" that attracts many managers...
</DIG>

I still believe OS/390 (or z/OS) is the best platform for large, multi-user
business applications. It is still my favorite platform and my favorite
language is still REXX, but when in Rome...

My two cents,
Robert Zenuk
robz...@aol.com

Gardiner, Roy

unread,
Jul 9, 2002, 12:24:23 PM7/9/02
to
> From: Robert Zenuk [SMTP:Robz...@AOL.COM]
... second worst interpretive language (Bourne

> Shell). DOS batch files are THE worst interpretive language
>
Wot, worse'n Clist? Never!


The Royal Bank of Scotland plc ('the Bank') is regulated by the Financial
Services Authority and is a member of The Royal Bank of Scotland Marketing
Group. The only packaged products (life policies, unit trusts and other
collective investment schemes and stakeholder and other pensions) the Bank
advises on and sells are those of the Marketing Group, whose other members
are Royal Scottish Assurance plc and Royal Bank of Scotland Unit Trust
Management Limited, both regulated by the Financial Services Authority.

The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB.

Agency agreements exist between members of The Royal Bank of Scotland Group.

This e-mail message is confidential and for use by the addressee only. If
the message is received by anyone other than the addressee, please return
the message to the sender by replying to it and then delete the message from
your computer. Internet e-mails are not necessarily secure. The Royal Bank
of Scotland plc does not accept responsibility for changes made to this
message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will not
adversely affect its systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry out
such virus and other checks as it considers appropriate.

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

Phil Clowes

unread,
Jul 9, 2002, 1:14:03 PM7/9/02
to
Thanks Doug, and One-Hand.
I will investigate the use of both your ideas.

Cheers!
Phil

"Doug Nadel" <some...@mindspring.com> wrote in message
news:ak9ciu4rct96nptdg...@4ax.com...

Falissard

unread,
Jul 9, 2002, 3:44:48 PM7/9/02
to
I love this one !
As you know, nothing is more practical than a Right Theory...

"Dave Salt" <ds...@HOTMAIL.COM> wrote

Frank Clarke

unread,
Jul 9, 2002, 7:13:00 PM7/9/02
to
On 9 Jul 2002 06:15:35 -0700, whsw...@SSCMAINFRAME.COM (William H.
Sweeney) wrote:

>In a recent article in Technical Support magazine, title 'RSA Encryption
>Explained to T-REXX Dinosaurs', the author defines REXX as '...in one of the
>most dinosaur-like, although very powerful, programming language: REXX.' The
>author is Thierry Falissard, of which I am sure many have visited his web
>site.
>
>Would anyone on the list be willing to give their opinion on what is meant
>by 'dinosaur-like'?

Eats other languages alive?

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn
Join us at www.rexxla.org

Jeremy C B Nicoll

unread,
Jul 10, 2002, 10:17:45 AM7/10/02
to
In article
<A189D4E1E6F2D511B2F7...@rlgoodtacx5.server.rbsgrp.net>,
"Gardiner, Roy" <roy.ga...@RBS.CO.UK> wrote:

> Wot, worse'n Clist? Never!

hey! You can write an application or utility in clist but I don't think
you could do anything useful in bat could you?

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

Robert Bridges

unread,
Jul 10, 2002, 11:59:52 AM7/10/02
to
Well, you can do SOME useful things. But without (for example) the ability to prompt the user and get his character input, no, you're pretty much right.

There've been some useful extensions to .BAT, though. Norton Utilies, for example, filled in a lot of the gaps.

---
Robert_...@labcorp.com, 336 436-8066, fax -0518
(Bob Bridges, rhb...@attglobal.net)

>>> Jer...@OMBA.DEMON.CO.UK 2002-07-09 20:22:15 >>>


hey! You can write an application or utility in clist but I don't think
you could do anything useful in bat could you?

--- "Gardiner, Roy" <roy.ga...@RBS.CO.UK> wrote:
> Wot, worse'n Clist? Never!

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

Robert Zenuk

unread,
Jul 11, 2002, 1:49:28 AM7/11/02
to
Well, you can do SOME useful things. But without (for example) the ability
to prompt the user and get his character input, no, you're pretty much right.

hey! You can write an application or utility in clist but I don't think


you could do anything useful in bat could you?

I once had to write an unattended application in DOS/NT batch file to
periodically check for the existence of files in a directory and when found,
format FTP statements to upload the files to the next GDG. The volume
periodically got so high, I had to spawn multiple DOS windows under NT to
keep up with the activity. This required creating an ENQ mechanism and an
audit log (again under DOS batch files) to insure the timestamped files
arrived at the host in the correct sequence even though each DOS window had
its own socket connection to the FTP server. The audit log had to map the NT
file to the absolute GDG, so the NT administrator could manage the process
and track the individual widgets recorded in the files.

It would have been easier as a mainframe "PULL" operation, but the customer
wanted an NT "PUSH" and something the NT Administrator could understand (they
did not have VB, Perl or an FTP Server on the NT machine). Talk about square
pegs, round holes and flaming hoops...

But, unfortunately, it is possible to do something useful with DOS batch
files and some managers still insist on that lowest, free, common
denominator. No matter how painful it is...

I was kind of proud of this. Not because it was good work, but because I was
able to beat the thing into submission. If anything is a Dinosaur, DOS Batch
files are Dinosaurs! As a point of reference, there are actually a few
decent Web Sites for DOS/NT Batch Files out there. And with that said I
won't contribute to this thread anymore.

Here is the FTP routine from the project as an example:

@echo off
rem *************************************************************
rem * Purpose: FTP a file to an OS/390 Dataset (supports GDGs) *
rem * *
rem * Syntax: ftp2dsn ftpfile *
rem * *
rem * Parms: ftpfile - required - file to send *
rem * *
rem * Change Log *
rem * *
rem * Name Date Reason *
rem * --------------------------------------------------------- *
rem * R. Zenuk Apr 2001 Initial Creation *
rem * R. Zenuk 05/01/01 Fixed the MS FTP VERBOSE problem *
rem * R. Zenuk 05/02/01 Added ENQ/DEQ for GDG serialization *
rem * R. Zenuk 05/22/01 Added TRACE *
rem * R. Zenuk 05/30/01 Spruced up *
rem * R. Zenuk 06/21/01 Added SPACE and UNIT support *
rem * *
rem * *
rem * Notes: DSN can be made up using additional positional *
rem * values available during post processing. Any value *
rem * used must be less than 8 characters long. DOCTYPE *
rem * might be a desired (and valid) addition to the *
rem * generated DSN. *
rem * *
rem * MS FTP has some strange behavior when run from a *
rem * DOS session spawned from the JVM. FTP will set *
rem * the VERBOSE flag (-v) automatically. VERBOSE is *
rem * also a valid FTP subcommand. Even though MS FTP *
rem * will accept VERBOSE ON/OFF the VERBOSE command is *
rem * just a toggle. If it is already ON it will be set *
rem * OFF and visa versa. This Batfile depends on the *
rem * messages returned from OS/390 FTP to determine *
rem * success or failure. If the message is not there *
rem * the Batfile will report an error and dump the FTP *
rem * session log. If this occurs and the DSN did get *
rem * transfered then check if the verbose mode is OFF. *
rem * This will be apparent in the FTP session log. If *
rem * this is the case, set QVERBOSE= the opposite value *
rem * it currently has. *
rem * *
rem * Historical/Audit logging of file movement will be *
rem * sent to a generated file in the data directory of *
rem * receiving company. The file name will be: *
rem * *
rem * %9.integration.log where %9 is the doctype from *
rem * the post processing parm string *
rem * *
rem *************************************************************
rem * Defaults to set to customer appropriate values *
rem * *
rem * FTP Parms *
rem * *
rem * ftpuser ID of the OS/390 UserID for the FTP session *
rem * ftppw Password for the ID above *
rem * ftpaddr IP address or DNS name of target FTP Server *
rem * *
rem * GDG/DSN Parms *
rem * *
rem * dcbdsn The OS/390 MODEL DSCB Dataset (needed for GDG) *
rem * dsn The DSN or GDG Base (DSN without G0000V00) *
rem * lrecl The logical record length for the DSN *
rem * blksize The blocksize for the DSN *
rem * recfm The record format for the DSN *
rem * unit The unit esoteric name *
rem * type Type of SPACE unit (CYLINDERS, TRACKS, BLOCKS) *
rem * primary Primary space allocation for DSN *
rem * secondary Secondary space allocation for DSN *
rem * *
rem * Option Flags (YES or NO) to enable/disable features *
rem * *
rem * qverbose Do you want the verbose flag toggled? *
rem * qgdg Is this a GDG? (supports creating a (+1) only) *
rem * qascii Do you want an ASCII transfer? *
rem * qdebug Do you want FTP debug turned on? *
rem * qlrecl Do you need to specify the LRECL? *
rem * qblksize Do you need to specify the BLKSIZE? *
rem * qrecfm Do you need to specify the RECFM? *
rem * qspace Do you need to specify SPACE parameters? *
rem * qwrap Do you need to specify WRAPRECORD? *
rem * qpurge Do you want to purge the file after upload? *
rem * *
rem * Trace option set QMONITOR=a_valid_filename *
rem * *
rem * qmonitor Write debugging records at all monitor points *
rem * *
rem *************************************************************
rem * Options (set all to either YES or NO) *
rem *************************************************************
set qverbose=YES
set qgdg=YES
set qascii=YES
set qdebug=YES
set qlrecl=YES
set qblksize=YES
set qrecfm=YES
set qspace=YES
set qwrap=YES
set qpurge=YES
rem *************************************************************
rem * Logging Options (set valid file names) *
rem *************************************************************
set qmonitor=e:\ci40\data\monitor.txt
rem *************************************************************
rem * FTP signon and destination parameters *
rem *************************************************************
set ftpuser=ntuser
set ftppw=ntpass
set ftpaddr=hostname
rem *************************************************************
rem * OS/390 dataset characteristics *
rem *************************************************************
set dcbdsn=RZENUK.DSCB
set dsn=RZENUK.TEST.GDG
set lrecl=4096
set blksize=24576
set recfm=FB
set unit=SYSDA
set type=CYLINDERS
set primary=10
set secondary=1
rem *************************************************************
rem * DO NOT TOUCH ANYTHING BELOW THIS POINT *
rem *************************************************************
rem * Determine if QMONITOR is set and call TRACE *
rem *************************************************************
if DEFINED qmonitor call trace %0 %*
rem *************************************************************
rem * Ftpgood - "success" string to find in the %file%.ftplog *
rem *************************************************************
set file=%1
set ftpgood=successfully
shift
rem *************************************************************
rem * Generate the HISTFILE LOG name in the company directory *
rem * This parsing technique will scrape the path from %file% *
rem *************************************************************
for /f "delims=:\ tokens=1-4" %%a in ("%file%") do (
set histfile=%%a:\%%b\%%c\%%d\%9.integration.log
)
rem *************************************************************
rem * Is this a GDG? If so, append the (+1) to the DSN *
rem *************************************************************
if %qgdg%==YES set dsn=%dsn%(+1)
rem *************************************************************
rem * Pre-FTP logging *
rem *************************************************************
call intlog %file% %dsn%
rem *************************************************************
rem * Build the ftp put subcommand file in file %file%.ftpcmds *
rem *************************************************************
echo open %ftpaddr% > %file%.ftpcmds
if %qverbose%==YES echo verbose >> %file%.ftpcmds
echo user %ftpuser% %ftppw% >> %file%.ftpcmds
if %qascii%==YES (
echo ASCII >> %file%.ftpcmds
) else (
echo BINARY >> %file%.ftpcmds
)
if %qdebug%==YES echo debug 1 >> %file%.ftpcmds
if %qgdg%==YES echo quote site DCBDSN='%dcbdsn%' >> %file%.ftpcmds
if %qlrecl%==YES echo quote site LRECL=%lrecl% >> %file%.ftpcmds
if %qblksize%==YES echo quote site BLKSIZE=%blksize% >> %file%.ftpcmds
if %qrecfm%==YES echo quote site RECFM=%recfm% >> %file%.ftpcmds
if %qspace%==YES (
echo quote site UNIT=%unit% >> %file%.ftpcmds
echo quote site %type% >> %file%.ftpcmds
echo quote site PRIMARY=%primary% >> %file%.ftpcmds
echo quote site SECONDARY=%secondary% >> %file%.ftpcmds
)
if %qwrap%==YES echo quote site WRAPRECORD >> %file%.ftpcmds
echo put %file% '%dsn%' >> %file%.ftpcmds
echo quit >> %file%.ftpcmds
rem *************************************************************
rem * ENQ on the DSN if this is a GDG *
rem *************************************************************
if %qgdg%==YES call enq %dsn% %file%
rem *************************************************************
rem * Set the window title *
rem *************************************************************
title FTP in progress for for %file%
rem *************************************************************
rem * FTP command *
rem *************************************************************
ftp -n -s:%file%.ftpcmds > %file%.ftplog
rem *************************************************************
rem * DEQ the DSN if this is a GDG *
rem *************************************************************
if %qgdg%==YES call deq %dsn% %file%
rem *************************************************************
rem * Check to see if the FTP worked (look for ftpgood value) *
rem *************************************************************
type %file%.ftplog | find "%ftpgood%" > nul
if not errorlevel 1 (
set ftprc=GOOD
) else (
set ftprc=BAD
)
rem *************************************************************
rem * Scrape the actual DSN from the FTPLOG *
rem *************************************************************
type %file%.ftplog | find "Storing" > %file%.ftpdsn
for /f "tokens=5" %%a in (%file%.ftpdsn) do set ftpdsn=%%a
if %ftprc%==GOOD (
rem *************************************************************
rem * Log successful message *
rem *************************************************************
call intlog %file% SUCCESSFUL %ftpdsn%
rem *************************************************************
rem * cleanup - delete all ftpfile.* files *
rem *************************************************************
del %file%.ftpcmds
del %file%.ftplog
del %file%.ftpdsn
if %qpurge%==YES del %file%
) else (
call intlog %file% FAILED %file%.ftplog
)
rem *************************************************************
rem * exit *
rem *************************************************************


Glad that assignment is over,
Robert Zenuk
robz...@aol.com

0 new messages