SELECT – Retrieve a record or common segment
Use the SELECT request to retrieve
a record by specifying field names and values that identify the record
you want to retrieve.
SELECT <resource> <arguments>
SELECT statement is used to retrieve
an individual record from the HCL Workload Automation for Z database or plans. You must set enough arguments to identify one
record only; if the arguments apply to more than one record, the SELECT fails with RC=8 and the following message:EQQY708E A SELECT REQUEST WITH MORE THAN ONE RECORD SELECTED,
RESOURCE IS AD The SELECT and DELETE statements can be automatically generated from LIST requests (for details, see LIST – Find objects in the Database and Plans).
LIST statements can be automatically generated
for other objects referred to by the object retrieved by the SELECT statement, or objects that may refer to the SELECT statement by using OPTIONS EXPAND(Y).
LIST any event rules that
may point to it and any workstation definitions, special resources,
periods, referenced within it. SELECT(Y) causes
any items found by the LIST processes to also
have a SELECT statement run for them:OPTIONS EXPAND(Y) SELECT(Y)
SELECT ADID(MYAPPL)The end result being, if you have the relevant OUTPUT statements in place, that you obtain batch loader for the
entire object and any other objects needed by it.
When you retrieve a record by using SELECT, you can get the complete record rather than just the common segment
that is available from a LIST request. For
example, SELECT AD retrieves the complete
AD record, while SELECT ADCOM retrieves only
the common segment.
- The
SELECT JSandSELECT JSCOMrequests try to retrieve JCL from the JCL repository. If no JCL is found, it is retrieved from the JCL library or through the job-library-read exit, EQQUX002. The full key is required, that is, the application ID, the input arrival time, and the operation number. You might need to precede theSELECT JSrequest by aLIST CPOPCOMrequest to get the key values. LIST JSCOMrequests try to retrieve JCL only from the JCL repository.SELECT CPOPSRUcan be issued for list elements only, from a list created byLIST CPOPSRU.- The values of PIF arguments as dates depend on the PIF base year,
which is defined by the
PIFCWBkeyword on theINTFOPTSstatement, or theCWBASEkeyword of theINITstatement. The value of theVALTOargument for default high date depends on thePIFHDkeyword of theINTFOPTSstatement or theHIGHDATEkeyword of theINITstatement. CPST(current plan status) is only one record; therefore, select arguments are not required.
- 0
- The request was successful.
- 4
- The request was not successful. No records meet the criteria specified by the arguments.
- 6
- You are not authorized to read the record. You specified a unique key in the SELECT request; the record exists, but you do not have authority to read it.
- 8
- The request was not successful. An error message has been written to the message log data set. This can occur if more than one record in the database satisfies the field values specified by your arguments. For example, you want to select an application description record with the ID APPL1, and there are two such application descriptions in the database with different validity dates. Your arguments must specify both the application ID and the valid-from date to uniquely identify the record.