View previous topic :: View next topic |
Author |
Message |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Mon Jul 28, 2003 12:48 am Post subject: Checking GDG Base |
|
|
In one REXX test at our shop, I was asked to write a REXX routine and would scan a PROC for GDGs and find out whether the GDG base has been created in a particular region or not.
I wrote the program but It had a problem in it. ie If only the GDG base is available in a region then the program would work fine. But if the GDG file contains some versions and if one or more of its versions are migrated the program fails to say whether it the GDG base is available or not.
I just used the SYSDSN command and I passed the GDG base name to it. But if one/more versions of the GDG are migrated then the SYSDSN command tries to recall the versions and also when I display the value returned by the SYSDSN command it says
Code: |
ERROR PROCESSING REQUESTED DATASET
|
How do I resolve this issue in REXX. I tried to use LISTDSI function with NORECALL parameter. But it didn't work out when I passed the GDG base to it. It ended with a return code of 2 and reason code of 16.
I should be able to detect the presence of GDG base without recalling its migrated versions.
Please help me to resolve this issue
Thanks |
|
Back to top |
|
 |
taltyman JCL Forum Moderator

Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Mon Jul 28, 2003 10:51 am Post subject: |
|
|
try
LISTC ENT('your.gdg.base')
and parse the result looking for GDG BASE |
|
Back to top |
|
 |
Mike Beginner

Joined: 03 Dec 2002 Posts: 114 Topics: 0 Location: Sydney, Australia
|
Posted: Mon Jul 28, 2003 5:22 pm Post subject: |
|
|
here's part of a routine that I use to create a GDG base if one doesn't exist, variable cds contains the GDG base name :-
Code: | x = OutTrap("lc.","*")
ADDRESS TSO "LISTC ENTRY('"cds"') GDG"
x = OutTrap("OFF")
Parse Var lc.1 m1 .
If m1 = "GDG" Then Return 0
Say "Creating GDG BASE "cds
ADDRESS TSO "DEFINE GDG (NAME('"cds"') NEMP SCRATCH LIMIT(20)"
|
_________________ Regards,
Mike. |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Jul 29, 2003 7:13 am Post subject: |
|
|
Thanks Mike and Taltyman,
Its working fine now.
Thanks a lot. |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Thu Feb 12, 2004 8:46 am Post subject: |
|
|
Somebody asked me how to get latest version of GDG in REXX and a simple modification of Mike's code works -
Code: |
/* REXX to get latest version of GDG
*/
gdg_base = 'GDG.ABC.DESTROY'
x = outtrap('l.')
address TSO "LISTC ENT('"gdg_base"')"
x = outtrap("OFF")
n = l.0 - 1
say word(translate(l.n,' ','-'),2)
exit
|
|
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Sat Feb 21, 2004 7:11 am Post subject: |
|
|
Thanks a lot dibakar. I was the one who asked that question longggggg back. Even I forgot about that. Thanks for helping me out... |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Mon Feb 23, 2004 12:34 am Post subject: |
|
|
Thanks Phantom, but I was referring to one of my colleague who asked me this question recently, through an email and not through this post.
Though I know neither him nor you, still I beleive you two are not same because then he would have posted the question here instead of asking me. |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Mon Feb 23, 2004 2:46 pm Post subject: |
|
|
Phantom,
I hope you have considered these:
Quote: | SYSDSN does not directly support data that is on tape. |
Quote: | LISTDSI does not directly support data that is on tape. |
_________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
|
|