Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need clarification about LISTDSI syntax

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Need clarification about LISTDSI syntax
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: 6968
Location: porcelain throne

PostPosted: Mon Aug 06, 2007 10:32 pm    Post subject:
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    Post subject: Re: Need clarification about LISTDSI syntax
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: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 07, 2007 1:44 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts Syntax for running batch history repo... polymathtarun CA Products 1 Tue Jun 21, 2016 1:51 pm
No new posts Syntax to check the first 4 digits of... kshirabdhi DFSORT/ICETOOL 10 Tue May 03, 2016 12:21 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us