Re: REXX:trying to write a rexx interface with rmm

2012-01-10 Thread Victor Zhang
Hi all,
use following rexx code to achieve what I want:
run_under_mvs = 1   
vol_cnt. = 0 /*vol cnt*/
vol_seq. = 0 /*vol seq*/
vol_name. = 0 /*volser*/
dsn_name. = 0   
rmm_cont = ''   
ix = 1  
debug = 1   
sysauth.edgdate = "EUROPEAN"/* Tell RMM TSO command to return */
/* output as REXX variables and   */
/* dates in EUROPEAN (DD/MM/) */
/* format.*/
save_prompt = prompt("OFF") /* Turn PROMPTing off.*/
save_msg= msg("OFF")/* Turn messages off. */
/* Get information for data sets  */
/* on the volume  */
address "TSO" "RMM SD D("dsn") OWNER(*) SEQ(*) LIMIT(1) ",  
"STatus(PRIVATE) CONTINUE("rmm_cont")"  
junk = msg(save_msg)/* Restore previous message status*/

if debug = 1 then do
  say "edg@rc=" edg@rc  
  say "rc=" rc  
  say "edg@dsn.0=" edg@dsn.0
  say "edg@cont=" edg@cont  
end 
If (rc = 0) ! ((rc=4)&(edg@rc=2))  then do  
do while (rc = 0) ! ((rc=4)&(edg@rc=2)) 
  Do dataset = 1 to edg@dsn.0   
if debug = 1 then do
  say "edg@dsn=" edg@dsn.dataset
  say "edg@oxd=" edg@oxd.dataset
  say "edg@xdt=" edg@xdt.dataset
  say "edg@cdt=" edg@cdt.dataset
  say "edg@cdtj=" edg@cdtj.dataset  
  say "edg@cjbn=" edg@cjbn.dataset  
  say "edg@ctm=" edg@ctm.dataset
  say "edg@own=" edg@own.dataset
  say "edg@vol=" edg@vol.dataset
  say "edg@rc=" edg@rc  
  say "rc=" rc  
  say "edg@dsn.0=" edg@dsn.0
end 
vol_name.ix = edg@vol.dataset   
dsn_name.ix = edg@dsn.dataset   
ix = ix + 1 
  end   
  rmm_cont = edg@cont   
  if rmm_cont <> '' then
address "TSO" "RMM SD D("dsn") OWNER(*) SEQ(*) LIMIT(1)",   
" STatus(PRIVATE) CONTINUE("rmm_cont")" 
  end /* do while*/ 
  vol_name.0 = ix -1
  dsn_name.0 = ix -1
  say "ix=" ix  
  /* save vol_seq and vol_cnt */
  /* issue sd with chain */ 
  do ix=1 to vol_name.0 
vol=vol_name.ix 
if debug = 1 then do
  say "vol=" vol_name.ix
  

Re: REXX:trying to write a rexx interface with rmm

2012-01-09 Thread Martin Packer
As a matter of interest, Mike, how old are the DFSORT / ICETOOL reports? I 
don't know how others feel about this but it might be worthwhile my (I 
can't speak for Frank) taking a look at them some time. (Kind of how I 
feel about RACFICE, for example.)

Cheers, Martin

Martin Packer,
Mainframe Performance Consultant, zChampion
Worldwide Banking Center of Excellence, IBM

+44-7802-245-584

email: martin_pac...@uk.ibm.com

Twitter / Facebook IDs: MartinPacker
Blog: 
https://www.ibm.com/developerworks/mydeveloperworks/blogs/MartinPacker



From:
Mike Wood 
To:
IBM-MAIN@bama.ua.edu, 
Date:
09/01/2012 14:58
Subject:
Re: REXX:trying to write a rexx interface with rmm
Sent by:
IBM Mainframe Discussion List 



Victor,  There are good examples of using rexx with the rmm subcommands. 
Did you see this section 
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt2r390/9.5?SHELF=EZ2ZBK0K&DT=20100623164750
 
