DATA Step, Macro, Functions and more

SPM Batch Model Facility, %SPMBMF

Reply
N/A
Posts: 0

SPM Batch Model Facility, %SPMBMF

Everybody Hi, I have a question - does anybody ever used this macro? The only documentation i found was inside the .sas file

My task - load to SMP new elements from excel, and as support says, I can do this with the help of this macro, but when i try to use it, nothing happens, no errors in log.

By analizing the macro i found out that its generate values for other macro - sendevnt, but I cant find the place where all that macros load my data (from .csv) to SPM.

If anybody have experience with the work of above will bw glad to see some instructions... or may be some documentation to read

Another micro question - how to generate Globally unique identifiers (GUIDs) - may be I can load all data myself, but cant make GUID.

Best regards
Valued Guide
Posts: 2,175

Re: SPM Batch Model Facility, %SPMBMF

hopefully, this isn't another example of sas solutions using proc import
(not only not a good idea
- I think proc import can only be used in an amateur/ad-hoc/interactive environment where importing difficulties can be easily recognised by the user who is very familiar with all her/his data and can solve any problem - at the data-end
(soap-off) )
Without access to the SPMBPF macro I would only recommend that you refer the problem to Technical/Customer Support.

To generate GUIDs is not very hard, just combine enough identifiers, for example:
you (&sysuserID )
application (processID ?)
timestamp %sysfunc(datetime(), best20.)
%sysindex
Of course, your application environment may already have defined what a GUID can contain. If so follow the GUIDance ;-)

good luck
peterC
N/A
Posts: 0

Re: SPM Batch Model Facility, %SPMBMF

in SPM GUID have the following form - 082ad130-0a08-0305-01bb-3453da1ad2cb.
I have no idea if its fully random or not, but if its random I made macro to generate it -
%macro gen(table=,rows=,seed=);
%macro mini;
%local src;
%let src=1234567890abcdefghijklmnopqrstuvwxyz_;

data tmp(keep=code);
s="&seed";
format code $36.;
format temp1 $1.;
retain code "";
do _n_ = 1 to 37;
if _n_ in (14,19,24,29) then do;
code="-"||code;
end; else do;

do i=0 to i>=1;
r1 = ranuni(s)*36;
i=r1;
end;
temp1=substr("&src",i,1);
code=temp1||code;
end;
*put _all_;
end;
call symput("temp2",code);
run;

data &table;
set tmp &table;
run;
%mend;

data &table;
run;

data _null_;
do _n_=1 to &rows;
call execute('%mini');
end;
run;
%mend;

%gen(table='gen',rows=10,seed=0);

May be someone know any other variants of random generation?

And I wait for people who worked with %SPMBMF, I need some youe experience pls)

Message was edited by: Fry Message was edited by: Fry
Ask a Question
Discussion stats
  • 2 replies
  • 217 views
  • 0 likes
  • 2 in conversation