04-02-2015 10:48 AM
i have a library name test;
the test library containts datasets like
x_1_20150128 /* yyyymmdd*/
here how to get the present month and persent year and not about date.
dates are differents for datasets.
plz help me.
04-02-2015 12:13 PM
If you want to combine data sets you can use a list such as:
set x_1_201504: ;
to get the sets that start with specific characters.
But really, what are you going to do with the data sets once they are identified? The approaches can vary quite a bit.
And there may be additional bits needed such as to any of the desired datasets start with something other than X_1_?
If so do you want them included or just the ones that start with X_1_?
04-02-2015 12:27 PM
the below code will create a macro variable dates with list of datasets names with today() month and year
select memname into:dates separated by ' ' from dictionary.tables where upcase(libname)='WORK' and
compress(memname,,'kd') ne '' and cats(substr(compress(memname,,'kd'),2,4),substr(compress(memname,,'kd'),6,2))="&x";