35 %macro mp_stprequests(status_cd= 
    36       ,libds=somelib.stp_requests 
    40   %local etls_syntaxcheck;
    41   %let etls_syntaxcheck=%sysfunc(getoption(syntaxcheck));
    42   options nosyntaxcheck;
    46     request_dttm=datetime();
    47     status_cd=
"&status_cd";
    48     _METAPERSON=
"&_metaperson";
    50     SYSUSERID=
"&sysuserid";
    52   %
if not %symexist(_SESSIONID) %then %
do;
    54     _replay=symget(
'_replay');
    55     _replay=subpad(_replay,index(_replay,
'_sessionid=')+11,length(_replay));
    56     index=index(_replay,
'&')-1;
    57     if index=-1 then index=length(_replay);
    58     _replay=substr(_replay,1,index);
    64     _SESSIONID=symget(
'_SESSIONID');
    70   proc append base=&libds data=&syslast nowarn;run;
    72   options &etls_syntaxcheck;