Jim
Mainframe SAS has a tool called Proc Source which can be used with the
Partitioned Data Sets (PDS) where mainframe programs are often stored. It
can, for example, simply list the members of a pds or it can also dump the
entire pds into a sequential text file with a record indicating the start
of each new pds.
If you were to assign filenames to the pds and to a sequential file, say In
and Out, you could use the code
Proc Source indd = in Outdd = Out nodata;
run;
The file Out would have the list of the member names and these will appear
as
./ ADD NAME=member name
The ./ Add bit is used by an IBM utility for loading members into a PDS.
Nat Wooding
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
Cel Phone: 804-205-0752
Jim Brittain
< XXXX@XXXXX.COM >
Sent by: "SAS(r) To
Discussion" XXXX@XXXXX.COM
< XXXX@XXXXX.COM cc
GA.EDU>
Subject
Output a filelist to TXT file on
07/23/2009 04:54 Mainframe
PM
Please respond to
Jim Brittain
< XXXX@XXXXX.COM >
I am working on a program to migrate several SAS and TXT files from a
given Mainframe account to a Windows server. I have much of the program
working and I have been working with a text file of Mainframe files
created with TSO 3.4 dataset list that someone did for me. I would like
to make the program more dynamic and send a list of all Mainframe datasets
(files) to a text file that I can read in and create macro calls from.
I have tried a few aproaches that I found on here using PROC IDCAMS but
each time it seams to keep running and never ending. The directory
(Mainframe account) that I am trying to get a file list for testing
purposes only has 13 files so it should be very quick.
I did get a list using the code below but it sends the list to the SAS LOG
and I have not been able to redirect it with PROC PRINTTO.
Command I have used:
X 'LISTCAT LVL(ZQR0)';
Is there a way to redirect or "pipe" the output of this to a file like
ZQR0.FILELIST.TXT?
I am working via SAS CONNECT so avoiding JCL would be my preferable
solution.
Thanks,
Jim
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.