cpiNextParserCodedCharSetId

目的

チェーンにある次のパーサー・クラス (もしあれば) によって所有されるデータのコード化文字セット ID (CCSID) を戻すオプションの関数。

定義されている場所 タイプ メンバー
CPI_VFT オプション iFpNextParserCodedCharSetId

構文

int cpiNextParserCodedCharSetId(
    CciParser*  parser,
  CciContext*  context);

パラメーター

parser
パーサー・オブジェクトのアドレス (入力)。
context
プラグイン・コンテキストのアドレス (入力)。

戻り値

データの CCSID が戻されます。 これが不明の場合には、ゼロが戻され、デフォルトの CCSID が適用されます。

サンプル

この例は、サンプル・パーサー・ファイル BipSampPluginParser.c から取られています (820 行~ 839 行)。

int cpiNextParserCodedCharSetId(
    CciParser*  parser,
    CciContext* context
){
    PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
    int                ccsid = 0;

            if (pc->trace) {
        fprintf(pc->tracefile, "PLUGIN: -> cpiNextParserCodedCharSetId() parser=0x%x 
			     context=0x%x\n", parser, context);
              fflush(pc->tracefile);
  }

            if (pc->trace) {
        fprintf(pc->tracefile, "PLUGIN: <- cpiNextParserCodedCharSetId()¥n");
              fflush(pc->tracefile);
  }

    return ccsid;
}

関連概念
ユーザー定義のパーサー
ユーザー定義拡張機能

関連タスク
C でのパーサーの作成

関連資料
cpiNextParserClassName
cpiNextParserEncoding
パーサー・インプリメンテーション関数