Difference between revisions of "H-Spec Keywords"

From MidrangeWiki
Jump to: navigation, search
Line 1: Line 1:
 
[[Category:RPG]]
 
[[Category:RPG]]
 
Information via [http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/sc092508.pdf Websphere Development Studio: ILE RPG Reference (PDF)] starting on page 245.
 
Information via [http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/sc092508.pdf Websphere Development Studio: ILE RPG Reference (PDF)] starting on page 245.
 +
 +
== Control Specification Statement ==
 +
 +
=== ACTGRP(*NEW | *CALLER | ’activation-group-name’) ===
 +
The ACTGRP keyword allows you to specify the activation group the program is associated with when it is called. If ACTGRP(*NEW) is specified, then the program is activated into a new activation group. If ACTGRP(*CALLER) is specified, then the program is activated into the caller’s activation group. If an activation-group-name is specified, then that name is used when this program is called.
 +
 +
If the ACTGRP keyword is not specified, then the value specified on the command is used.
 +
 +
The ACTGRP keyword is valid only if the CRTBNDRPG command is used. You cannot use the ACTGRP or BNDDIR keywords when creating a program with DFTACTGRP(*YES).
 +
 +
'' '''Note:''' The name of the activation group created when the program is called will have exactly the same case as the text entered for the activation-group-name. The RCLACTGRP command does not allow lower-case text to be specified for its ACTGRP parameter. If it is required to reclaim an activation group individually using the RCLACTGRP command then do not enter lower-case case text for the activation-group-name.''
 +
 +
=== ALTSEQ{(*NONE | *SRC | *EXT)} ===
 +
The ALTSEQ keyword indicates whether an alternate collating sequence is used, if so, whether it is internal or external to the source. The following list shows what happens for the different possible keyword and parameter combinations.
 +
 +
* Keyword/Parameter
 +
** Collating Sequence Used
 +
* ALTSEQ not specified
 +
** Normal collating sequence
 +
* ALTSEQ(*NONE)
 +
** Normal collating sequence
 +
* ALTSEQ, no parameters
 +
** Alternate collating sequence specified in source
 +
* ALTSEQ(*SRC)
 +
** Alternate collating sequence specified in source
 +
* ALTSEQ(*EXT)
 +
** Alternate collating sequence specified by the SRTSEQ and LANGID command parameters or keywords.
 +
 +
If ALTSEQ is not specified or specified with *NONE or *EXT, an alternate collating sequence table must not be specified in the program.
 +
 +
=== ALWNULL(*NO | *INPUTONLY | *USRCTL) ===
 +
The ALWNULL keyword specifies how you will use records containing null-capable fields from externally described database files.
 +
 +
If ALWNULL(*NO) is specified, then you cannot process records with null-value fields from externally described files. If you attempt to retrieve a record containing null values, no data in the record will be accessible and a data-mapping error will occur.
 +
 +
If ALWNULL(*INPUTONLY) is specified, then you can successfully read records with null-capable fields containing null values from externally described input-only database files. When a record containing null values is retrieved, no data-mapping errors will occur and the database default values are placed into any fields that contain null values. However, you cannot do any of the following:
 +
* Use null-capable key fields
 +
* Create or update records containing null-capable fields
 +
* Determine whether a null-capable field is actually null while the program is running
 +
* Set a null-capable field to be null.
 +
 +
If ALWNULL(*USRCTL) is specified, then you can read, write, and update records with null values from externally described database files. Records with null keys can be retrieved using keyed operations. You can determine whether a null-capable field is actually null, and you can set a null-capable field to be null for output or update. You are responsible for ensuring that fields containing null values are used correctly.
 +
 +
If the ALWNULL keyword is not specified, then the value specified on the command is used.
 +
 +
For more information, see “Database Null Value Support” on page 209

Revision as of 18:49, 29 November 2005

Information via Websphere Development Studio: ILE RPG Reference (PDF) starting on page 245.

Control Specification Statement

ACTGRP(*NEW | *CALLER | ’activation-group-name’)

The ACTGRP keyword allows you to specify the activation group the program is associated with when it is called. If ACTGRP(*NEW) is specified, then the program is activated into a new activation group. If ACTGRP(*CALLER) is specified, then the program is activated into the caller’s activation group. If an activation-group-name is specified, then that name is used when this program is called.

If the ACTGRP keyword is not specified, then the value specified on the command is used.

The ACTGRP keyword is valid only if the CRTBNDRPG command is used. You cannot use the ACTGRP or BNDDIR keywords when creating a program with DFTACTGRP(*YES).

Note: The name of the activation group created when the program is called will have exactly the same case as the text entered for the activation-group-name. The RCLACTGRP command does not allow lower-case text to be specified for its ACTGRP parameter. If it is required to reclaim an activation group individually using the RCLACTGRP command then do not enter lower-case case text for the activation-group-name.

ALTSEQ{(*NONE | *SRC | *EXT)}

The ALTSEQ keyword indicates whether an alternate collating sequence is used, if so, whether it is internal or external to the source. The following list shows what happens for the different possible keyword and parameter combinations.

  • Keyword/Parameter
    • Collating Sequence Used
  • ALTSEQ not specified
    • Normal collating sequence
  • ALTSEQ(*NONE)
    • Normal collating sequence
  • ALTSEQ, no parameters
    • Alternate collating sequence specified in source
  • ALTSEQ(*SRC)
    • Alternate collating sequence specified in source
  • ALTSEQ(*EXT)
    • Alternate collating sequence specified by the SRTSEQ and LANGID command parameters or keywords.

If ALTSEQ is not specified or specified with *NONE or *EXT, an alternate collating sequence table must not be specified in the program.

ALWNULL(*NO | *INPUTONLY | *USRCTL)

The ALWNULL keyword specifies how you will use records containing null-capable fields from externally described database files.

If ALWNULL(*NO) is specified, then you cannot process records with null-value fields from externally described files. If you attempt to retrieve a record containing null values, no data in the record will be accessible and a data-mapping error will occur.

If ALWNULL(*INPUTONLY) is specified, then you can successfully read records with null-capable fields containing null values from externally described input-only database files. When a record containing null values is retrieved, no data-mapping errors will occur and the database default values are placed into any fields that contain null values. However, you cannot do any of the following:

  • Use null-capable key fields
  • Create or update records containing null-capable fields
  • Determine whether a null-capable field is actually null while the program is running
  • Set a null-capable field to be null.

If ALWNULL(*USRCTL) is specified, then you can read, write, and update records with null values from externally described database files. Records with null keys can be retrieved using keyed operations. You can determine whether a null-capable field is actually null, and you can set a null-capable field to be null for output or update. You are responsible for ensuring that fields containing null values are used correctly.

If the ALWNULL keyword is not specified, then the value specified on the command is used.

For more information, see “Database Null Value Support” on page 209