View previous topic :: View next topic |
Author |
Message |
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Mon May 09, 2011 10:16 am Post subject: Retrieving the dataset names using REXX |
|
|
Is it possible to retrieve the datasets from a JOB(jcl) using rexx.
Thanks in advance.. |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Mon May 09, 2011 10:30 am Post subject: Re: Retrieving the dataset names using REXX |
|
|
Hi all,
Am new to REXX. I want to develop a REXX tool, which retrieves the dataset names from an jcl(Input & output).
This is mainly to save time by manually going through the jcl & make a note of input & output datasets. Because, we would run many jobs and we need to do the same work fro all the jobs.. |
|
Back to top |
|
|
taltyman JCL Forum Moderator
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Mon May 09, 2011 10:51 am Post subject: |
|
|
yes...
Here is a sample, assuming that the DD ISPTABL is allocated.
/* REXX */
DDINFO = LISTDSI("ISPTABL" "FILE")
SAY SYSDSNAME
RETURN |
|
Back to top |
|
|
taltyman JCL Forum Moderator
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Mon May 09, 2011 10:56 am Post subject: |
|
|
ok, I mis-interpreted what you were asking. I assumed you meant a running job and not a scan of jobs. |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Mon May 09, 2011 11:20 am Post subject: |
|
|
Hi tatlyman,
I need to scan the jcl and retrieve the datasets(input & output).
I can able to read the jcl from spool and written it to an output dataset. Now i need to read that dataset i.e the jcl and retrieve the datasets from it.. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Tue May 10, 2011 9:48 am Post subject: |
|
|
Hi kolusu,
Thanks fro the quick response and the link provided..
I am not to understand from where exactly it is retrieving the datasets..
Can we scan the jcl & retrieve the datasets... Is there any other approach to develop that kind of tool..
Thanks in advance.. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue May 10, 2011 10:18 am Post subject: |
|
|
harsha vardhan reddy wrote: | I am not to understand from where exactly it is retrieving the datasets.. |
harsha vardhan reddy,
The link provided is a rexx exec which scan all the DD names allocated to your TSO session.
did you miss reading this initial comment in the rexx exec?
Code: |
/*********************************************************************/
/* THIS EXEC FIND THE DDNAMES & ASSOCIATED DSN'S ALLOCATED FOR A YOUR*/
/* TSO SESSION. IT WORKS EITHER FROM TSO OR UNDER ISPF CONTROL. */
|
harsha vardhan reddy wrote: | Can we scan the jcl & retrieve the datasets... Is there any other approach to develop that kind of tool.. |
If you are asking for a JCLSCAN tool , then there are more than a handful tools which provide you the cross references and also list the DSN names along with JCL syntax checking. Why do you want to re-invent the wheel?
Kolusu |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Tue May 10, 2011 10:52 am Post subject: |
|
|
I have read that thing..
As i said i am trying to develop it in order to save my time for my project as i need to go through each & every job and make a note of datasets(input & output) corresponding to their jobs..
Is there any sample code which can help me in developing that.. |
|
Back to top |
|
|
taltyman JCL Forum Moderator
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Tue May 10, 2011 2:56 pm Post subject: |
|
|
I'm not aware of any sample or free code that does what you want. There are commercial available tools. You could write some code in rexx or the language of your choice but it would not be trivial. It may be better to learn your application since all of its files should be or have been documented at one time. I know.... that may be a fairy tale. |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Tue May 10, 2011 7:30 pm Post subject: |
|
|
Thats fine..
I have started already working on it..
Am getting struck how to read a jcl & search for a value in it, like by making use of EXECIO i could able to read line by line what i need is how to search for DSN or DISP in this...
Thanks in advance.. |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed May 11, 2011 1:06 am Post subject: |
|
|
harsha vardhan reddy,
back up a minute and tell us exactly what kind of ds you are attempting to read,
and what you want to do with it.
it could be as easy as read the file to stem, check each stem element for existance of 'DSN' and going from there. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
stefan Beginner
Joined: 20 Nov 2003 Posts: 41 Topics: 2 Location: Germany
|
Posted: Wed May 11, 2011 1:30 am Post subject: Re: Retrieving the dataset names using REXX |
|
|
harsha vardhan reddy wrote: | I want to develop a REXX tool, which retrieves the dataset names from an jcl(Input & output). |
I'm not sure if I understood you correctly as I'm not a native speaker of English, but maybe you're in search of some kind of JCL scanner extracting dataset names, program names etc.
Years ago I've developed an ISPF edit macro which analyzes JCL and displays its information in an ISPF table format. Maybe you could have a look at it as a starting point for your own solution.
You'll find the code and a sample screenshot at the very bottom of this web site: http://sites.google.com/site/schlabb/home/code-snippets/edit-utilities
Hope this helps. _________________ Stefan
There are 10 types of people in the world: Those who understand binary, and those who don't. |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Wed May 11, 2011 11:38 am Post subject: |
|
|
Hi dbzTHEdinosauer,
Some datasets which are going to be created when we run that particular job & some input files(datasets) for that job to kick start...
By making use of stem i can able to read the DSN parameters, now i need to check if that particular data set is input or output for that jcl.. |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Wed May 11, 2011 11:48 am Post subject: Re: Retrieving the dataset names using REXX |
|
|
Hi stefan,
The link which was provided by you is not any more available i think..
Yes stefan similar to that.. Not exactly for scanner but it needs to read the jcl as input file & could retrieve the datasets from that.. |
|
Back to top |
|
|
|
|