in the rmm MURM? It points to EDGXMP1 and EDGXMP2. They should how to use 
searchxxx sucommands and issue subsequent listxxx subcommands.

In addition the execs used in the rmm dialog have many more examples.

As others have said, if you can avoid writing an exec - this may be 
better. See the rmm Reporting book for standard repost and customisable 
rexx reports that can be used. Also the report generator allows very easy 
customization of existing sample reports which are produced using DFSORTs 
ICETOOL.

Mike Wood

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN








Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN


Re: REXX:trying to write a rexx interface with rmm

2012-01-09 Thread Mike Wood
Victor,  There are good examples of using rexx with the rmm subcommands. Did 
you see this section 
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt2r390/9.5?SHELF=EZ2ZBK0K&DT=20100623164750
 in the rmm MURM? It points to EDGXMP1 and EDGXMP2. They should how to use 
searchxxx sucommands and issue subsequent listxxx subcommands.

In addition the execs used in the rmm dialog have many more examples.

As others have said, if you can avoid writing an exec - this may be better. See 
the rmm Reporting book for standard repost and customisable rexx reports that 
can be used. Also the report generator allows very easy customization of 
existing sample reports which are produced using DFSORTs ICETOOL.

Mike Wood

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN


Re: REXX:trying to write a rexx interface with rmm

2012-01-09 Thread Gerard Nicol
   RE: REXX:trying to write a rexx interface with rmm

Victor,

Having read the replies to your question so far I am reminded of the saying
"when all you have is a hammer everything looks like a nail".

You want to write a REXX to automate something, right? You don’t want to
run JCL, you don’t want to use ISPF, you don’t want to learn assembler to
call the RMM API, right?

Here's the deal.

There is no vanilla way of pattern matching in any of the mainframe
programming languages. There is a C function called fnmatch which comes
close, but it uses different logic to the traditional mainframe pattern
matching,

If you want to pattern match in REXX take a look at the REXX function
package I submitted to the CBT tape a decade ago *
http://www.bsp-gmbh.com/turnkey/cookbook/cbt429.html#File_324*<http://www.bsp-gmbh.com/turnkey/cookbook/cbt429.html#File_324>

If you are willing to live with only cataloged datasets you don't need RMM
just use the catalog. I think there is a catalg reading function (with
pattern matching support) in the same REXX function pack.

If not you can call listcat and outttrap the results.

If you need uncataloged datasets there is the RMM LISTDATASET command, but
it appears to not support wildcards.

Your best bet appears to be to use the RMM SEARCHDATASET command as it
appears to support generic dataset names, although something tells me  you
might still need to do some filtering.

Outtrap is your best friend!

*** <<...>> *

***Gerard Nicol*

***CEO*

PO Box 370505

Denver Colorado 80237

Phone: +1 (720) 583-8880 (ext 3002)

Cell: +1 (720) 789-0315

E ***gerard.ni...@tapetrack.com* 

W ***www.tapetrack.com* <http://www.tapetrack.com/>



***“Lead,  follow or get out of the way. – Thomas Paine”*

  -Original Message-
From: IBM Mainframe Discussion List
[mailto:IBM-MAIN@bama.ua.edu]
On Behalf Of Victor Zhang
Sent: Sunday, January 08, 2012 8:09 PM
To: IBM-MAIN@bama.ua.edu
Subject: REXX:trying to write a rexx interface with rmm

Hello experts,

I am trying to write a simple rexx program interfacing with rmm.

Input is dsn, with can contain **,%

output is the volumes that the dsn occupied.

I searched rmm manual and found SD is best preferred method to do this.

However, I have several questions:

Is there any existing code out there in web, so that I don't reinvent the
wheel.

how should I differenciate multi-volume datasets and duplicate datasets
Should multi-volume datasets have same followning rmm vars:

EDG@DSN,

EDG@OXD,EDG@XDT

EDG@CDT,EDG@CDTJ,

EDG@CJBN,EDG@CTM(?),

EDG@OWN

Anyone example of continue parameter?

Regards

Victor

--

For IBM-MAIN subscribe / signoff / archive access instructions, send email
to lists...@bama.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN


