MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Retrieving the dataset names using REXX
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Mon May 09, 2011 10:16 am    Post subject: Retrieving the dataset names using REXX Reply with quote

Is it possible to retrieve the datasets from a JOB(jcl) using rexx.

Thanks in advance..Smile
Back to top
View user's profile Send private message
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Mon May 09, 2011 10:30 am    Post subject: Re: Retrieving the dataset names using REXX Reply with quote

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
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Mon May 09, 2011 10:51 am    Post subject: Reply with quote

yes...
Here is a sample, assuming that the DD ISPTABL is allocated.

/* REXX */
DDINFO = LISTDSI("ISPTABL" "FILE")
SAY SYSDSNAME
RETURN
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Mon May 09, 2011 10:56 am    Post subject: Reply with quote

ok, I mis-interpreted what you were asking. I assumed you meant a running job and not a scan of jobs.
Back to top
View user's profile Send private message
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Mon May 09, 2011 11:20 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon May 09, 2011 11:33 am    Post subject: Reply with quote

harsha vardhan reddy,

Check this link

http://www.listserv.uga.edu/cgi-bin/wa?A2=ind9605&L=rexxlist&P=26392

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Tue May 10, 2011 9:48 am    Post subject: Reply with quote

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..Smile
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue May 10, 2011 10:18 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Tue May 10, 2011 10:52 am    Post subject: Reply with quote

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
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Tue May 10, 2011 2:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Tue May 10, 2011 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed May 11, 2011 1:06 am    Post subject: Reply with quote

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
View user's profile Send private message
stefan
Beginner


Joined: 20 Nov 2003
Posts: 41
Topics: 2
Location: Germany

PostPosted: Wed May 11, 2011 1:30 am    Post subject: Re: Retrieving the dataset names using REXX Reply with quote

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
View user's profile Send private message
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Wed May 11, 2011 11:38 am    Post subject: Reply with quote

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
View user's profile Send private message
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Wed May 11, 2011 11:48 am    Post subject: Re: Retrieving the dataset names using REXX Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group