Similar Threads:
1.mainframe work library space question
I see there is a "work=30000" in mainframe JCL as,
// EXEC SCSAS,WORK=30000
Here are my questions,
1) How much space is this WORK=30000 for a working library in mbtyes?
2) How to check the maximum working space one can allocate?
Thanks.
2.Cannot Allocate a SAS Library in Interactive SAS(TSO)
Hello,
I am trying to allocate a SAS dataset in interactive SAS on a Z/OS
mainframe. I can view the dataset if I run a batch job however I get
the following error when running interactive SAS.
ERROR: SVC99 error rc=4, reason=0218 : IKJ56221I DATA SET XXXXXXXXXXXX
NOT ALLOCATED, VOLUME NOT AVAILABLE+IKJ56221I VOLUME NECESSARY TO
SATISFY YOUR REQUEST NOT ON SYSTEM, AND CANNOT BE MOUNTED
The dataset is on catridge, is this the reason why I cannot mount it
interactively and is there a way to overide this ?
Thanks
3.Clearing work.GSEG window when working with GPLOT interactive
Dear SAS-L,
Does anyone know how to clear the work.GSEG window of plots from consecutive
plots (work.gseg.glpot[1..n]) when working with
SAS and running glpot interactively.
Thanks, any help is appreciated.
Jake
4.proc printto print="filename" not working in interactive sas
I use sas in batch exclusively but I have to make sure interactive
users can use my macros. One of these macros redirects print output
using "proc printto print='filename'". This works in batch but when I
run it interactively, instead of sending the print output to the file
I specified, it still uses the output window. How do I get this to
work correctly in interactive sas?
5.defaulte work library is not "work"
After running following code, the defaulted work directory changed to
"user".
how can I change back it to "work" again?
Thanks.
Jeff
OPTIONS NONOTES NOSOURCE NOSOURCE2;
*option mprint mlogic symbolgen;
%let dir=M:\Users\JP\PM\PM_RF;
%let datasetdir=M:\Users\JP\PM\Participation Study;
%let testids=51,52,53;
%let client = ABB;
%let Period=RF;
%let SvcMths=2;
libname orig "&datasetdir.\datasets";
libname user "&dir.\userInputs";
*libname ret 'N:\PM\Participation Study\Results';
*libname extn odbc uid=&SYSUSERID dsn=mhcdatawh_dev schema=dbo
readbuff=5000;
*
proc* *datasets* lib=user kill;
*
run*;
*
proc* *datasets* lib=work kill;
*
run*;
/*Open definition file*/
options noxwait noxsync;
x '"C:\Program Files\Microsoft Office\Office12\excel.exe"';
*
data* _null_;
x=sleep(*5*);
*
run*;
*;
/* open Excel workbook */
/*"N:\PM\PM_RF\CSVs\definitionT.csv" */
*;
filename ddecmd dde 'excel|system';
*
data* _null_;
file ddecmd;
put "[FILE-OPEN(""&dir.\CSVs\definition.xls"")]";
*
run*;
*;
/* specify desired Excel worksheet cell range */
*;
filename xlin DDE "excel|&dir.\CSVs\[definition.xls]definition!r2c1:r500c3";
*
run*;
*;
/* read Excel files using DDE into SAS data set*/
*;
*
data* user.rfs_labels_all;
infile xlin dlm='09'x notab missover dsd;
informat id *8.* type $20. label $200.;
input id type label;
format id *8.* type $8. label $200.;
*
run*;
*;
/* close Excel workbook and close Excel */
*
data* _null_;
file ddecmd;
put "[FILE-CLOSE(""&dir.\CSVs\definition.xls"")]";
put '[QUIT()]';
*
run*;
/*********************************************
*********************************************
*********************************************/
/*Open codesetmap excel file*/
x '"C:\Program Files\Microsoft Office\Office12\excel.exe"';
*
data* _null_;
x=sleep(*5*);
*
run*;
*;
/* open Excel workbook */
/*"N:\PM\PM_RF\CSVs\definitionT.csv" */
*;
filename ddecmd dde 'excel|system';
*
data* _null_;
file ddecmd;
put "[FILE-OPEN(""&dir.\CSVs\codemap.xls"")]";
*
run*;
*;
/* specify desired Excel worksheet cell range */
*;
filename xlin DDE "excel|&dir.\CSVs\[codemap.xls]codemap!r2c1:r3000c4";
*
run*;
*;
/* read Excel files using DDE into SAS data set*/
*;
*
data* user.codesetmaps_all;
infile xlin dlm='09'x notab missover dsd;
informat id *8.* codesetvalue $20. codeid *8.* codetypecd *8.*;
input id codesetvalue codeid codetypecd;
format id *8.* codesetvalue $20. codeid *8.* codetypecd *8.* ;
*
run*;
*;
/* close Excel workbook and close Excel */
*
data* _null_;
file ddecmd;
put "[FILE-CLOSE(""&dir.\CSVs\codemap.xls"")]";
put '[QUIT()]';
*
run*;
/*For program test and debug*/
*
data* user.rfs_labels (where=(id in (&testids.))); *(where=(id^=.));*;
set user.rfs_labels_all;
*
run*;
*
data* user.codesetmaps (where=(id in (&testids.)));* (where=(id^=.));*;
set user.codesetmaps_all;
*
run*;
/*
proc import out=user.ClaimHitsDriver
datafile = "N:\HI_Analytics\Projects\NCQA_DM_Test\NCQA
Codes\HEDISHitsDriver.txt"
dbms=tab replace; getnames=yes;
run;
proc sql;
create table work.HitsDriver as
select distinct CodeTypeCd, ColumnName1, ColumnName2, ColumnName3
from user.ClaimHitsDriver;
quit;
*/
*
%macro* createdsns(id);
data work.&client._var_&id;
length Elig_id $*30*;
length rf_&id *8*;
output;
run;
*
%mend*;
*
proc* *datasets* lib=work kill;
*
run*;
/* move relative files from warehouse sever to work;
data work.&client._claims;
set extn.&client._&SvcMths._MTH_&period._CLAIM;
run;
data work.&client._elig;
set extn.&client._&SvcMths._MTH_&period._elig;
run;
data work.&client._pharm;
set extn.&client._&SvcMths._MTH_&period._pharm;
run;
*/
* move relative files from warehouse sever to work;
*
data* work.&client._claims (rename=(elig_id=claim_elig_id));
set orig.&client._CLAIMS;
*
run*;
*
data* work.&client._elig;
set orig.&client._elig;
*
run*;
*
data* work.&client._pharm (rename=(elig_id=pharm_elig_id));
set orig.&client._pharm;
*
run*;
*Get eligible meidcal claim;
*
proc* *sql* noprint;
create table work.claims as
select distinct cl.*
from work.&client._claims cl, work.&client._elig e
where cl.claim_elig_id=e.elig_id;
*
quit*;
*Get eligible pharm claims;
*
proc* *sql* noprint;
create table work.pharm as
select distinct ph.*
from work.&client._pharm ph, work.&client._elig e
where ph.pharm_elig_id=e.elig_id;
*
quit*;
* all elig member;
*
data* work.elig;
set work.&client._elig;
*
run*;
*Get all involved reps;
*
proc* *sql* noprint;
create table work.&client._RF as
select distinct elig_id
from work.abb_elig
quit;
*
proc* *sort* data=work.&client._RF;
by elig_id;
*
run*;
/*
proc sql noprint;
create table work.&client._RFall as
select distinct elig_id label="Elig_id"
from
(
select distinct elig_id
from orig.&client._elig
) as a;
quit;
*/
/* create dummy datasets*/
*
data* _null_;
set user.rfs_labels;
call execute('%createdsns('||strip(id)||');');
*
run*;
*
proc* *sql* noprint;
select count(*) into: numRF
from user.rfs_labels;
*
quit*;
/*Make a label stirng*/
/* Set up column of result table;
proc sql
proc sql noprint;
alter table work.&client._RF
add rf1 int;
quit;
*/
* trasform codeset maps;
*
proc* *sort* data=user.codesetmaps out=work.codesetmaps;
by id codetypecd;
*
run*;
*
Data* work.codesetmaps_mac_loookup (drop=codesetvalue) ;
Length ValueString $ *2000* ;
Set work.codesetmaps ;
By ID CodeTypeCD ;
Retain ValueString ;
ValueString = CatX( ',' , ValueString ,cats("'",CodeSetValue,"'")); ;
If Last.CodeTypeCD Then Do ;
Output ;
Call Missing( ValueString ) ;
End ;
*
run*;
/* Get a specific target dataset
data work.target;
set work.codesetmaps_mac_loookup;
where id=1;
run;*/
*
%Macro* calculateRFs(codetypecd, id, valueString);
%if &CodeTypeCd = *2* %then %do;
proc sql noprint;
select lowcase(strip(type)) into:idtype
from user.rfs_labels
where id=&id;
quit;
%if &idtype=binary %then %do;
proc sql noprint;
create table work.temp&id as
select distinct claim_elig_id as elig_id,
*1* as RF_&id
from work.claims
where claim_icd1_code in(&valueString) or
claim_icd2_code in(&valueString) or
claim_icd3_code in(&valueString);
quit;
%end;
%else %do;
proc sql noprint;
create table work.temp&id as
select claim_elig_id as elig_id,count(*) as RF_&id
from work.claims
where claim_icd1_code in(&valueString) or
claim_icd2_code in(&valueString) or
claim_icd3_code in(&valueString)
group by claim_elig_id;
quit;
%end;
%end;
%else %if &codetypecd=*3* %then %do;
proc sql noprint;
select lowcase(strip(type)) into:idtype
from user.rfs_labels
where id=&id;
quit;
%if &idtype=binary %then %do;
proc sql noprint;
create table work.temp&id as
select distinct pharm_elig_id as elig_id,
*1* as RF_&id
from work.pharm p
where p.pharm_ndc_code in
(
select ndc_code from sqlref.ref_ndc_mast
where ndc_thera_class_code in (&valueString)
);
quit;
%end;
%end;
proc append base=work.&client._var_&id data=work.temp&id;
run;
*
%mend*;
*
data* _null_;
set work.codesetmaps_mac_loookup;
/*call execute ('%calculateRFs('||codetypecd||','||id||',' ||
'%nrstr('||trim(valueString)|| '));');*/
call execute ('%nrstr(%calculateRFs('||codetypecd||','||id||', %nrstr('||
trim(valueString)|| ')));');
*
run*;
/* Marco for sorting*/
*
%Macro* sortalldsn();
%do i=*1* %to *415*;
%if %sysfunc(exist(&client._rf_&i)) %then %do;
proc sort data=&client._rf_&i;
by id;
run;
%end;
%end;
*
%mend*;
option mprint mlogic symbolgen;
%*sortalldsn*();
*proc* *print* data=sashelp.class;
*
run*;
*
proc* *sql* noprint;
select cats("&client._var_",id) into: allids SEPARATED BY ' '
from work.codesetmaps_mac_loookup;
*
run*;
*
data* &client._all_rfs;
merge &client._rf &allids;
by elig_id;
*
run*;
*
proc* *print* data=abb_rf;
*
run*;
6. RE : access sas/connect's work library through sas/share's JDBC
7. Meaning of SAS UNIX work library hex string
8. SAS Oracle Update with work library