Re: REXX:trying to write a rexx interface with rmm

2012-01-09 Thread Gonzalo Cengotita
Yes, you can modify the report to include the fields you want, and you can
save the JCL if you want to make another changes
You can find all the reports in the rmm panels, I use the option "5.R"
(Command/Reports), then option "1"

Regards

Gonzalo Cengotita




2012/1/9 Victor Zhang 

> Gonzalo,
> Thanks for your reply.
> What I want to achieve is:
> Input:
> dsn name, that can contain ** or * or %
> Output:
> volser,xxx,yyy
> where xxx is volume count number and yyy is volume sequence number.
> For example for a dsn spanned 3 volume, the report will end with:
> vol001,  3,  1
> vol001,  3,  2
> vol001,  3,  3
>
> Is it possible to customize IBM supplied job?
>
> regards
> Victor
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN
>



-- 
--
  Gonzalo Cengotita Quirce
--

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN


Re: REXX:trying to write a rexx interface with rmm

2012-01-09 Thread Victor Zhang
Gonzalo,
Thanks for your reply.
What I want to achieve is:
Input:
dsn name, that can contain ** or * or %
Output:
volser,xxx,yyy
where xxx is volume count number and yyy is volume sequence number.
For example for a dsn spanned 3 volume, the report will end with:
vol001,  3,  1
vol001,  3,  2
vol001,  3,  3

Is it possible to customize IBM supplied job?

regards
Victor

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN


Re: REXX:trying to write a rexx interface with rmm

2012-01-09 Thread Gonzalo Cengotita
It must be a rexx? If not, there are rmm reports that use the extract file,
you need to generate Extended Extract Records, an I think the EDGGR11 (List
Multivolume and Multifile) should be appropriate. There is a very useful
field for your purpose, the XVMDMVID, which is an ID number equal for all
the multi-dataset or multi-volume group. You can group the output by this
field and you will get what you want, I think.

If it must be a rexx I think that after using SD you should use LV with
every volume found and look at some fields, like EDG@SEQ, EDG@DSC, maybe
EDG@NVL and EDG@PVL (and others i don't remember right now), but this
method is very expensive in terms of memory (and maybe CPU too) unless you
have a small number of volumes in your shop. I'd rather use the sort.

I would not use the creation date since you can have two datasets created
the same day, or a multi dataset with the same name the same day. The same
with the jobname or the owner

I hope it helps, regards

Gonzalo Cengotita



2012/1/9 Victor Zhang 

> Hello experts,
> I am trying to write a simple rexx program interfacing with rmm.
> Input is dsn, with can contain **,%
> output is the volumes that the dsn occupied.
> I searched rmm manual and found SD is best preferred method to do this.
> However, I have several questions:
> Is there any existing code out there in web, so that I don't reinvent the
> wheel.
> how should I differenciate multi-volume datasets and duplicate datasets
> Should multi-volume datasets have same followning rmm vars:
> EDG@DSN,
>
> EDG@OXD,EDG@XDT
>
> EDG@CDT,EDG@CDTJ,
> EDG@CJBN,EDG@CTM(?),
> EDG@OWN
>
> Anyone example of continue parameter?
>
> Regards
> Victor
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN
>



-- 
--
  Gonzalo Cengotita Quirce
--

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN


REXX:trying to write a rexx interface with rmm

2012-01-08 Thread Victor Zhang
Hello experts,
I am trying to write a simple rexx program interfacing with rmm.
Input is dsn, with can contain **,%
output is the volumes that the dsn occupied.
I searched rmm manual and found SD is best preferred method to do this.
However, I have several questions:
Is there any existing code out there in web, so that I don't reinvent the wheel.
how should I differenciate multi-volume datasets and duplicate datasets
Should multi-volume datasets have same followning rmm vars:
EDG@DSN,

EDG@OXD,EDG@XDT

EDG@CDT,EDG@CDTJ,
EDG@CJBN,EDG@CTM(?),
EDG@OWN

Anyone example of continue parameter?

Regards
Victor

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN