View previous topic :: View next topic
|
Author |
Message |
mahi123
New User
Joined: 05 May 2007 Posts: 3 Location: new jersey
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
mahi123
New User
Joined: 05 May 2007 Posts: 3 Location: new jersey
|
|
|
|
Thanks for your reply. I need the JCL how to write to file. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can use OPTION(SAVE) instead of OPTION(LIST).
For more information about LMDLIST, please refer to the fine manual.
O. |
|
Back to top |
|
|
mahi123
New User
Joined: 05 May 2007 Posts: 3 Location: new jersey
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
|