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
 

 

Dump output from LMDLIST to file

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

New User


Joined: 05 May 2007
Posts: 3
Location: new jersey

PostPosted: Mon May 07, 2007 1:22 am    Post subject: Dump output from LMDLIST to file
Reply with quote

Code:

ADDRESS ISPEXEC                                                       
DSNLEV = 'HLQ1.HLQ2.HLQ3'                                     
J = 1                                                                 
I = 1                                                                 
"LMDINIT LISTID("LSTID") LEVEL("DSNLEV")"                             
DO WHILE I < 12                                                       
  "LMDLIST LISTID("LSTID") OPTION(LIST) DATASET(DSVAR) STATS(YES)"   
  DATA.J = DSVAR                                                     
  SAY DATA.J                                                         
  J=J+1                                                               
  I=I+1                                                               
END                                                                   


I Used the above to get the list of datasets starting with above mentioned DSNLEV , but i want to run this in batch and need to write the output to 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: Mon May 07, 2007 4:37 am    Post subject: Re: Dump output from LMDLIST to file
Reply with quote

Well, each call of LMDLIST will populdate the variable DSVAR with the name of a dataset. Just write that information out each time.
Back to top
View user's profile Send private message
mahi123

New User


Joined: 05 May 2007
Posts: 3
Location: new jersey

PostPosted: Mon May 07, 2007 5:04 am    Post subject: Re: Dump output from LMDLIST to file
Reply with quote

Thanks for your reply. I need the JCL how to write to file.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon May 07, 2007 9:59 am    Post subject:
Reply with quote

You can use OPTION(SAVE) instead of OPTION(LIST).

For more information about LMDLIST, please refer to the fine manual.

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

New User


Joined: 05 May 2007
Posts: 3
Location: new jersey

PostPosted: Mon May 07, 2007 5:34 pm    Post subject: Re: Dump output from LMDLIST to file
Reply with quote

Ok, I used OPTION(SAVE) and GROUP(DSNAME). Could you please tell me how to run this in Batch? Is there a way to do this in batch?
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: Mon May 07, 2007 5:53 pm    Post subject:
Reply with quote

Yes, there is a way to do this in batch, by initiating an ISPF environment in batch.

Search ISPF BATCH using the search button above and you will see at least one example of running ISPF in batch.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon May 07, 2007 6:38 pm    Post subject:
Reply with quote

Since LMDLIST will create the same dataset over and over again (depend on your GROUP value), I recommend using IEFBR14 as a delete-step before running LMDLIST.

O.
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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm


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