Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to search dataset in all the volumes using batch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Mon Sep 03, 2007 12:41 pm    Post subject: how to search dataset in all the volumes using batch
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: 2360
Location: Israel

PostPosted: Mon Sep 03, 2007 1:23 pm    Post subject:
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: 130
Location: Guntur

PostPosted: Mon Sep 03, 2007 2:58 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Mon Sep 03, 2007 3:27 pm    Post subject:
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: 130
Location: Guntur

PostPosted: Tue Sep 04, 2007 10:14 am    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Sep 04, 2007 10:58 am    Post subject:
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: 130
Location: Guntur

PostPosted: Tue Sep 04, 2007 4:17 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Sep 04, 2007 6:03 pm    Post subject: Reply to: how to search dataset in all the volumes using bat
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: 130
Location: Guntur

PostPosted: Tue Sep 04, 2007 7:11 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Sep 04, 2007 7:39 pm    Post subject: Reply to: how to search dataset in all the volumes using bat
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: 130
Location: Guntur

PostPosted: Wed Sep 05, 2007 9:36 am    Post subject:
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: 2360
Location: Israel

PostPosted: Wed Sep 05, 2007 11:04 am    Post subject:
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: 130
Location: Guntur

PostPosted: Wed Sep 05, 2007 3:03 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Wed Sep 05, 2007 3:13 pm    Post subject:
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: 130
Location: Guntur

PostPosted: Wed Sep 05, 2007 4:07 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Sep 05, 2007 10:00 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us