Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

LISTCAT as a 3.4 line command (CLIST)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Terry Heinze

JCL Moderator


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

PostPosted: Fri Nov 22, 2013 12:45 am    Post subject: LISTCAT as a 3.4 line command (CLIST)
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: 1738
Location: Bloomington, IL

PostPosted: Fri Nov 22, 2013 1:06 am    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Fri Nov 22, 2013 1:23 am    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Fri Nov 22, 2013 1:24 am    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Fri Nov 22, 2013 1:31 am    Post subject:
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

Senior Member


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

PostPosted: Fri Nov 22, 2013 1:32 am    Post subject: Reply to: LISTCAT as a 3.4 line command (CLIST)
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: 1738
Location: Bloomington, IL

PostPosted: Fri Nov 22, 2013 1:42 am    Post subject: Re: Reply to: LISTCAT as a 3.4 line command (CLIST)
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: 1238
Location: Richfield, MN, USA

PostPosted: Fri Nov 22, 2013 1:44 am    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Fri Nov 22, 2013 1:52 am    Post subject:
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    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 What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts COMPARE command sivatechdrive TSO/ISPF 7 Fri Sep 16, 2016 4:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us