View previous topic :: View next topic
|
Author |
Message |
ram5er
New User
Joined: 14 Jul 2006 Posts: 14 Location: Dallas, Texas
|
|
|
|
What would be the best way to scan the catalog for high level nodes and list all datasets matching these nodes to a mainframe output dsn. For example... (test.dummy.data.*). I would like to scan the catalog for these 3 nodes and any that match need to write to a flat file.
Result output.
test.dummy.data.file1
test.dummy.data.file2
test.dummy.data.file3
test.dummy.data.file4
test.dummy.data.file5 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You could use IDCAMS/LISTCAT to do what you want.
You could also use tso/ispf (typically 3.4) and save the output to a file. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Use the ISPF service LMDLIST. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
ram5er wrote: |
(test.dummy.data.*). I would like to scan the catalog for these 3 nodes and any that match need to write to a flat file. |
Hi,
In your query, You used the word 'nodes', what does it reffer to ? I'm bit confused here.
To explain 'test.dummy.data.*', I would have used High Level Qualifier to reffer 'test', Second Level Qualifier to reffer 'dummy'..& so on... . Did you want to say this only..or I'm wandering in some other world? Please clarify. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Anuj,
Nodes are what the "pieces" of a dataset name are sometimes called. It is the same sort of thing as hlq, etc.
In test.dummy.data, the nodes are:
test
dummy
data |
|
Back to top |
|
|
ram5er
New User
Joined: 14 Jul 2006 Posts: 14 Location: Dallas, Texas
|
|
|
|
I think the idcam/listcat would probably work for me since I am running this process in batch. However, I was thinking of using Fileaid/batch, are there any advantages/disadvantages using idcams rather than Fileaid/batch.
Also, Does the LISTCAT extract dataset names that have been migrate1 or 2. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Does the LISTCAT extract dataset names that have been migrate1 or 2. |
Yes. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Thanks Dick.
Hi ram5er,
Did you get the solution? If no, try this
Code: |
//JS010 EXEC PGM=IDCAMS,REGION=2M
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT LVL(test.dummy.data) ALL
/* |
|
|
Back to top |
|
|
ram5er
New User
Joined: 14 Jul 2006 Posts: 14 Location: Dallas, Texas
|
|
|
|
All, Thanks for your help....
One more question... Is there a way to exclude the gdg bases from the list? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What do you have in mind?
I'm probably missing something. . . . but when you process the file you create via LISTCAT, can you not just ignore entries that do not end with GnnnnVnn? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Quote: |
All, Thanks for your help.... |
Did you get the answer..please share with us to complete this thread.
About your second query, as Dick asked, can you please provide bit more explantion. |
|
Back to top |
|
|
ram5er
New User
Joined: 14 Jul 2006 Posts: 14 Location: Dallas, Texas
|
|
|
|
I don't want to exclude the generation datasets G0001V00 just the gdg bases. Here's a listing of what I am trying to get... Can LISTCAT get this info.
GDG BASE ------ test.dummy.data <== exclude
NON-VSAM ------ test.dummy.data.g0001v00
NON-VSAM ------ test.dummy.data.g0002v00
NON-VSAM ------ test.dummy.data.g0003v00
NON-VSAM ------ test.dummy.data.g0004v00 |
|
Back to top |
|
|
ram5er
New User
Joined: 14 Jul 2006 Posts: 14 Location: Dallas, Texas
|
|
|
|
You're correct I'll just ignore the GDG bases in the program. Thanks |
|
Back to top |
|
|
|