View previous topic :: View next topic |
Author |
Message |
naveen_summary Beginner
Joined: 12 Feb 2007 Posts: 26 Topics: 13
|
Posted: Thu Mar 12, 2009 11:19 am Post subject: LISTDSI(dsn) where dsn is variable. |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
naveen_summary Beginner
Joined: 12 Feb 2007 Posts: 26 Topics: 13
|
Posted: Thu Mar 12, 2009 11:37 am Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
danm Intermediate
Joined: 29 Jun 2004 Posts: 170 Topics: 73
|
Posted: Thu Mar 12, 2009 12:54 pm Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Thu Mar 12, 2009 1:10 pm Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
kolusu Site Admin
![Site Admin Site Admin](images/ranks/adminpic.jpg)
Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Dibakar Advanced
![](images/avatars/gallery/cartoons/WB70.gif)
Joined: 02 Dec 2002 Posts: 699 Topics: 63 Location: USA
|
Posted: Thu Mar 12, 2009 7:41 pm Post subject: |
|
|
Quote: | fails with 16 (though backupdsn on print looks exactly like below)
Code: | "'QX000241.JCL.PS'" |
|
On print it should look like |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
taltyman JCL Forum Moderator
![JCL Forum Moderator JCL Forum Moderator](images/ranks/homer8.gif)
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Fri Mar 13, 2009 8:24 am Post subject: |
|
|
Code: | /* rexx */
env = 'JCL'
es62b = 'PS'
backupdsn = space("'QX000241." env "." es62b "'",0)
x = listdsi(backupdsn)
return |
As suggested works for me |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|