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

Error with LISTCAT ENTRIES


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bandita Bahubalendra

New User


Joined: 08 May 2008
Posts: 15
Location: Bangalore

PostPosted: Wed May 27, 2009 5:37 pm
Reply with quote

Hi All,

I am trying to execute the below piece of code
Code:

*REXX*/

F1='N******.VSAM'

"ALLOC F(FIRST) DA('"F1"') SHR REUSE"

"EXECIO * DISKR" FIRST "(STEM DATA. FINIS"

 

DO VSM = 1 TO DATA.0

X = OUTTRAP("VLN.")

ADDRESS TSO "LISTCAT ENTRIES('"DATA.VSM"') ALL"

X = OUTTRAP("OFF")

 

DO VL = 1 TO VLN.0 UNTIL WORD(VLN.VL,1) = "ALLOCATION"

SAY 'VL=' VL

SAY 'VLN.VL=' VLN.VL

END

END

ABCV.FSTACTDE.E.C is the first dataset/record listed in ‘N******.VSAM'

The output (values of VL & VLN.VL in the above code) looks like this -

VL= 1

VLN.VL= INVALID DATA SET NAME, 'ABCV.FSTACTDE.E.C

VL= 2

VLN.VL= INVALID DATA SET NAME, '

VL= 3

VLN.VL= MISSING 'ENTRIES' PARAMETER+

VL= 4

VLN.VL= MISSING NAME OF ENTRY (EG. DSNAME, GDG NAME ETC.)

VL= 5

VLN.VL= LASTCC=12




When i remove the single quotes in LISTCAT ENTRIES('"DATA.VSM"') ALL"

Removing single quotes will lead to another error which tries to prefix my userid to the VSAM datasets



VL= 1

VLN.VL= ERROR QUALIFYING N******.ABCV.FSTACTDE.E.C

VL= 2

VLN.VL= ** DEFAULT SERVICE ROUTINE ERROR CODE 20, LOCATE ERROR CODE 8

VL= 3

VLN.VL= LASTCC=4


Can anyone tell me how to fix the above errors?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed May 27, 2009 5:48 pm
Reply with quote

Have you run the thing using TRACE R or TRACE I to see exactly what is happening.

If not, I suggest that you try it.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed May 27, 2009 6:01 pm
Reply with quote

Bandita Bahubalendra,

Please learn how to use BB code (code tags).
Here is the Link . Suggest you make it a bookmark.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed May 27, 2009 8:02 pm
Reply with quote

You have to strip DATA.VSM of its trailing blanks:
Code:
ADDRESS TSO "LISTCAT ENTRIES('"Strip(DATA.VSM)"') ALL"
Back to top
View user's profile Send private message
Bandita Bahubalendra

New User


Joined: 08 May 2008
Posts: 15
Location: Bangalore

PostPosted: Thu May 28, 2009 9:13 am
Reply with quote

Marso,

you are obsolutely right !!!! i got whatever i wanted..

Thanks a million ,Marso
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top