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

LISTCAT as a 3.4 line command (CLIST)


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

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Nov 22, 2013 12:45 am
Reply with quote

In a previous lifetime, I had a 1 or 2-line CLIST that displayed an IDCAMS LISTCAT of the VSAM file it was pointing to in the DATASET List screen. I haven't been able to get the right combination to create it again. The following:
Code:
PROC 0
/* IDCAMS COMMAND */
   LISTCAT
END
results in a list of all datasets beginning with my userid. The following:
Code:
PROC 0
/* IDCAMS COMMAND */
   LISTCAT ENTRIES('AAAAAAAA.BBBBBBBB.CCCCCCCC') ALL
END
results in a LISTCAT of AAAAAAAA.BBBBBBBB.CCCCCCCC instead of a listcat of dataset CCCCCCCC.BBBBBBBB.AAAAAAAA which is the dataset name my CLIST line command was positioned next to. In addition, the error msg says, "EXTRANEOUS INFORMATION WAS IGNORED: 'CCCCCCCC.BBBBBBBB.AAAAAAAA'". After reading the AMS manual and the TSO CLIST manuals, I still can't figure it out. I've tried various combinations of () and quotes. Any ideas on what to try next?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Nov 22, 2013 1:06 am
Reply with quote

Although I am not a CLIST programmer, the Rexx script
Code:
/* Rexx */                   
  trace o                   
  arg foo .                 
  "LISTCAT ENTRIES"foo" ALL"

does what I think you're trying to accomplish. If I list ABC.* in option 3.4, and type EXEC (/) next to ABC.XYZ, the argument passed as foo is
Code:
('ABC.XYZ')

with parentheses and pics.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Nov 22, 2013 1:23 am
Reply with quote

I get:
Code:
INVALID DATA SET NAME, ('ABC.XYZ')
REENTER THIS OPERAND+ -

DSN changed to protect myself but I used your code as is.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Nov 22, 2013 1:24 am
Reply with quote

I remember invoking this CLIST line command with something as simple as LC in the COMMAND column.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Nov 22, 2013 1:31 am
Reply with quote

After about 30 seconds of reading the fine manual, the CLIST equivalent proves to be
Code:
PROC 1 FOO             
LISTCAT ENTRIES&FOO ALL
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Fri Nov 22, 2013 1:32 am
Reply with quote

Sorry to criticize...
Quote:
and type EXEC (/) next to ABC.XYZ

but it looks like you recommend that the user type '(/)' every time the command is issued.

It seems like less keystrokes if the parenthesis is included in the rexx program. Then, you only need to type EXEC / next to ABC.XYZ. In fact, you do not need the slash either because the name gets passed anyway. Just type the name of the exec.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Nov 22, 2013 1:42 am
Reply with quote

Pedro wrote:
Sorry to criticize...
Quote:
and type EXEC (/) next to ABC.XYZ

but it looks like you recommend that the user type '(/)' every time the command is issued.

It seems like less keystrokes if the parenthesis is included in the rexx program. Then, you only need to type EXEC / next to ABC.XYZ. In fact, you do not need the slash either because the name gets passed anyway. Just type the name of the exec.

You're correct; it's a requirement in my shop to do it my way (vice versa, actually), but it is not a requirement of ISPF.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Nov 22, 2013 1:44 am
Reply with quote

Using:
Code:
=COLS> ----+----1----+----2----+----3----+----4---
****** ***************************** Top of Data *
000001 PROC 1 FOO
000002 LISTCAT ENTRIES&FOO ALL
000003 END
****** **************************** Bottom of Data
I get:
Code:
INVALID KEYWORD, ENTRIES'ABC.XYZ'
LASTCC=12
***
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Nov 22, 2013 1:52 am
Reply with quote

Got it -- it needed to be:
Code:
=COLS> ----+----1----+----2----+----3----+----4---
****** ***************************** Top of Data *
000001 PROC 1 FOO
000002 LISTCAT ENTRIES(&FOO) ALL
000003 END
****** **************************** Bottom of Data
Thanks all for your help!
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top