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: 8593
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: 8593
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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am

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