BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
2 REPLIES 2
Peter_C
Rhodochrosite | Level 12
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
deleted_user
Not applicable
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 894 views
  • 0 likes
  • 2 in conversation