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
 
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: 1249
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: 1781
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: 1249
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: 1249
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: 1781
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: 2088
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: 1781
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: 1249
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: 1249
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am

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