Use the Add Parameter page in the Program Call wizard to define a parameter required by the program object or service program object that you want to call. The maximum number of parameters for a service program is 7. Select the Advanced check box to show the advanced attributes for a parameter. You can find more information about each field in the IBM Toolbox for Java information under PCML data tag.
Option | Description |
---|---|
Parameter name | The name of the parameter. Must be a valid Java variable name. |
Data type | The type of data being used for the parameter:
|
Length | The length that the parameter requires. See Values for length and precision. You can enter a numeric or select a value from the drop-down list. Values in the list are data elements of type int that are referenced by your program. |
Precision | The number of bytes of precision for some numeric data types. See Values for length and precision. |
Count | The size of the array. If Count is left blank, the parameter is not defined as an array, although it may be defined as an element of a structure that is defined as an array. |
Usage | The usage of the parameter (character and numeric types are converted):
|
Initial value | An initial value for the parameter, if it is not explicitly set by the application program when the usage of the parameter is input or input & output. See the init attribute in PCML data tag. |
Output size | The number of bytes to reserve for output data for the parameter. This field should be left blank for fixed size output parameters. See the outputsize attribute in PCML data tag. |
Trim | Trimming of white space from character data:
|
Bidi string type | The bidirectional string type for parameter with data type character. See the bidistringtype attribute in PCML data tag. |
Min. version | The lowest version of iSeries on which this element exists. See the minvrm attribute in PCML data tag. |
Max. version | The highest version of iSeries on which this element exists. See the maxvrm attribute in PCML data tag. |
Offset | The offset to the element within an output parameter. See the offset attribute in PCML data tag. |
Offset from | The base location from which the offset attribute is relative. See the offsetfrom attribute in PCML data tag. |
CCSID | The host Coded Character Set ID for the character data type parameter. If this field is left blank, the default CCSID of the host environment is used. See the ccsid attribute in PCML data tag. |
Passed by | How the parameter is passed. (Only for service program call parameters)
|
Click Specify to add parameters from a physical or logical data file, which has file type PF-DTA, LF, PF38-DTA or LF38. See Specify database reference field.
If your parameter was created in the Specify Database Reference Field window, you can update or list properties:
Click Synchronize to include the changes that were made to the data file after the parameter was created.
Click Show to list the data properties of the field in the data file when the parameter was created.
Allows you to add parameters from field definitions of a data file.
The length and precision attributes have different values for each data type. The following table lists each data type with a description of the possible values for length and precision.
character | The number of characters for this parameter. | Not applicable |
UCS-2/graphics | The number of characters for this parameter. | Not applicable |
integer | The number of bytes for this parameter | Indicates the number of bits of precision and whether the integer is signed or unsigned. |
2 bytes | Use precision 15 for a signed 2-byte integer (default). Use precision 16 for an unsigned 2-byte integer |
|
4 bytes | Use precision 31 for a signed 4-byte integer. Use precision 32 for an unsigned 4-byte integer. |
|
8 bytes | Use precision 63 for a signed 8-byte integer. | |
packed decimal or zoned decimal | The number of digits of data for this parameter. | The number of decimal digits for the parameter. This number must be greater than or equal to zero and less than or equal to the total number of digits specified in the length field. |
floating point | The number of bytes for this parameter: 2, 4, or 8. | Not applicable |
byte | The number of bytes of data for this parameter. | Not applicable |
structure | Not allowed | Not applicable |
The following table shows the corresponding length and precision for integer declaration in an RPG program:
3 | byte | 1 | Not applicable |
5 | integer | 2 | 15 for signed, 16 for unsigned |
10 | integer | 4 | 31 for signed, 32 for unsigned |
20 | integer | 8 | 63 for signed |
The following table shows the corresponding length and precision for integer declaration in a COBOL program:
PIC 9(1) to PIC 9(4) | integer | 2 | 15 |
PIC 9(5) to PIC 9(9) | integer | 4 | 31 |
PIC 9(10) to PIC 9(18) | integer | 8 | 63 |
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.