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

List datasets for a qualifier


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Feb 24, 2009 12:44 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Feb 24, 2009 2:38 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
Search our Forums:

Back to Top