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

Display Datasets with partial HLQ


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sameer

New User


Joined: 10 Mar 2005
Posts: 41
Location: United States Of America

PostPosted: Tue Apr 15, 2008 9:25 pm
Reply with quote

Is it possible to display datasets list with partial HLQ ?

When I type ZCH* in 3.4 option, I am able to get list of datasets starting with ZCH. Is there anyway we can generate the same list using JCL so that I can have the list in one Dataset for analysis?

JCL / REXX code will help me.

Thanks,
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Apr 15, 2008 9:34 pm
Reply with quote

Without a TSO session to test, isn't there a way to point/capture the 3.4 output to a dataset?
Back to top
View user's profile Send private message
sameer

New User


Joined: 10 Mar 2005
Posts: 41
Location: United States Of America

PostPosted: Tue Apr 15, 2008 9:51 pm
Reply with quote

Thanks for the reply. I want JCL / REX code so that whenever I want I can run JOB and get the Dataset List.

Screen capture option is there but caul't help me as I have thousands of datasets under this catogiry and will be huge manual work to capture them.

Please help.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Apr 15, 2008 9:56 pm
Reply with quote

The ISPF LMDLIST service gives you what you want. You can call if from a program of your design.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Apr 15, 2008 10:14 pm
Reply with quote

option 3.4 and SAVE
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Wed Apr 16, 2008 3:11 pm
Reply with quote

Enrico,
I got this message after option 3.4 and SAVE.
Code:
The listing of data sets was placed in the ISPF list data set.

How to view this ISPF list data set?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Apr 16, 2008 6:47 pm
Reply with quote

You have alos the option of saving to a dataset of Your choice

Code:
save dataset_name


to browse edit an spflist/spflog dataset enter on the command line
list/log and follow the instructions in the next panel
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Apr 16, 2008 10:23 pm
Reply with quote

sameer,

Quote:
I want JCL / REX code so that whenever I want I can run JOB and get the Dataset List.


Try this code.

HLQ1 - partial dataset names

Code:
ADDRESS ISPEXEC "LMDINIT LISTID(TEMPLIST) LEVEL("HLQ1")"
DO FOREVER
ADDRESS ISPEXEC
"LMDLIST LISTID(&TEMPLIST) OPTION(LIST) DATASET(DSVAR) STATS(YES)"
IF RC <> 0 THEN LEAVE
Queue DSVAR
DSVAR = ''
END
ADDRESS ISPEXEC "LMDFREE LISTID(&TEMPLIST)"
return


Finally write the queue into a dataset.

P.S - > I have used this code before, but did not test it before posting.
Back to top
View user's profile Send private message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Thu Apr 17, 2008 1:40 pm
Reply with quote

Hi Aaru,
I tried your rexx code, but its giving me error as "A command entered or contained in a CLIST has invalid syntax."

Can you throw some light on this ?

--Parag
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Apr 17, 2008 3:43 pm
Reply with quote

Parag,

Quote:
tried your rexx code, but its giving me error as "A command entered or contained in a CLIST has invalid syntax."


Did u just execute the code that i had posted? If that is the case it won't work.

I had posted that code as Sameer had issues with that logic alone. This code is just for getting the list and queuing it.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts Find the occurrence of Key Field (Par... DFSORT/ICETOOL 6
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts How to display the leading zeros of a... DB2 7
No new posts how to get list of all VSAM/non-VSAM ... JCL & VSAM 13
Search our Forums:

Back to Top