Date: Tue, 20 Apr 2004 14:41:13 -0400
Reply-To: "Farrer, Andrew C" <Andrew.Farrer@CIBC.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Farrer, Andrew C" <Andrew.Farrer@CIBC.COM>
Subject: Re: NEED HELP - Mainframe JCL and SAS
Content-Type: text/plain; charset="iso-8859-1"
I find it useful to store the DSN in the data set label rather than waste
space by creating a variable with the same value for each obs.
//DD1 DD DSN=AA.BB.CC.MAR04,DISP=SHR
//DD2 DD DSN=AB.BC.DD.MAR04,DISP=SHR
//DD3 DD DSN=CC.CD.AA.MAR04,DISP=SHR
//SYSIN DD *
%let dsn1 = %sysfunc(pathname('DD1')) ;
data concat (label="First source is &DD1") ;
infile dd1 ;
From: B.Desai [mailto:bhargav.desai@MCI.COM]
Sent: Tuesday, April 20, 2004 2:03 PM
Subject: NEED HELP - Mainframe JCL and SAS
I have several SAS datasets that I use as Input data sets in my
program. These all dataset names end with MMMYY (MAR04). Example :
I combine data from all these datasets (seven) monthly. What I want
to do is, add a filed in the combined dataset that will indicate what
month the data is coming from. In this example, MAR04. Currently I am
doing this by hard coding in the code; however, would want to be able
to get this infomation, from the input dataset name itself.
Reason I want to do this is, so if I were to run the program for
several months at once, I do not have to hard code month values every
time I run the program.