View previous topic :: View next topic |
Author |
Message |
vaishali Beginner
Joined: 04 Mar 2005 Posts: 3 Topics: 1
|
Posted: Fri Mar 04, 2005 5:36 pm Post subject: Executing LISTDS from REXX |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Mar 04, 2005 8:37 pm Post subject: |
|
|
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 |
|
|
vaishali Beginner
Joined: 04 Mar 2005 Posts: 3 Topics: 1
|
Posted: Fri Mar 04, 2005 11:47 pm Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sat Mar 05, 2005 3:50 pm Post subject: |
|
|
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 |
|
|
Steve Coalbran Beginner
Joined: 09 Mar 2005 Posts: 22 Topics: 0 Location: Stockholm, Sweden
|
Posted: Wed Mar 09, 2005 7:42 am Post subject: |
|
|
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 |
|
|
vaishali Beginner
Joined: 04 Mar 2005 Posts: 3 Topics: 1
|
Posted: Thu Mar 31, 2005 12:20 pm Post subject: Last Modified Date of a Dataset |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Mar 31, 2005 6:33 pm Post subject: |
|
|
I don't think it is stored anywhere. |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Mar 31, 2005 7:40 pm Post subject: |
|
|
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 |
|
|
|
|