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

LISTDSI, LISTDS, and LMINIT, ALLOC


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajesh-amigos
Currently Banned

New User


Joined: 03 Aug 2007
Posts: 25
Location: India

PostPosted: Thu Aug 09, 2007 11:53 pm
Reply with quote

Both LMINIT and ALLOC map a DSNname to a Dataid. Can I use a Alloc in my Program and then use LMOPEN directly. In other words the mapping between the DSNname and the Dataid, which the Alloc and the LMINIT does, are they same and can they be used interchangebly. If not, Please explain me the difference between the two.

Similarly can somebody explain me what is the difference between LISTDSI and LISTDS.

Thanks a lot.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Aug 10, 2007 5:32 am
Reply with quote

First of all, please read this sticky note at the top of the CLIST & REXX Forum. You seem to be confused about what is REXX, what is TSO, and what is ISPF.

rajesh-amigos wrote:
Both LMINIT and ALLOC map a DSNname to a Dataid. Can I use ALLOC in my Program and then use LMOPEN directly.


No. The TSO ALLOCATE Command allocates a dataset and optionally assigns it to a DDNAME for subsequent use by a program.

The LMINIT ISPF Service allows the dialog to associate a data ID with a specified ISPF library, concatenation of ISPF libraries or MVS partitioned data sets, or an MVS partitioned or sequential data set. The data ID is generated by LMINIT and can be used to identify the data set for processing by other library access services or the BROWSE or EDIT service.

rajesh-amigos wrote:
Similarly can somebody explain me what is the difference between LISTDSI and LISTDS.


The TSO LISTDS Command is used to have the attributes of specific data sets displayed at your terminal.

The LISTDSI REXX (or CLIST) Function retrieves information about a data set's allocation, protection, and directory and stores it in specific variables.
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Fri Aug 17, 2007 8:04 pm
Reply with quote

Hello,

When i try to get syscreate info thru LISTDSI command a gdg version, the result is blank though RC is 0.

Find below the code.
Code:

say $name                               
 dsinfo = listdsi("'$name'")           
 say rc
 IF RC = 0 then                         
   SAY SYSCREATE                       
 else                                   
   say "file not found"                 

$name is T6201BTX.T6201.DAILY.HANG.G1403V00.


output is

T6201BTX.T6201.DAILY.HANG.G1403V00
0
// here i should have got syscreate result. but it
// is blank

Is there any restriction on getting syscreate info for a gdg version?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Aug 17, 2007 8:30 pm
Reply with quote

Try this change first:

Code:

...
say $name                               
rc = listdsi("'$name'")           
say rc
if rc = 0 then say SYSCREATE                       
else say SYSREASON
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Mon Aug 20, 2007 11:10 am
Reply with quote

Hi,

Thanks for your reply.. Quotes was the culprit.. Find below the code that worked fine..

Code:
 dsinfo = listdsi("'"$name"'") 
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to filter PDS member using LMINIT... CLIST & REXX 4
No new posts REXX LISTDSI () SMSINFO is not working CLIST & REXX 4
No new posts LMINIT problem - not finding DDNAME CLIST & REXX 7
No new posts Extract selected members from a PDS w... JCL & VSAM 4
No new posts What's the difference between Alloc F... TSO/ISPF 2
Search our Forums:

Back to Top