Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Mainframe dataset listing to an output dsn

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Mainframe dataset listing to an output dsn
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

Site Director


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

PostPosted: Wed Oct 03, 2007 3:16 am    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Oct 03, 2007 6:00 am    Post subject: Reply to: Mainframe dataset listing
Reply with quote

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

Senior Member


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

PostPosted: Wed Oct 03, 2007 11:51 am    Post subject: Re: Mainframe dataset listing to an output dsn
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

Site Director


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

PostPosted: Wed Oct 03, 2007 6:27 pm    Post subject:
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    Post subject: Reply to: Mainframe dataset listing to an output dsn
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

Site Director


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

PostPosted: Wed Oct 03, 2007 9:08 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Oct 04, 2007 5:29 pm    Post subject:
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    Post subject: Reply to: Mainframe dataset listing to an output dsn
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

Site Director


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

PostPosted: Sat Oct 06, 2007 7:49 am    Post subject:
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

Senior Member


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

PostPosted: Mon Oct 08, 2007 12:49 pm    Post subject:
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    Post subject: Reply to: Mainframe dataset listing to an output dsn
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    Post subject: Reply to: Mainframe dataset listing to an output dsn
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Mainframe Blocks to Tracks conversion upendrasri JCL & VSAM 1 Sat Nov 18, 2017 10:52 am
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts NDM 300 files from mainframe to linux shreya19 All Other Mainframe Topics 2 Thu Oct 26, 2017 11:40 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us