MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LMINIT, LMOPEN, LMMLIST, LMMFIND - Please help me

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
pradeepg1
Beginner


Joined: 06 Jan 2003
Posts: 20
Topics: 7
Location: Columbus, OH

PostPosted: Mon Feb 07, 2005 1:01 pm    Post subject: LMINIT, LMOPEN, LMMLIST, LMMFIND - Please help me Reply with quote

Hello MVS Forum members,

I am having an issue while executing a Rexx which has LMOPEN command. What my Rexx doing is, it will read an input file which will have PDS names.

USERID.TSO.PDS1
USERID.TSO.PDS2
USERID.TSO.PDS3
USERID.TSO.PDS4
........etc...

I have to list out the PDS members which are existing in more than one PDS. To do that each time I am processing 2 PDS files. First I issue LMINIT and LMOPEN commands on first 2 PDS files
.
Iam issuing LMMLIST on PDS1 to read the PDS members sequentially and LMMFIND on the second PDS with MEMBER option to find if it existing. The MEMBER will have the value which was read by using LMMLIST. After processing all the members from the first PDS, I close and Free the PDS files by using LMCLOSE and LMFREE.

Now I have to do the same process on PDS2 and PDS3. While doing this when I issue LMOPEN after sucessful LMINIT on PDS2 there I am getting RC=10.
Even after successful LMINIT on PDS2 why I am getting RC=10.
Please correct me if I am doing some thing wrong here.

Appreiciate your help. Thanks in Advacnce.

- Pradeep
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
pradeepg1
Beginner


Joined: 06 Jan 2003
Posts: 20
Topics: 7
Location: Columbus, OH

PostPosted: Mon Feb 07, 2005 1:42 pm    Post subject: [b]PLEASE Ignore this- Sorry about posting it in hurry.[/b] Reply with quote

I just removed the semicolumns for DATAID field while issuing the LMINIT command. It worked now. What I am wondering is for first execution why it didn't give me any error.

I had like this

MY OLD CODE

address ispexec 'LMINIT DATAID('AJXDATID')',
'DATASET('ds1')',
'ENQ(SHR)'

MY NEW CODE

address ispexec 'LMINIT DATAID(AJXDATID)',
'DATASET('ds1')',
'ENQ(SHR)'

Thanks in advance for your help on this.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Mon Feb 07, 2005 3:31 pm    Post subject: Reply with quote

The code didn't return an error because it is syntactically and logically correct.

Think about your code for a minute.

First, you call this function:
Code:

address ispexec 'LMINIT DATAID('AJXDATID')',
'DATASET('ds1')',
'ENQ(SHR)'

If you did not, prior to this statement, assign a value to the variable 'AJXDATID', then, by REXX conventions, the value of the undefined variable is the name of the variable in upper-case, or 'AJXDATID'. So, this statement is processed as:
Code:

"ISPEXEC LMINIT DATAID(AJXDATID) DATASET('USERID.TSO.PDS1') ENQ(SHR)"

Since LMINIT is an output function, it stores the value for the Data ID (ISR#####) into the variable 'AJXDATID'.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Mon Feb 07, 2005 11:10 pm    Post subject: Reply with quote

Not an answer to your question, but ISPF already has that funciton built in. Allocate the PDSs to any ddname, start ISRDDN by typing TSO ISRDDN or just DDLIST, and type DUP ddname. Then once you see the list of duplicates, type SAVE and ISPF will create 'userid.ISRDDN.DUPLICAT'. ddname is any whole or partial ddname. If you don't specify a ddname, all ddnames are searched. Note that this also checks for duplicates loaded in storage (LPA), and the list supports FIND/RFIND.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group