LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 23 Jul 2009 15:31:38 -0700
Reply-To:   mlhoward@avalon.net
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Mary <mlhoward@AVALON.NET>
Subject:   Re: Output a filelist to TXT file on Mainframe
Comments:   To: Jim Brittain <zqr0@CDC.GOV>
Content-Type:   text/plain; charset="UTF-8"

Are they SAS datasets? If so you could capture the file names with ODS using Proc Datasets.

I tried it (on UNIX), and do get it into a data set, and of course you could use any number of means to print a sas data set to a file; if you are using SAS Connect you could use proc download after this to bring down the data set.

RSUBMIT;

libname saslib2 '/home/user/saslib'; ods output members=members; proc datasets library=saslib2; quit;

proc print data=members; run;

ENDRSUBMIT; signoff;

-Mary

--- zqr0@CDC.GOV wrote:

From: Jim Brittain <zqr0@CDC.GOV> To: SAS-L@LISTSERV.UGA.EDU Subject: Output a filelist to TXT file on Mainframe Date: Thu, 23 Jul 2009 16:54:20 -0400

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


Back to: Top of message | Previous page | Main SAS-L page