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
 
List datasets for a qualifier

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

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Tue Feb 24, 2009 10:57 am    Post subject: List datasets for a qualifier
Reply with quote

I am trying to list a datasets using the qualifiers. This is the code I have used.

Code:
"ISPEXEC LMDINIT LISTID("IDV") LEVEL(&DSNM)"                 
DO FOREVER                                                   
 "ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR)"
 IF RC = 0 THEN SAY DSVAR                                   
 ELSE DO                                                     
   "ISPEXEC LMDLIST LISTID("IDV") OPTION(FREE)"       


The same code will be executed again in the flow with a diffrent &DSNM. But I am getting the same old dataset list. Is there anything I am missing here?

Thanks,
Prajesh
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8657
Location: Back in jolly old England

PostPosted: Tue Feb 24, 2009 12:44 pm    Post subject:
Reply with quote

Do you do a LMDFREE anywhere ?
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Tue Feb 24, 2009 2:05 pm    Post subject:
Reply with quote

I am getting a return code 10 for next iteration , when I use LMDFREE as below:

Code:
 "ISPEXEC LMDINIT LISTID("IDV") LEVEL(&DSNM)"                 
 DO FOREVER                                                   
  "ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR)"
  IF RC = 0 THEN SAY DSVAR                                   
  ELSE DO                                                     
    C = ' '                                                   
    "ISPEXEC LMDFREE LISTID("IDV")"           
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8657
Location: Back in jolly old England

PostPosted: Tue Feb 24, 2009 2:38 pm    Post subject:
Reply with quote

I think that you need to FREE the resource before you allocate it again
Code:

"ISPEXEC LMDFREE LISTID("IDV")"           
"ISPEXEC LMDINIT LISTID("IDV") LEVEL(&DSNM)"                 
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Tue Feb 24, 2009 3:06 pm    Post subject:
Reply with quote

Code:
   196 *-*               "ISPEXEC LMDFREE LISTID("IDV")"                       
       >>>                 "ISPEXEC LMDFREE LISTID(ISR00050)"                 
IRX0100I +++ Interactive trace.  TRACE OFF to end debug, ENTER to continue. +++
                                                                               
                                                                               
   197 *-*               "ISPEXEC LMDINIT LISTID("IDV") LEVEL(&DSNM)"         
       >>>                 "ISPEXEC LMDINIT LISTID(ISR00050) LEVEL(&DSNM)"     
                                                                               
   198 *-*               DO FOREVER                                           
                                                                               
   199 *-*                "ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(D
SVAR)"                                                                         
       >>>                  "ISPEXEC LMDLIST LISTID(ISR00050) OPTION(LIST) DATA
SET(DSVAR)"                                                                   
       +++ RC(10) +++       


Still the same problem for me icon_sad.gif. This is the second iteration. First iteration went fine!
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 How to list data set names with diffe... murali.andaluri CLIST & REXX 8 Thu Apr 12, 2018 11:33 pm
This topic is locked: you cannot edit posts or make replies. Unavailable RECON datasets while exec... abdulrafi JCL & VSAM 10 Fri Apr 06, 2018 12:45 pm
No new posts List of jobs ran thru scheduler ddhar All Other Mainframe Topics 1 Tue Mar 27, 2018 4:32 am
No new posts How could i share my personal dataset... James Halley TSO/ISPF 1 Fri Mar 23, 2018 9:41 pm
No new posts Creation of Datasets dynamically on t... Raghu M N DFSORT/ICETOOL 8 Fri Mar 16, 2018 12:56 am

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