Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/supi3/memordm.com/public_html/as/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340
AS400サブファイル その3

AS400サブファイル その3

サブファイルにレコードが無いときの処理

サブファイルの活動状態/非活動状態

活動状態

サブファイルにレコードを書き込んだ状態です。
1つのプログラムで最大12の活動状態のサブファイルを持てます。

Javaで例えると、List型のオブジェクト(インスタンス)にレコードのオブジェクト(インスタンス)を登録したイメージでしょうか。
最大12のListインスタンスをもてます。

非活動状態

サブファイルにレコードが何もない状態です。
サブファイルを消去した場合、非活動状態になります。

活動状態にないサブファイルを表示するとエラーになります。

よって、「無し」などの固定値を書き出します。
選択標識をセットし、不必要なフィールドはDSPATR(ND)にして非表示にします。

Javaで例えると、ListのインスタンスがNullの状態です。Listオブジェクトは必要です。「なし」の情報を含むダミーのレコードのインスタンスを生成して、Listオブジェクトに登録します。

コーディング例まとめ

ファイル仕様書

サブファイルを仕様する時は継続行(K)でサブファイル名とサブファイルの相対レコード番号を指定します。

演算仕様書

a.見出しパネルの表示
プログラムを介ししたら見出しパネルを表示し、捜査員の入力をまちます
EXFMT PANEL01
コマンド・キー3によって、標識03がオンになるまでプログラムを繰り返します。
DOUEQ~END、IFEQ~END

b.レコードの読み取りと書き出し
検索コードによって品目マスターを順次に読み取り、サブファイルに書き出します。
この処理はファイルの終わりか、サブファイルがいっぱいになるまで繰り返します。
サブファイルへの書き出しは相対レコード番号(RRN)をセットしてから行います。
WRITE サブファイルのレコード様式名

c.サブファイルの表示
ファイルの終わりか、サブファイルがいっぱいになったらサブファイルを表示します。
もし、サブファイルにレコードが無い場合は、仮のレコードを書き出してから表示します。
サブファイルの表示は、該当の標識をオンにしてから書き出し命令を与えます。
EXFMT サブファイル制御レコードのレコード様式名

d.サブファイルの消去
次の探索に備えてサブファイルを消去します。
サブファイルの消去は、該当の標識をオンにしてから書き出し命令を与えます。
WRITE サブファイル制御レコードのレコード様式名

e.コマンドキーの処理
操作員がおしたコマンド・キーを検査して、もしコマンド・キー12が押されたら、探索コードを最初の値にセットしてから、レコードの読み取りと書き出しを行います。
コマンドキー11の場合は、続けてレコードの読み取りと書き出しを行います。
DOWEQ/ ANDEQ ~END

f.読み取り開始レコードのセット(サブルーチン)
操作員の打鍵した探索コードを探索フィールドに移してから、レコードのセットを行います。探索フィールドはキー・フィールドの属性と等しくなければなりません。
SETLL

対話型プログラムの作成手順

SEUの起動

STRSEU SRCFILE(ライブラリー名/ソース・ファイル名) SRCMBR(ソース・メンバー名) TYPE(RPG)

SRCFILE:QRPGSRCが標準です。
SRCMBR:プログラム名を指定します。

RPGプログラムの作成

CRTRPGPGM PGM(ライブラリー名/プログラム名) SRCFILE(ライブラリー名/ソース・ファイル名) SRCMBR(ソース・メンバー名) REPLACE(*YES)

省略時の値:SRCFILE(QRPGSRC)
SRCMBR(*PGM) : PGMで指定したプログラム名
REPLACE(*YES) : 実行可能プログラムの置きかえ

スポンサーリンク
memordmレクタングル(大)
memordmレクタングル(大)

シェアする

  • このエントリーをはてなブックマークに追加

フォローする

スポンサーリンク
memordmレクタングル(大)