Page 1 of 2

Query for Rexx Code

PostPosted: Wed Nov 07, 2012 12:24 pm
by Sonal C
Hi, I am new to Rexx. I want to reetrive the dataset names present in Master catalog. Anybody can help me please?

Re: Query for Rexx Code

PostPosted: Wed Nov 07, 2012 12:36 pm
by Pandora-Box
Please define Mastor catalog for further inputs

Re: Query for Rexx Code

PostPosted: Wed Nov 07, 2012 12:41 pm
by Sonal C
I am sorry but i didn't got your question. As far as I know Mastor Catalog is the list of datasets which we can see using option 3.4 in ISPF panel. I want the list of all datasets present there in 1 PS file. how can I go for it using Rexx?

Thank you for your help.

Re: Query for Rexx Code

PostPosted: Wed Nov 07, 2012 1:30 pm
by Pandora-Box
Probably you need to check here http://ibmmainframes.com/about20708.html

So once you receive the list for the qualifier you can write them to output file

Re: Query for Rexx Code

PostPosted: Wed Nov 07, 2012 2:27 pm
by enrico-sorichetti
search here
http://ibmmainframes.com/
using
IGGCSI00 for the keyword
and
expat* for the Author

Re: Query for Rexx Code

PostPosted: Wed Nov 07, 2012 2:40 pm
by mongan
You should define your requirements more. You can actually get what you want using the IDCAMS utility, so why Rexx?

Re: Query for Rexx Code

PostPosted: Wed Nov 07, 2012 2:48 pm
by Sonal C
Thank you all for your response. I have to write the program in Rexx as per my project requirement. I will go through links provided by you. If I will face any issue or if I can find the solution I will contact you people again.

Thanks again.

Re: Query for Rexx Code

PostPosted: Wed Nov 07, 2012 3:37 pm
by Sonal C
Pandora-Box wrote:Probably you need to check here http://ibmmainframes.com/about20708.html

So once you receive the list for the qualifier you can write them to output file


Hi Pandora,

i got small code from the link given by you.
/* REXX */
"ISPEXEC LMDINIT LISTID(idv) LEVEL(A*)"
Do Forever
"ISPEXEC LMDLIST LISTID("idv") OPTION(LIST) DATASET(dsvar)"
If rc = 0 Then Say "'"dsvar"'"
Else Leave
End
"ISPEXEC LMDLIST LISTID("idv") OPTION(FREE)"

Can you please explain me the use of DSVAR? I mean I am not getting the flow of code. Or can you please suggest me any book which is better for beginners.

Thank you.

Re: Query for Rexx Code

PostPosted: Wed Nov 07, 2012 3:55 pm
by Akatsukami
Sonal C wrote:Thank you all for your response. I have to write the program in Rexx as per my project requirement.

You might look for another job whilst you're at it, since currently you have an incompetent moron of a team lead who assigns a unqualified person to do a redundant task...not a promising situation.

Re: Query for Rexx Code

PostPosted: Wed Nov 07, 2012 4:00 pm
by enrico-sorichetti
I have to write the program in Rexx as per my project requirement.

what kind of idiot/moron/(add as many as You want) project leader You got there...
assigning a task to somebody who does not have the skill to carry it along :evil:

Just pointing out that You are the innocent victim here

for the docs and resources

not the latest ones but more than enough to get You started ..

TSO/REXX
http://publibz.boulder.ibm.com/cgi-bin/ ... s/IKJ4BK90

ISPF
http://publibz.boulder.ibm.com/cgi-bin/ ... s/ISPZPM70

for the mother of all manuals ( IBM )
http://www-03.ibm.com/systems/z/os/zos/ ... index.html

and navigate to the bookshelves for Your zOS level

for an insight of IGGCSI00 usage and a GOOD example
see ...

 VIEW     SYS1.SAMPLIB                                       Row 00001 of 00004
 Command ===>                                                  Scroll ===> CSR
    Name     Prompt          Size    Created           Changed            ID
 . IGGCSILC
 . IGGCSIRX
 . IGGCSIVG
 . IGGCSIVS
   **End**


VIEW       SYS1.SAMPLIB(IGGCSIRX) - 01.00                  Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 000500 /* REXX */
 001000  /********************************************************************/
 001500  /*                                                                  */
 002000  /*       NAME: IGGCSIRX                                             */
 002500  /*DESCRIPTION: THIS REXX EXEC IS USED TO CALL THE CATALOG           */
 003000  /*             SEARCH INTERFACE.                                    */
 003500  /*      INPUT: FILTER KEY                                           */
 004000  /*     OUTPUT: DATA SETS NAMES AND VOLUMES                          */
 004062  /*                                                                  */


the above sample is working asis,
if it does not fit Your requirement is the best starting point to write Your own


the IGGCSI00 approach has the BIG advantage of not depending on ISPF facilities being available