dadllxch2

DLL 使用法

ライブラリ: dadllxch2

このライブラリには、以下に関する機能が含まれています。

  • ASCII ファイル
  • ASCII ファイルフィールド
  • 定義ファイルの作成と処理
  • 関係
  • 変換
  • 範囲
  • テキスト定数

このように、これらの対象はテーブル daxch002、daxch003、daxch005、daxch006、daxch012、および daxch010 です。

パラメータに関する一般的な注釈は以下のとおりです。

  • オプションのパラメータ company を指定することにより、処理または検索を実行する会社を指定できます。実際の呼出でパラメータを指定しない場合は、現行会社が使用されます。
  • 消去セッションの大部分では、ほとんどすべてのパラメータがオプションです。次のルールに従います。
  • cxch.t が渡されない場合は、cxch.f に等しく設定されます。
  • その他の開始フィールドと終了フィールドは、必ず一緒に存在します。これらが渡されない場合は、set.min() resp. set.max() の値が使用されます。
  • do.commit パラメータが指定されない場合は、true とみなされます。
  • その結果 (以上のことから次のようになります): 引数の数字が奇数であるか、または 2 に等しく、2 番目のパラメータがブールタイプである場合に (タイプが文字列の場合は、2 番目の引数は cxch.t です)、最後のパラメータが do commit として使用されます。
  • この DLL では、会社の権限はテストされません。権限が前提となっています (現行で知られている使用法では、会社番号をフォームに入力して to.company の切り替えを実行することで、テストされています)。
DLL プロトタイプ

 function extern long ASCII.field.is.used(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file,
const domain daxch.fdnm field.name )
前 : true 
返値: 指定された ASCII フィールドがインポートまたはエクスポートで使用されるかどうか 
後 : ret => 2 つのレコード daxch022 または daxch032 のうち少なくとも 1 つには、指定された ASCII フィールドをポイントするレコードが格納される

function extern long ASCII.field.is.used.in.export(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file,
const domain daxch.fdnm field.name,
[ domain daxch.cbat batch ],
[ domain daxch.batl batl ] )
前 : true 
返値: 指定された ASCII フィールドが、エクスポートフィールド関係で使用されるかどうか 
後 : ret => daxch032 のレコードには、指定された ASCII フィールドをポイントするレコードが格納される

function extern long ASCII.field.is.used.in.import(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file,
const domain daxch.fdnm field.name,
[ domain daxch.cbat batch ],
[ domain daxch.batl batl ] )
前 : true 
返値: 指定された ASCII フィールドが、指定の交換スキームのインポートフィールド関係で使用されているかどうか。ASCII フィールドに指定されている省略可の各パラメータを、指定のバッチ行で使用する必要があるかどうか。
後 : ret => daxch022 のレコードに、指定された ASCII フィールドをポイントするレコードが格納されます

function extern long ASCII.fieldname.exists(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file,
const domain daxch.fdnm ASCII.fdnm )
前 : true 
返値: 指定の ASCII ファイルのフィールド名が存在するかどうか 
後 : daxch003 の各フィールドに値が格納されます

function extern long ASCII.fieldnumber.exists(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file,
domain daxch.intg field.no )
前 : true 
返値: 指定の ASCII ファイルのフィールド番号が存在するかどうか 
後 : daxch003 の各フィールドに値が格納されます

function extern long ASCII.file.exists(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file,
[ long company ] )
前 : true 
返値: 指定の ASCII ファイルが存在するかどうか 
後 : daxch002 の各フィールドに値が格納されます

function extern clear.ASCII.fields(
domain daxch.cxch cxch.f,
[ domain daxch.cxch cxch.t ],
[ domain daxch.casf casf.f ],
[ domain daxch.casf casf.t ],
[ domain daxch.pint fdno.f ],
[ domain daxch.pint fdno.t ],
[ long do.commit ] )
前 : true 
後 : ASCII ファイルの各フィールドは、[開始] および [終了] フィールドの inrange により削除されます。
状況 : do.commit <=> 新規の再試行ポイントが設定され、コミットされます

function extern clear.ASCII.files(
domain daxch.cxch cxch.f,
[ domain daxch.cxch cxch.t ],
[ domain daxch.casf casf.f ],
[ domain daxch.casf casf.t ],
[ long do.commit ] )
前 : true 
後 : ASCII ファイルは、[開始] および [終了] フィールドの inrange により削除されます。
状況 : do.commit <=> 新規の再試行ポイントが設定され、コミットされます

function extern clear.conversions(
domain daxch.cxch cxch.f,
[ domain daxch.cxch cxch.t ],
[ domain daxch.ttbl ttbl.f ],
[ domain daxch.ttbl ttbl.t ],
[ domain daxch.tfld tfld.f ],
[ domain daxch.tfld tfld.t ],
[ long do.commit ] )
前 : true 
後 : フィールドごとの変換は、[開始] および [終了] フィールドの inrange により削除されます。
状況 : 新規の再試行ポイントが設定され、コミットされます

function extern clear.ranges(
domain daxch.cxch cxch.f,
[ domain daxch.cxch cxch.t ],
[ domain daxch.cbat cbat.f ],
[ domain daxch.cbat cbat.t ],
[ domain daxch.ttbl ttbl.f ],
[ domain daxch.ttbl ttbl.t ],
[ long do.commit ] )
前 : true 
後 : フィールドごとの変換は、[開始] および [終了] フィールドの inrange により削除されます。
状況 : 新規の再試行ポイントが設定され、コミットされます

