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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Generate a list of data sets and route to an output data set
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: 7913
Location: Bellevue, IA

PostPosted: Thu Mar 22, 2012 1:25 am    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Thu Mar 22, 2012 1:28 am    Post subject:
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    Post subject:
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    Post subject: RE: Generate a list of datasets and route to output data set
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

Moderator Team Head


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

PostPosted: Thu Mar 22, 2012 2:40 am    Post subject: Reply to: Generate a list of data sets and route to an outpu
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: 7913
Location: Bellevue, IA

PostPosted: Thu Mar 22, 2012 3:24 am    Post subject:
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    Post subject:
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    Post subject: RE: Generate List of Data Sets and Route to Output Data Set
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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