PLIST (パラメーター・リストの識別)
自由形式構文 | (許可されていない - プロトタイプおよびパラメーターおよび CALLP を使用) |
コード | 演算項目 1 | 演算項目 2 | 結果フィールド | 標識 | ||
---|---|---|---|---|---|---|
PLIST | PLIST 名 |
PLIST 宣言命令は、CALL または CALLB 命令で指定されるパラメーター・ リストに固有の記号名を定義します。
PLIST 命令は、演算内 (合計演算内およびサブルーチン間を含む) の任意の 場所に指定することができます。 制御レベルの指定 (7 から 8 桁目) は ブランクにするか、あるいはプログラムの適切なセクション内のステートメントを グループにまとめるために L1 から 19 標識、LR 標識、または L0 項目を指定することができます。 PLIST 命令の直後には、少なくとも 1 つの PARM 命令が続いていなければなり ません。 条件付け標識の指定 (9 から 11 桁目) は使用できません。
演算項目 1 には、パラメーター・リストの名前を入れなければなりません。 パラメーター・リストが入力パラメーター・リストの場合には、 演算項目 1 に *ENTRY を入れなければなりません。 1 つのプログラムまたはプロシージャーに指定できる *ENTRY パラメーター・リストは 1 つだけです。 パラメーター・リストは、PARM 命令以外の命令が見付かった時に終了します。
ヒント:
アプリケーションにとってパラメーター・タイプの検査が重要である場合には、 PLIST および PARM 命令を使用しないで、呼び出しインターフェースのプロトタイプお よびプロシージャー・インターフェースの定義を定義してください。
詳細については、呼び出し命令または 宣言命令を参照してください。
図 1. PLIST/PARM 命令
*...1....+....2....+....3....+....4....+....5....+....6....+....7....+....
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq....
*
* In the calling program, the CALL operation calls PROG1 and
* allows PROG1 to access the data in the parameter list fields.
C CALL 'PROG1' PLIST1
*
* In the second PARM statement, when CALL is processed, the
* contents of factor 2, *IN27, are placed in the result field,
* BYTE. When PROG1 returns control, the contents of the result
* field, BYTE, are placed in the factor 1 field, *IN30. ご注意
* that factor 1 and factor 2 entries on a PARM are optional.
*
C PLIST1 PLIST
C PARM Amount 5 2
C *IN30 PARM *IN27 Byte 1
*...1....+....2....+....3....+....4....+....5....+....6....+....7....+....
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq....
C CALLB 'PROG2'
* In this example, the PARM operations immediately follow a
* CALLB operation instead of a PLIST operation.
C PARM Amount 5 2
C *IN30 PARM *IN27 Byte 1
*...1....+....2....+....3....+....4....+....5....+....6....+....7....+....
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq....
* In the called procedure, PROG2, *ENTRY in factor 1 of the
* PLIST statement identifies it as the entry parameter list.
* When control transfers to PROG2, the contents of the result
* fields (FieldC and FieldG) of the parameter list are placed in
* the factor 1 fields (FieldA and FieldD). When the called procedure
* returns, the contents of the factor 2 fields of the parameter
* list (FieldB and FieldE) are placed in the result fields (FieldC
* and FieldG). All of the fields are defined elsewhere in the
* procedure.
C *ENTRY PLIST
C FieldA PARM FieldB FieldC
C FieldD PARM FieldE FieldG