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 

LISTDSI(dsn) where dsn is variable.

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


Joined: 12 Feb 2007
Posts: 26
Topics: 13

PostPosted: Thu Mar 12, 2009 11:19 am    Post subject: LISTDSI(dsn) where dsn is variable. Reply with quote

Hello Gurus,

My code:
Code:
x = listdsi("'QX000241.JCL.PS'")

works well. x comes out as 0.

but my code:

Code:
env = 'JCL'
es62b = 'PS'
backupdsn = '"'||"'"||'QX000241.'||env||'.'||es62b||"'"||'"'
x = listdsi(backupdsn)         


fails with 16 (though backupdsn on print looks exactly like below)
Code:
 "'QX000241.JCL.PS'"


Could you please help?
Back to top
View user's profile Send private message
naveen_summary
Beginner


Joined: 12 Feb 2007
Posts: 26
Topics: 13

PostPosted: Thu Mar 12, 2009 11:37 am    Post subject: Reply with quote

Gurus,
It works if I include the code as below:

backupdsn = "'QX000241."env"."es62b"'"

On print it looks as:
'QX000241.JCL.PS'
Back to top
View user's profile Send private message
danm
Intermediate


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Thu Mar 12, 2009 12:54 pm    Post subject: Reply with quote

I would add a space function just in case there are leading or trailing blanks in env or es62b.
Code:

backupdsn = space("'QX000241."env"."es62b"'",0)
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu Mar 12, 2009 1:10 pm    Post subject: Reply with quote

I do not know of a SPACE function in Rexx - you are probably thinking of STRIP
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Thu Mar 12, 2009 1:12 pm    Post subject: Reply with quote

Nic Clouston wrote:
I do not know of a SPACE function in Rexx - you are probably thinking of STRIP


Nic,

Space is indeed a function of rexx which is explained here

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A330/4.3.53?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 699
Topics: 63
Location: USA

PostPosted: Thu Mar 12, 2009 7:41 pm    Post subject: Reply with quote

Quote:
fails with 16 (though backupdsn on print looks exactly like below)
Code:
"'QX000241.JCL.PS'"



On print it should look like
Code:
'QX000241.JCL.PS'
Back to top
View user's profile Send private message Send e-mail
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Fri Mar 13, 2009 8:24 am    Post subject: Reply with quote

Code:
/* rexx */                                               
env = 'JCL'                                               
es62b = 'PS'                                             
backupdsn = space("'QX000241."  env "." es62b "'",0) 
x = listdsi(backupdsn)                             
return                                                   

As suggested works for me
Back to top
View user's profile Send private message
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