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

how to search dataset in all the volumes using batch


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Mon Sep 03, 2007 12:41 pm
Reply with quote

how to search a dataset in all the volumes of storage using batch job,

as we do in 3.4 to list a dataset whether its present in the disk or not, similarly i need to do it in batch mode.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Sep 03, 2007 1:23 pm
Reply with quote

If you are familiar with ISPF services, LMDLIST can do what you need.

O.
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Mon Sep 03, 2007 2:58 pm
Reply with quote

hi ofer,


Quote:

If you are familiar with ISPF services, LMDLIST can do what you need.


I checked that service but couldn't understand much about it.
can you please give that jcl which will do the same as i expect.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Sep 03, 2007 3:27 pm
Reply with quote

Sorry, you will have to write if by yourself... icon_mad.gif

O.
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Tue Sep 04, 2007 10:14 am
Reply with quote

hi Ofer,

Can you tell me how to get the listing of datasets in a flat file when we give some text like "test.dsds.*" in 3.4 of ispf.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Sep 04, 2007 10:58 am
Reply with quote

Again, the LMDLIST service is the answer for you.

O.
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Tue Sep 04, 2007 4:17 pm
Reply with quote

Hi ofer,

The link which you gave teaches how to do it using rexx, But i want it using only jcl.

why don't you give me the example jcl for it

36_2_18.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 04, 2007 6:03 pm
Reply with quote

Let' s straighten things up....

JCL itself does absolutely nothing, it is just a weird language to control/define the execution of "PROGRAMS"

Asking to do something with jcl has absolutely no meaning ...
trhu jcl You can invoke utilities, programs, and cause some side effects on datasets,
programs are the things which manipulate data.

One sample of such a task is to invoke IDCAMS to get a listing of catalogued datasets, or IEHLIST to get a listing of a disk VTOC.

Also...

asking on how to do something is a fair question, there are many ways of doing things,
asking on how to do something indicating the tool means that You have the skills to choose between different alternatives,
and You already used Your knowledge to choose the one which best suits Your needs.

It is just impossible to do what You ask for by using plain jcl.
You need to run/execute some kind of program ( an utility is just a program )...
it could be a system utility, some utility written by a third party
( fileaid for example -
I do not imply that fileaid might be used, it is just an example of a third party utility suite )

So please do not react strongly when somebody gives You a solution
which disagrees with Your expectations

Exploring The volume application of the ISMF main menu could be a good starting point
at least to get a volume list from where to proceed with further searches.

regards

e.s
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Tue Sep 04, 2007 7:11 pm
Reply with quote

hi enrico-sorichetti,

As you have said that using IEHLIST we can retrieve the datasets, But i need only the dataset names which ever qualify the pattern which i give and nothing other than that.

not only listing on the screen i want to put it in a sequential file.

Can you give me the solution now.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 04, 2007 7:39 pm
Reply with quote

if the datasets are cataloged, using the 3.4 and issuing a "save" command on the file list will save the dataset list into a sequiential file...

if the datasets are not cataloged, then You have to add to the 3.4 screen also the volume, and then same as before.

I do not have tso handy now but the ISMF dataset application will give You more freedom in selecting the dataset mask

Still if You want to run the process in batch Yo have to find some third party utility or write You own application

even better the DCOLLECT command will unload to a sequential file all the dataset info in one single shot, then with a simple application You can extract
all the info You need

the main point here is that if You want to collect info on uncataloged dataset, getting a list of the volumes might be a tedious task,
but if Your environment is full SMS then You should not have any uncataloged datasets, so the ISMF dataset application should give You whart You need

regards

e.s
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Wed Sep 05, 2007 9:36 am
Reply with quote

Hi enrico-sorichetti,



Quote:

issuing a "save" command on the file list will save the dataset list into a sequiential file...


Thanks for your response i gave save command on the command prompt,
the datasets getting saved in the ispf list

it is showing a message like below
Code:

                                                                             
  The listing of data sets was placed in the ISPF list data set. Lines have 
  been wrapped because the logical record length is less than 127 for RECFM F
  or 131 for RECFM V.                                                       
                                                                             


how to find the ispf list dataset now.

you have any idea about this.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Sep 05, 2007 11:04 am
Reply with quote

Press PF1 after SAVE to see the dataset name. More info can be found in the fine manual.

O.
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Wed Sep 05, 2007 3:03 pm
Reply with quote

Hi all,

Thanks a lot for your valuable suggetions, Its working now.

But I couldn't make it using rexx code. I can give you what i wrote in my code

Code:


dsvar='test.bala.dslist"

address ispexec
LMDLIST LISTID(dslist-id) OPTION(SAVE) DATASET(dsvar) STATS(YES)



some ispf error is coming, Can any one throw some light on it.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Sep 05, 2007 3:13 pm
Reply with quote

Have you read the fine manual carefully? There are some preceding services that need to be invoked prior to LMDLIST.

To see the actual ISPF messages, use SAY ZERRLM; SAY ZERRSM after the service call.

O.
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Wed Sep 05, 2007 4:07 pm
Reply with quote

Hi ofer,

Its working fine now, I have changed the code
Code:

DSVAR= "TEST.TIWARY.REXX "                                                             
HLQ   = "TEST.*"
                                                     
ADDRESS ISPEXEC "LMDINIT LISTID(TEMPLIST) LEVEL(&HLQ)"   
ADDRESS ISPEXEC                                                       
  "LMDLIST LISTID(&TEMPLIST) OPTION(SAVE) DATASET(DSVAR) STATS(YES)"   


Thanks once again.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Sep 05, 2007 10:00 pm
Reply with quote

Also suggest looking at IGGCSIRX in SYS1.SAMPLIB, that would do it for you. But only for catalogued datasets.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
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
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
Search our Forums:

Back to Top