ビジネス・インテリジェンス[BI] のリーディング・カンパニー | SAS Japan SAS Japan
「THE POWER TO KNOW(知る力)」を提供するビジネス・インテリジェンス[BI]のリーディング・カンパニー | SAS Japan  トレーニング マニュアル ユーザー事例 パートナー ユーザー会 求人情報 資料請求・ダウンロード
Home News Products & Solutions Events & Seminer Customer Support Company www.sas.com
 

SCL内で、同一のFORMATエントリを繰り返し定義する場合の反映方法

[OS]ALL
[リリース] 8.1, 8.2
[キーワード] SCL, FORMAT, _setupformat

[質問]

SAS/AF(FRAMEエントリ、SCLエントリなど)で作成するアプリケーションにおいて、アプリケーション内(SUBMITブロック)でフォーマットエントリの作成を繰り返したいとき、なにか便利な方法はありますか。

[回答]

「_setupformatコンポーネント」を利用することで、作成が便利になることがあります。

■ _setupformatコンポーネントの使用例
  init:
    /* 変数宣言 */
        dcl object id;
        dcl string temp;
    /* SASHELP.CLASSESS.NUMFORMAT.CLASS のロードおよびインスタンス化 */
        id= instance(loadclass('sashelp.classes.numformat'));

   /* フォーマット FOO の作成  */
      submit continue;
       proc format;
          value foo             
          0= 'Man';
        run;
      endsubmit;
      rc= id._setUpFormat('foo.');
      if rc = 0 then do;
        temp= id._put(0);
        put temp=;
      end;
      id._delFormat(0);

 /* フォーマット FOO の再作成  */
       submit continue;
         proc format;
           value foo
           0= 'Woman';
         run;
       endsubmit;
       rc= id._setUpFormat('foo.');
       if rc = 0 then do;
         temp= id._put(0);
         put temp=;
       end;
       return;
      main:
        return;
      term:
      return;

■ 出力結果
LOGウィンドウに、以下のように表示されます。
temp=Man 
temp=Woman

[詳細]

setupformat コンポーネントの詳細については、SASヘルプから「_Setupformat」をキーワードにして検索してください。検索結果から「Format/Informat Component: _setupFormat」をクリックすると、詳細が確認できます。

The Power to Know
   Contact Us     Terms of Use & Legal Information     Privacy Statement     個人情報の取り扱いについて   Copyright © 2008 SAS Institute Inc. All Rights Reserved