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 

Executing LISTDS from REXX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
vaishali
Beginner


Joined: 04 Mar 2005
Posts: 3
Topics: 1

PostPosted: Fri Mar 04, 2005 5:36 pm    Post subject: Executing LISTDS from REXX Reply with quote

Hello,

I have a REXX script to execute and return the result of LISTDS. It works fine when I call it from a JCL but when called from a DB2 stored procedure the LISTDS command does not return anything. Below is a part of my script:

name = "'TEST.PDS.JCV(TESTJOB)'"
mname = strip(name)
var.0 = 0
x = OUTTRAP('var.');
"LISTDS" mname "HISTORY"
y = OUTTRAP('off')
exit var.0

It returns 0 when called from the stored procedure but returns 8(which is correct) when called from JCL.

Any help/suggestions would be greatly appreciated.

Thank you,
Vaishali
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Mar 04, 2005 8:37 pm    Post subject: Reply with quote

You can't be calling Rexx (IRXJCL) directly from JCL. You must be calling TSO (IKJEFT01) from JCL which in turn calls Rexx or this would not work. LISTDS is a TSO command. Unless TSO is active, the LISTDS command, will not be available. THere may be other ways to get what you want. What problem are you trying to solve exactly?
Back to top
View user's profile Send private message Visit poster's website
vaishali
Beginner


Joined: 04 Mar 2005
Posts: 3
Topics: 1

PostPosted: Fri Mar 04, 2005 11:47 pm    Post subject: Reply with quote

Yes, I am calling TSO (IKJEFT01) from JCL which calls my Rexx script. Sorry forgot to mention that.
I need to get the last modified date of a dataset. I am passing the dataset name from a Java program to a DB2 stored procedure. The DB2 stored procedure executes the Rexx script I mentioned.

Thank you.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat Mar 05, 2005 3:50 pm    Post subject: Reply with quote

Last modified date might be coming from the catalog. I think it is. If so, you can get the data by calling the catalog facilities. I'm sorry I can't remember the details exactly, but I do remember that there is a good sample in 'SYS1.SAMPLIB(IGGCSIRX)' that will get you the catalog entries. That part is easy, but determining the actual date from the raw data this returns will be a little more of a challenge. I just don't recall what the format is (if it is indeed there). Hopefully the comments in IGGCSIRX will give you a place to start some research. There may even be some execs out on the net that do this already (try google: both web and groups).

If the date is in the VTOC instead, you can look at the DSCB, but I only know how to do that through LISTDS like you are doing, so that doesn't help. You can write a very small assembler routine to do an OBTAIN (SVC 27) that will return that information. Again, there may be some out there already (also try xephon and the CBT tape www.cbttape.org)
Back to top
View user's profile Send private message Visit poster's website
Steve Coalbran
Beginner


Joined: 09 Mar 2005
Posts: 22
Topics: 0
Location: Stockholm, Sweden

PostPosted: Wed Mar 09, 2005 7:42 am    Post subject: Reply with quote

I don't believe the last modified date is available.
I tried to find this some time ago using both LISTDSI and ISPF Services DSINFO.
The two things you can get at dataset level are creation and last reference dates, not last modified date. For a library/pds you can also get this at member level.
BUT these last referenced dates are updated by reading as well as updating.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
vaishali
Beginner


Joined: 04 Mar 2005
Posts: 3
Topics: 1

PostPosted: Thu Mar 31, 2005 12:20 pm    Post subject: Last Modified Date of a Dataset Reply with quote

I am trying to write assembler code to get the last modified date of a dataset. I looked at the VTOC details to get this information. But as Steve mentioned the VTOC contains the last reference date and not the last modified date.

Is there some way I can compute the last modified date of a dataset in my assembler code?

Thank you,
Vaishali
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Mar 31, 2005 6:33 pm    Post subject: Reply with quote

I don't think it is stored anywhere.
Back to top
View user's profile Send private message Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Mar 31, 2005 7:40 pm    Post subject: Reply with quote

There is a bit of traffic on the IBM mainframes listserv (bit.listserv.ibm-main) concerning the same topic. From what I've been reading, no one has indicated that obtaining the last modified date is in any way possible without additional third-party management software.
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
Page 1 of 1

 
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