PACKAGE_FIRST
Returns the header information for the first package
in the package list
Syntax
CALL PACKAGE_FIRST(
pkgListId,
packageId,
numEntries,
desc,
dateTime,
nameValue,
channel, rc<, properties, propValue1, ...propValueN> );
Required Arguments
- pkgListId
-
identifies the list
of retrieved packages.
- packageId
-
identifies the retrieved
package.
- numEntries
-
returns the number
of entries in the package.
- desc
-
returns a description
of the package.
- dateTime
-
returns the date and
time that the package was published, in GMT format.
- nameValue
-
returns the name/value
pairs assigned to the package. Name/value pairs are site-specific;
they are used for the purpose of
filtering.
- channel
-
returns the name of
a channel to which the package was published.
- rc
-
receives a return code.
Optional Arguments
- properties
-
identifies a comma-separated
list of optional property names to be returned from the package. Valid
property names are as follows:
- propValue1, …propValueN
-
returns one value for
each specified property. The order of the values matches the order
of the property names in the properties parameter. Valid property values are defined as follows:
ABSTRACT |
character string variable, if specified, is returned
to the ABSTRACT variable.
|
EXPIRATION_DATETIME |
numeric variable, if specified, is returned as the
package expiration date-and-time stamp to the EXPIRATION_DATETIME
variable. The date-and-time stamp is in GMT format.
|
Type:Character or Numeric, Output
Examples
Example 1: Using PACKAGE_FIRST
The following example
opens the JSMITH queue, retrieves the descriptive header information
for all packages, and then returns the header information for the
first package.
plist=0;
qname = "MQSERIES://LOCAL:JSMITH";
rc=0;
total=0;
nameValue='';
CALL RETRIEVE_PACKAGE(plist, "FROM_QUEUE",
qname, total, rc);
packageId = 0;
desc='';
num=0;
dt=0;
nv='';
ch='';
rc=0;
CALL PACKAGE_FIRST(plist, packageId,
num, desc, dt, nv, ch, rc);
Example 2: Using PACKAGE_FIRST with Properties
The following example
demonstrates the use of properties.
plist=0;
qname = "MQSERIES://LOCAL:JSMITH";
rc=0;
total=0;
nameValue='';
CALL RETRIEVE_PACKAGE(list, "FROM_QUEUE",
qname, total, rc);
packageId = 0;
desc='';
num=0;
exp=0;
abstract='';
dt=0;
nv='';
ch='';
rc=0;
props='ABSTRACT, EXPIRATION_DATETIME';
CALL PACKAGE_FIRST(plist, packageId, num, desc,
dt, nv, ch, rc, props, abstract, exp);