Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10210
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 OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us