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

Generate a list of data sets and route to an output data set


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Thu Mar 22, 2012 1:19 am
Reply with quote

I want to list my data sets at a certain level and then I would like to route this list to a data set. I use Option 6 - Commands in ISPF to enter the following command:

LISTC LEVEL('RMTBIG.TTF.S955ABC.CLW')

and I get a list of my data sets displayed on the screen.

Reading the LISTCAT documentation I need an OUTFILE keyword with a file name that has been allocated to a data set. I then used the following statement to accomplish this:

ALLOC FILE(CLWDAT) DATASET('RMTBIG.TTF.S955ABC.CLW.MYDAT')
SPACE(5,2) LRECL(80) BLKSIZE(10240) RECFM(F B)

If I am interpreting the LISTCAT documentation correctly I then need a statement as:

LISTC LEVEL('RMTBIG.TTF.S955ABC.CLW') OUTFILE(CLWDAT)

When I execute this command I get the message

IDC4999I - UABORT CODE 36

Has anyone been confronted with this code? Have I misinterpreted the OUTFILE parameter?

Charles Wolters
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 22, 2012 1:25 am
Reply with quote

OUTFILE is NOT used in the way you have used it. The LISTCAT output goes to the SYSPRINT DD name; OUTFILE is used for REPRO of data sets, not LISTCAT.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Thu Mar 22, 2012 1:28 am
Reply with quote

Does not the return code of 36 indicate that SYSPRINT could not be opened?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Mar 22, 2012 2:02 am
Reply with quote

though this example of OUTTRAP is a REXX Script run in Batch,
scroll down to the code and then find OUTTRAP code with the LISTC.

then all you would have to do is allocate an output ds and EXECIO your stem to the dataset.

you can run your script in the foreground using ARG to access your dsn level, as in
TSO MYLISTC hlq.mlq.llq
don't forget to bound your arg with single quotes before the listc command.

probably easier ways to do it, but no one seems inclined to give you any help in that direction.
at least this will get you going.
Back to top
View user's profile Send private message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Thu Mar 22, 2012 2:05 am
Reply with quote

Robert,

Here is the description of the OUTFILE option for LISTCAT from the IBM manual. The description is stating exactly what you have told me - that the data set list is routed to the SYSPRINT data set but it seems you have the option to specify an alternative target data set.

Charles

OUTFILE(ddname)
specifies a data set, other than the SYSPRINT data set, to receive the output produced by LISTCAT (that is, the listed catalog entries). Completion messages produced by access method services are sent to the SYSPRINT data set, along with your job's JCL and input statements.
ddname identifies a DD statement that describes the alternate target data set. If OUTFILE is not specified, the entries are listed in the SYSPRINT data set. If an alternate data set is specified, it must meet the requirements in JCL DD Statement for an Alternate Target Data Set.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Mar 22, 2012 2:40 am
Reply with quote

There's also this note:

1.1.2.6 JCL DD Statement for an Alternate Target Data Set

In several commands you can use an alternate target data set for listing, but do not use F or FB record formats.

Keeping that in mind, it worked just fine for me.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 22, 2012 3:24 am
Reply with quote

Quote:
but it seems you have the option to specify an alternative target data set.
As long as the alternative target data set is not fixed nor fixed block format -- which yours is.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Mar 22, 2012 5:00 am
Reply with quote

i believe that CW has left with the outtrap solution.

maybe when he returns tomorrow, he will have also looked up the error code for the sysout dataset and finally realized what SUPERK and Robert have said.
Back to top
View user's profile Send private message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Thu Mar 22, 2012 7:26 pm
Reply with quote

CW here. Yes, dbzTHEdinosauer I had started on the OUTTRAP solution last night and then had to leave for class. This morning I saw the posts from Robert and SUPERK, followed their guidance and was successful. Thank you to all who replied and I give thanks to the availability of this resource.

Charles Wolters (but you can call me CW)
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top