Fwd: Output a filelist to TXT file on Mainframe



  • 1. put all the variables of a dataset in a macro-variable
    Hello, How can I put all the variables of a dataset in a macro-variable. Thanks. Ash007.
  • 2. Help in formatting
    Hello, I am trying to craete a variable ( 24 bytes) from 3 different variables. I should also have blanks in the middle. For example please look below:- GLM is a 3 byte field to be followed by 3 blanks followed by 11 byte field followed by 3 blanks followed by 4 byte field. Is there a direct way to do this or can this be done indirectly. Please let me know. for example:- GLM 00923456789 1234 Thanks for your heelp, Saravanan
  • 3. matrix vector
    Hi, I have a question on proc iml. I would like to know if I have a vector a = [ 1 2 3 4] and I want to produce this matrix b = [1 1 1 2 2 2 3 3 3 4 4 4] how do I do this? Also how do I print the values on the log file Any help is greatly appreciated. Thanks

Fwd: Output a filelist to TXT file on Mainframe

Postby iebupdte » Sat, 25 Jul 2009 22:12:11 GMT

---------- Forwarded message ----------
From: Data _null_; < XXXX@XXXXX.COM >
Date: Jul 24, 2009 8:11 AM
Subject: Re: Output a filelist to TXT file on Mainframe

You can also write tailored control decks using the FIRST, LAST,
BEFORE and AFTER statement.

I might be nice to have a similar PROC for other OSes that process
file directory tree style aggregate storage locations.  But maybe that
is a different subject.

Similar Threads:

1.Output a filelist to TXT file on Mainframe

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:


Is there a way to redirect or "pipe" the output of this to a file like

I am working via SAS CONNECT so avoiding JCL would be my preferable


2.From TXT file to TXT file without converting the originals

3.From TXT file to TXT file without converting the originals into

4.txt file output question

I'm working on a .txt file output that is meant to mimic the output of a
legacy system.  I almost have it working but I need to figure out how to
get SAS to recreate the right justified column in the raw data output.
(It's not quite lining up in the email but the one's column of the
rightmost data is right-justified at column 28.)  Any help would be




111390                   122

206200                      1

206201                      4

206204                   290

206205                 7023

206212                   697


Code so far:


data _null_;

  set CNPA;

  file outfile encoding=3D"utf-8";

  Code =3D trim(NPA) || trim(Prefix);

  if _N_ =3D 1 then do;

    put #1 ' ';

    put #2 Code TNCount;


  else put Code TNCount;




5.Proc Freq output as TXT file

6. Output files on the mainframe

7. How to put a table in an external file (txt-file)

8. How to change .xls files into .txt files in SAS

Return to sas


Who is online

Users browsing this forum: No registered users and 68 guest