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
 
Error in LMDLIST EXEC

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

New User


Joined: 21 Mar 2007
Posts: 28
Location: Bangalore

PostPosted: Mon Jul 05, 2010 7:18 pm    Post subject: Error in LMDLIST EXEC
Reply with quote

I want to get the DSList which satisfies given qualifier.

Ex: i have below datasets.

Code:
userid1.abcd
userid1.abc1
userid1.abc2

userid2.abcd
userid2.abc1
userid2.abc2

If i pass userid1.abc*, userid2.abc* i should get all the dataset list i have.

I wrote below REXX:

Code:
K = 1;EXCLSTRING = ''                                                   
"EXECIO * DISKR EXCLUDE (STEM EXCLUDE. FINIS"                           
DO I = 1 TO EXCLUDE.0                                                   
  TEMPVAR = STRIP(EXCLUDE.I)                                           
  ADDRESS ISPEXEC "LMDINIT LISTID(TEMPLIST) LEVEL("TEMPVAR")"           
  DO FOREVER                                                           
    ADDRESS ISPEXEC,                                                   
    "LMDLIST LISTID(&TEMPLIST) OPTION(LIST) DATASET(EXCLDSN) STATS(YES)"
      IF RC \= 0 THEN LEAVE                                             
        EXCLSTEM.K = EXCLDSN                                           
        K = K + 1                                                       
  END /* END OF DO FOREVER */                                           
      ADDRESS ISPEXEC "LMDLIST LISTID(&TEMPLIST) OPTION(FREE)"         
      ADDRESS ISPEXEC "LMDFREE LISTID(&TEMPLIST)"                       
END /* END OF FIRST DO LOOP */                                         


Where EXCLSTEM.K will have all the dsnames meets the criteria.

Am passing the DS Qualifiers from a Input file DD EXCLUDE
userid1.abc*
userid2.abc*

The loop is running fine for First string and writing the list to Stem, but not running for second one. Getting below error.

Code:
    11 *-*   ADDRESS ISPEXEC,                                                   
) DATASET(EXCLDSN) STATS(YES)"                                                 
       >L>     "LMDLIST LISTID(&TEMPLIST) OPTION(LIST) DATASET(EXCLDSN) STATS(YE
       +++ RC(8) +++                                                           
    13 *-*   IF RC \= 0                                                         
       >V>     "8"                                                             
       >L>     "0"                                                             
       >O>     "1"                                                             
       *-*    THEN                                                             
       *-*    LEAVE                                                             
     9 *-*  DO FOREVER                                                         
    17 *-*  ADDRESS ISPEXEC "LMDLIST LISTID(&TEMPLIST) OPTION(FREE)"           
       >L>    "LMDLIST LISTID(&TEMPLIST) OPTION(FREE)"                         
    18 *-*  ADDRESS ISPEXEC "LMDFREE LISTID(&TEMPLIST)"                         
   >L>    "LMDFREE LISTID(&TEMPLIST)"       
19 *-* END /* END OF FIRST DO LOOP */       



Thinking of some FREE Problem. Can some one help me?
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Mon Jul 05, 2010 7:26 pm    Post subject: Reply to: Error in LMDLIST EXEC
Reply with quote

please be consistent ...
You tell about rexx, but You are using clist notation for &TEMPLIST
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: Mon Jul 05, 2010 7:28 pm    Post subject:
Reply with quote

This works for me
Code:
ADDRESS ISPEXEC                                                       
"CONTROL ERRORS RETURN"                                               
                                                                       
DO A = 1 TO LV.0                                                       
  DSET = ''                                                           
  "LMDINIT LISTID(LMD) LEVEL("LV.A")"                                 
  DO FOREVER                                                           
         "LMDLIST LISTID("LMD") OPTION(LIST) DATASET(DSET) STATS(YES)"
         IF RC > 0 THEN LEAVE                                         
         SAY ZDLDSN                                                   
  END                                                                 
END                                                                   
"LMDFREE LISTID("LMD")"                                               
Back to top
View user's profile Send private message
rakeshreddy
Warnings : 1

New User


Joined: 21 Mar 2007
Posts: 28
Location: Bangalore

PostPosted: Mon Jul 05, 2010 9:11 pm    Post subject:
Reply with quote

Thanks Expat,

You gave me the solution. That's working for me too!!
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts exec macro in the end of edit anatol CLIST & REXX 8 Fri Sep 22, 2017 5:10 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm

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