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: 4648
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 FTP xls file from Mainfrmae kumarsatheeshc1 TSO/ISPF 5 Tue Jun 20, 2017 6:56 pm
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts XML Parse for large file muralikrishnan_new COBOL Programming 3 Mon Jun 12, 2017 12:50 pm


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