通过 sassrv 帐户分配元数据用户

assigning a metadata user via the sassrv account

我在 STP 服务器上构建了一个测试工具,它为每个测试生成唯一的会话 运行。我现在遇到的问题是我的一个测试需要使用元数据帐户(我生成的会话在 sassrv 系统帐户下 运行ning)。

有关信息,生成这些会话的代码片段如下:

  /**
   * Execute all the backtest scripts and retain the logs
   */
  options sascmd='!sascmd';
  %local waitforlist;
  %do x=1 %to %get_attrn(backtest_scripts,NLOBS);
    signon connx&x;
    %syslput LOC_BACKTEST_SCRIPTS=&LOC_BACKTEST_SCRIPTS /remote=connx&x;
    %syslput TEST_RUN_NO=&TEST_RUN_NO /remote=connx&x;
    %syslput TEST_ID=Test&x /remote=connx&x;
    %syslput TEST_PGM=&&test&x /remote=connx&x;
    %syslput LOC_TEST_RESULTS=&LOC_BACKTEST_LOGS\Test_&TEST_RUN_NO 
      /remote=connx&x;
    %syslput LOG_LOC=&LOC_BACKTEST_LOGS\Test_&TEST_RUN_NO\&&test&x...log
      /remote=connx&x;
    rsubmit connx&x wait=no ;
      proc printto log="&LOG_LOC"; run;
      options mprint source source2;
      %inc "&LOC_BACKTEST_SCRIPTS\&test_pgm..sas";
    endrsubmit;
    %let waitforlist=&waitforlist connx&x;
  %end;  

  waitfor _all_ &waitforlist;

  %do x=1 %to %to %get_attrn(backtest_scripts,NLOBS);
    signoff connx&x;
  %end;

我的问题 - 我现在如何通过 sassrv 帐户作为元数据用户连接?我知道我可以使用 -metauser XXX -metapass XXX 选项,但我不想如果可能的话,在我的脚本中嵌入密码..

我知道(现在)我们不能将 sassrv 帐户设置为元数据用户,因为它已经在使用中(SAS General Servers 组)。我还需要流式输出,所以不能使用工作区服务器。我尝试在我的 rsubmit 语句中使用 AUTHDOMAIN,但不断收到:

ERROR: Retrieving login information based on AuthenticationDomain from the SAS Metadata Server failed.

所以,最后,我不得不通过带有 metauser / metapass(编码)凭据的选项语句进行连接。但是,为了避免在代码(或日志)中出现这些内容,我们创建了一个只有系统帐户才能访问的网络共享。然后简单地 %inc'd 一个包含凭据的文本文件(确保使用选项 nosource2)。

任务完成!