[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: read in unknown number of text files on mainframe
From:       Paul Dorfman <paul_dorfman () HOTMAIL ! COM>
Date:       2001-02-28 22:09:53
[Download RAW message or body]

Shiling,

If I am getting it right, and so ACCTXXXX, ACCTXXXY, etc. are members of the
PDS 'CC.DB2.DCLGEN', then you can do the following:

data frompds;
   length memfile $44.;
   input mem: $8.;
   memfile = 'CC.DB2.DCLGEN'||'('||mem||')';
   do end=0 by 0 until (end);
      infile dummy filevar=memfile end=end;
      input <specifications>;
      output;
   end;
cards;
ACCTXXXX
ACCTXXXY
ETC
;
run;

Optionally and much simpler (but less dynamic):

filename inmems ('CC.DB2.DCLGEN(ACCTXXXX)'
                 'CC.DB2.DCLGEN(ACCTXXXY)'
                 'CC.DB2.DCLGEN(ETC     )') disp=shr;
data a;
   infile inmems;
   input <specifications>;
run;

Kind regards,
=====================
Paul M. Dorfman
Jacksonville, Fl
=====================

>From: Shiling Zhang <jshi@MY-DEJA.COM>

>I have unknown number of text files under CC.DB2.DCLGEN on mainframe, say
>ACCTXXXX, ACCTXXXY, ETC. How can I read all of them into a SAS sata set
>assuming all has the same data format.
>
>Thanks.

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic