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

Dump output from LMDLIST to file


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Mon May 07, 2007 4:37 am
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
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: 2358
Location: Israel

PostPosted: Mon May 07, 2007 9:59 am
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
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: 8798
Location: Welsh Wales

PostPosted: Mon May 07, 2007 5:53 pm
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: 2358
Location: Israel

PostPosted: Mon May 07, 2007 6:38 pm
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 All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts IGYPG3178-I when compiling a pgm read... COBOL Programming 6
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts To Populate Trailer cnt in the file w... SYNCSORT 1
Search our Forums:


Back to Top