function extern clear.relations(
domain daxch.cxch cxch.f,
[ domain daxch.cxch cxch.t ],
[ domain daxch.crel crel.f ],
[ domain daxch.crel crel.t ],
[ long do.commit ] )
前 : true 
後 : 関係は、[開始] および [終了] フィールドの inrange により削除されます。
状況 : 新規の再試行ポイントが設定され、コミットされます

function extern long conversion.exists(
const domain daxch.cxch xch.scheme,
const domain daxch.ttbl triton.table,
const domain daxch.tfld triton.field )
前 : true 
返値: 指定の交換スキーム内の指定されたテーブルフィールドに関して変換が存在するかどうか 
後 : daxch006 の各フィールドに値が格納されます

function extern long create.definition.file(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file,
const string def.file() )
返値: 指定の ASCII ファイルに関して定義ファイルを作成可能かどうか。
後 : ret ==> 指定の ASCII ファイルの定義が def.file に格納されます。
説明 : 定義ファイルのレイアウトについては、関数 load.definition.file (このライブラリ) の dll 使用法を参照してください

function extern long determine.record.length(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file,
const string separator() )
前 : true 
返値: - isspace(separator) の場合:
daxch003 から求められるレコード長
(ASCII ファイルフォーマット):
* 指定の ASCII ファイルに関して MAX(開始位置 + 長さ - 1)
* ASCII ファイルにフィールドがない場合は、MaxLineLen。
- isspace(separator) でない場合: MaxLineLen

function extern long exists.one.ASCII.field(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file )
前 : true 
返値: 指定の ASCII ファイルに ASCII フィールドが 1 つでも存在するかどうか

function extern long get.last.fieldnumber(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file )
前 : true 
返値: xch.schemeまたは ASCII ファイルのフィールド番号の最大値。フィールド番号が見つからない場合、またはエラーの場合は 0

function extern long get.max.srno(
const domain daxch.cxch xch.scheme,
const domain daxch.cbat batch,
const domain daxch.ttbl tble )
前 : true 
返値: 指定のテーブルの範囲に関する srno の最大値 (範囲が存在しない場合は 0)

function extern long get.number.of.fields(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file )
前 : true 
返値: 指定の ASCII.file にある ASCII ファイルフィールド (= ASCII ファイルフォーマット) の数

function extern long get.text.constant(
[ long processing.company ],
[ long startup.company ] )
前 : true 
返値: 会社 startup.company のテーブル内の processing.company に属するテキスト定数

function extern long is.multiline.text.field(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file,
const domain daxch.fdnm ASCII.fdnm )
前 : true 
返値: 指定の ASCII ファイルのフィールド名が存在し、そのタイプが複数行かどうか 
後 : daxch003 の各フィールドに値が設定されます

function extern long load.definition.file(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file,
const string def.file() )
前 : xch.scheme <> "" および ASCII.file <> "" の両方がテーブルに存在している必要がある (daxch001 および daxch002) 
返値: ファイル def.file の内容を使用して ASCII ファイルレイアウトを作成可能かどうか 
後 : ret = true ==> daxch003 には指定の ASCII ファイル用の ASCII ファイルレイアウトが格納されています
ret = false => テーブル daxch003 は変更されていません (使用されるデータベースに関して中断メカニズムが正しく動作した場合) 
説明 : def.file 内の各行は、以下のフォーマットである必要があります。
位置 1- 2 フィールド番号 (数値)
位置 5-12 フィールド名
位置 13-42 説明
位置 43-46 フィールド位置 (数値)
位置 47-50 フィールド長 (数値)
位置 51 フィールドタイプ (正の整数)
位置 52-53 日付フォーマット (正の整数)
位置 54 浮動小数点 (yes/no)
位置 55-56 小数点以下の桁数 (正の整数)

function extern long range.exists(
const domain daxch.cxch xch.scheme,
const domain daxch.cbat batch,
const domain daxch.ttbl tble )
前 : true 
返値: 指定のテーブル/バッチ/xch スキームの組み合わせに関して範囲が存在するかどうか

function extern recalculate.start.positions(
const domain daxch.cxch xch.scheme,
const domain daxch.casf ASCII.file )
前 : true 
後 : ASCII ファイル各フィールドの開始位置の番号が再採番されています。
説明 : この関数は、フィールド長にもとづいて ASCII ファイルの開始位置を再計算します。先頭のフィールドが開始位置 1 となり、他のフィールドの開始位置は、次式で求められます。
直前のフィールドの開始位置 + 直前のフィールドの長さ
注: 複数行フィールド (0) の開始位置は不変です。

function extern long relation.exists(
const domain daxch.cxch xch.scheme,
const domain daxch.crel daxch.base.rel.code )
前 : true 
返値: 指定の関係が存在するかどうか 
後 : daxch005 の各フィールドに値が入ります (指定の関係内でのランダムな変換により)

function extern update.conversion(
const domain daxch.cxch xch.scheme,
const domain daxch.ttbl triton.table,
const domain daxch.tfld triton.field,
const domain daxch.crel conv.relation )
前 : true 
後 : daxch006 に xch.scheme/TRITON テーブル/TRITON フィールドの組み合わせがすでに存在している場合、daxch006.crel は conv.relation に設定されます。それ以外の場合は、テーブル daxch006 に、xch.scheme、TRITON テーブル、TRITON フィールドおよび conv.relation の組み合わせを持つ新規レコードが挿入されます

function extern long update.text.constant(
[ long processing.company ],
[ long startup.company ] )
前 : 現行のバッチ行が tttxt001 を処理する必要があります 
返値: processing.company に関するテキスト定数 (現行のテキスト番号のうち最も大きな値) 
後 : この返値は会社 startup.company のテーブル (daxch010) にも格納され、以降のアプリケーションバッチ行で利用可能になります。
状況: retry.point が設定され、コミットされます

関連トピック