View previous topic :: View next topic
|
Author |
Message |
rajesh-amigos Currently Banned New User
Joined: 03 Aug 2007 Posts: 25 Location: India
|
|
|
|
000130 Pull var1
000140 var4 = '"'||"'"||var1||"'"||'"'
000150 say var4
*-* "'TTOI.RAWATR.EXEC'"
000200 Address TSO "ALLOC DATASET('"var1"')F(datain)SHR REUSE"
000201 DSINFO=LISTDSI("'ttoi.rawatr.exec'" DIRECTORY)
000202 DSINFO=LISTDSI(var4 DIRECTORY)
*-*INVALID KEYWORD, "'TTOI.RAWATR.EXEC'"
SAY SYSREASON
*-* 0001 (Means Error parsing the function )
Say DSINFO
*-* 16
My Query is what is the difference between line 201 and line 202.
I have to use the code on line 202 in my program. Can somebody tell me what is the problem here and how can this be resolved |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
use Trace ?R and find out how var4 is being resolved and compare that to what is going on with line 201. |
|
Back to top |
|
|
chipnskip
New User
Joined: 06 Aug 2007 Posts: 1 Location: US
|
|
|
|
You need another set of double quote within the single quote for the dataset name. (e.g."'"TTOI.RAWATR.EXEC"'") . |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Try using
VAR4 = STRIP("'"VAR1"'")
X = LISTDSI(VAR4 SMSINFO NORECALL)
Where VAR1 has on either side DOUBLE QUOTE SINGLE QUOTE DOUBLE QUOTE
Works for me |
|
Back to top |
|
|
|