Bonjour,
Je viens vers vous car j'ai besoin de votre aide pour l'écriture d'une macro SAS.
En gros j'essaye de faire en sorte que ma macro enregistre dans le répertoire courant mon graphique sortie par une procedure GPLOT (je travaille sous SAS pour Linux).
En gros voila ma macro :
Alors cette macro a marché hier mais ne marche plus aujourd'hui je ne comprend pas trop...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 %macro gacpbx2; /*calcul pour graphique data conccomp (keep=k cc); set compr (keep=prin1--prin&pvar); array c{*} _numeric_; do k = 1 to &pvar; cc=c{k}; output;end; run; /*recuperation nom repertoire courant proc sql noprint; select xpath into :nomprog from sashelp.vextfl where upcase(xpath) like '%.SAS'; quit; %put &nomprog; proc sql noprint; select scan(xpath,-1,'/') into :nomprog2 from sashelp.vextfl where upcase(xpath) like '%.SAS'; quit; %put &nomprog2; %let tailletotale=%length(&nomprog); %let taillebase=%length(&nomprog2); %let taillechemin=%eval(&tailletotale.-&taillebase.); %let nomchemin=%substr(&nomprog,1,&taillechemin); %put nomchemin: &nomchemin.; /* preparation pour enregistrement filename grafout '&nomchemin.'; goptions reset=all gsfname=graphout gsfmode=replace device=jpeg; /* creation graphique proc gplot data=conccomp; footnote; symbol1 i=box v=star; plot cc*k=1 / haxis= 0 to &pvar by 1 hminor=0 name='nomfichier'; run; quit; filename grafout clear; goptions reset=all; %mend;
Merci d'avance pour votre aide !
Partager