Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8596
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 Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us