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

OMVS REXX listing mvs pds dataset

283 views
Skip to first unread message

Miranda, John

unread,
Jan 31, 2007, 10:46:07 AM1/31/07
to
I updated the subject field.

Is it possible to have a rexx script on the OMVS side list the pds
members of a file on the MVS side? If so, can you share how.
I'm finding information on using tso from a shell script but I would
like to stay with a rexx script on the OMVS side.

John M.

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

Paul Gilmartin

unread,
Jan 31, 2007, 10:53:31 AM1/31/07
to
In a recent note, Miranda, John said:

> Date: Wed, 31 Jan 2007 09:44:50 -0600


>
> Is it possible to have a rexx script on the OMVS side list the pds
> members of a file on the MVS side? If so, can you share how.
> I'm finding information on using tso from a shell script but I would
> like to stay with a rexx script on the OMVS side.
>

Use BPXWDYN() to allocate the data set with "dsorg(PO) recfm(F)
lrecl(256) blksize(256)" and read the directory blocks with
EXECIO and parse out the entries. Tedious but effective.

- or -

As of z/OS 1.4 there is an new-fangled flavor of "address TSO"
that supports running TSO commands from Rexx scripts lanched from
OMVS.

-- gil
--
StorageTek
INFORMATION made POWERFUL

McKown, John

unread,
Jan 31, 2007, 11:46:13 AM1/31/07
to
> -----Original Message-----
> From: TSO REXX Discussion List
> [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Miranda, John
> Sent: Wednesday, January 31, 2007 9:45 AM
> To: TSO-...@VM.MARIST.EDU
> Subject: [TSO-REXX] OMVS REXX listing mvs pds dataset
>
>
> I updated the subject field.
>
> Is it possible to have a rexx script on the OMVS side list the pds
> members of a file on the MVS side? If so, can you share how.
> I'm finding information on using tso from a shell script but I would
> like to stay with a rexx script on the OMVS side.
>
> John M.

I don't know that this is exactly what you really want, but it is a
start. It does execute on a UNIX shell.

/* rexx */
call outtrap data.
address tso "listds 'TSH009.PDS.CNTL' members"
call outtrap "OFF"
do i = 1 to data.0
if data.i = '--MEMBERS--' then leave
end
do j = i+1 to data.0
say j data.j
end

This does set up a parallel TSO environment

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential. It is for intended addressee(s) only. If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense. If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.

Robert Zenuk

unread,
Jan 31, 2007, 1:04:59 PM1/31/07
to

Robert Zenuk

unread,
Jan 31, 2007, 1:41:14 PM1/31/07
to
Here is a generic example that can test any TSO command:


/* REXX */
/* Purpose: Execute a TSO command from the USS sside */
/*-------------------------------------------------------------------*/
/* Syntax: tsocmd cmd */
/*-------------------------------------------------------------------*/
/* Parms: cmd - Any TSO command */
/* */
/*********************************************************************/
/* Change Log */
/* */
/* Author Date Reason */
/* -------- --------- ----------------------------------------- */
/* R. Zenuk Sep 2005 Initial Creation */
/* */
/*********************************************************************/
/* Accept command */
/*********************************************************************/
parse arg tsocmd
/*********************************************************************/
/* Display a startup message */
/*********************************************************************/
say 'Executing TSO command:' tsocmd
/*********************************************************************/
/* Address TSO and execute the command */
/*********************************************************************/
address TSO tsocmd
EXITRC = RC
/*********************************************************************/
/* Display a shutdown message */
/*********************************************************************/
shutdown: say 'TSO Command:' tsocmd 'RC='EXITRC
exit(EXITRC)


$ tsocmd.rex time
Executing TSO command: time
IKJ56650I TIME-01:05:56 PM. CPU-00:00:00 SERVICE-250 SESSION-00:00:01
JANUARY 31 ,2007
TSO Command: time RC=0
$ tsocmd.rex listds cpsmwto members
Executing TSO command: listds cpsmwto members
OPSROZ.CPSMWTO
--RECFM-LRECL-BLKSIZE-DSORG
FB 80 27920 PO

--VOLUMES--
TTSIZ8
--MEMBERS--
@DOWN
@UP
CPSMWTO
CPSMWTOO
CS0A
CS01
CS05
CS06
CS1A
CS11
CS15
CS16
CS21
CS26
CS31
CS36
CS46
CS56
WTOPROC
TSO Command: listds cpsmwto members RC=0

Frank Clarke

unread,
Jan 31, 2007, 9:22:29 PM1/31/07
to
On 31 Jan 2007 07:53:31 -0800, gil...@UNIX.STORTEK.COM (Paul Gilmartin) wrote:
<200701311553....@sanitas.stortek.com>

>Use BPXWDYN() to allocate the data set with "dsorg(PO) recfm(F)
>lrecl(256) blksize(256)"

Not "PO", "PS".


(change Arabic number to Roman numeral to email)

Sergio Lima

unread,
Feb 1, 2007, 2:05:59 PM2/1/07
to
John,

I have none experience about UNIX Shell, so, I call the Shell programmer here, and say to him for execute your little program, but the result is :

# ./teste
./teste: /TT_DB: cannot execute
./teste[2]: call: not found
./teste[3]: address: not found
./teste[4]: call: not found
./teste[5]: syntax error at line 5 : `do' unexpected


What can i do for UNIX Shell understand that is a program ?

Regards

Sergio Lima Costa
System Consultant
Caixa Economica Federal
Sao Paulo - Brasil
"McKown, John" <John....@HEALTHMARKETS.COM> escreveu:


__________________________________________________
Fale com seus amigos de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/

Sergio Lima

unread,
Feb 1, 2007, 4:59:03 PM2/1/07
to
Hello John, and other members.

Sorry about my last question, I don't understood very well, but now is ok.
I tried run a REXX program in a "native" UNIX machine, not under OMVS.
I think that need write a REXX program under "native" UNIX Machine, I can use Regina / REXX .
I wrote a litte rexx program using OEDIT under OMVS like this :

File Edit Edit_Settings Menu Utiliti

EDIT /U/teste
****** ***************************** Top o
000001 /* rexx */
000002 say 'enter a number'
000003 pull number
000004 say 'You type ====> ' number
000005 exit
****** **************************** Bottom


And execute this :

P991107:/U>
P991107:/U>oedit teste
P991107:/U>teste
enter a number
1000
You type ====> 1000
P991107:/U>

Thanks very much, and my apologies.



Sergio Lima Costa
System Consultant
Caixa Economica Federal

Sao Paulo - Brazil

"McKown, John" <John....@HEALTHMARKETS.COM> escreveu:

__________________________________________________
Fale com seus amigos de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/

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

Bill Schoen

unread,
Feb 1, 2007, 7:14:06 PM2/1/07
to
Try the pdsdir tool from the USS tools page
http://www-03.ibm.com/servers/eserver/zseries/zos/unix/bpxa1ty2.html

Bill Schoen

Miranda, John

unread,
Feb 1, 2007, 7:16:46 PM2/1/07
to
Been there. Sometimes still there.


John Miranda
Host Build Mgmt
CCRM
(210) 912-5134

0 new messages