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

Need clarification about LISTDSI syntax


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: Mon Aug 06, 2007 10:23 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 06, 2007 10:32 pm
Reply with quote

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
View user's profile Send private message
chipnskip

New User


Joined: 06 Aug 2007
Posts: 1
Location: US

PostPosted: Tue Aug 07, 2007 3:05 am
Reply with quote

You need another set of double quote within the single quote for the dataset name. (e.g."'"TTOI.RAWATR.EXEC"'") .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 07, 2007 1:44 pm
Reply with quote

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 icon_confused.gif
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 PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts CNTL= Command Syntax Documentation CA Products 3
This topic is locked: you cannot edit posts or make replies. issue with Syntax error SYNCSORT 2
No new posts DO we have alternate syntax for IFTHEN? Compuware & Other Tools 8
No new posts How syntax check at Bind time is diff... DB2 5
Search our Forums:

Back to Top