IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Mainframe dataset listing to an output dsn


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ram5er

New User


Joined: 14 Jul 2006
Posts: 14
Location: Dallas, Texas

PostPosted: Wed Oct 03, 2007 3:13 am
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 03, 2007 3:16 am
Reply with quote

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Oct 03, 2007 6:00 am
Reply with quote

Use the ISPF service LMDLIST.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Oct 03, 2007 11:51 am
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 03, 2007 6:27 pm
Reply with quote

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

New User


Joined: 14 Jul 2006
Posts: 14
Location: Dallas, Texas

PostPosted: Wed Oct 03, 2007 8:02 pm
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 03, 2007 9:08 pm
Reply with quote

Hello,

Quote:
Does the LISTCAT extract dataset names that have been migrate1 or 2.
Yes.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Oct 04, 2007 5:29 pm
Reply with quote

Thanks Dick. icon_smile.gif


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

New User


Joined: 14 Jul 2006
Posts: 14
Location: Dallas, Texas

PostPosted: Sat Oct 06, 2007 3:16 am
Reply with quote

All, Thanks for your help....

One more question... Is there a way to exclude the gdg bases from the list?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Oct 06, 2007 7:49 am
Reply with quote

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

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Oct 08, 2007 12:49 pm
Reply with quote

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

New User


Joined: 14 Jul 2006
Posts: 14
Location: Dallas, Texas

PostPosted: Tue Oct 09, 2007 8:12 pm
Reply with quote

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

New User


Joined: 14 Jul 2006
Posts: 14
Location: Dallas, Texas

PostPosted: Tue Oct 09, 2007 8:14 pm
Reply with quote

You're correct I'll just ignore the GDG bases in the program. Thanks
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top