06-30-2014 05:33 AM
Anybody has sample code to allocate the New Dataset which going to hold the Performance database members for a particular month ...I want dataset to be allocated with Month qualifier ..and platform is zOS..
06-30-2014 05:40 AM
You will need to provide more information. To create datasets you can use data xyz;, or proc sql create table. To get data from a database use proc sql with either connect to your database or via libname. To add month then just add number to the data step definition.
06-30-2014 06:28 AM
I assume that when you say "New Dataset" you actually want a new file which holds these tables.
It's quite a while that I've worked with z/OS but if I remember right then you have 2 options as also documented here: SAS(R) 9.2 Companion for z/OS
- Create the file name with the date part dynamically and store it in a macro variable, eg: &mypath: ABC.XXX.01012014
- Submit a libname in the form: LIBNAME MYLIB "&MYPATH" DISP=NEW;
I remember that we used to have a SAS macro which generated code "on the fly":
- Create some JCL which allocates the new library, last statement is to put all the generated code into the internal reader so that it gets executed (you'll find examples by Googling "JCL INTRD").
- Define a libname statement with DISP=OLD (as the macro already created the file).