# jCL PQ-SELECT
Updated: 2/24/2021, 3:51:59 PM
Created: 2/24/2021, 3:51:59 PM
Last Updated By: Daniel Klein
Read Time: 1 minute(s)
This command when executed from a jCL program, loads a list of keys into a select register. It takes the general form:
Where register-number is the number of the select register (1 to 5) in which the keys are to be placed.
To use PQ-SELECT, a list must first be constructed using one of the list processing commands such as SELECT, SSELECT , QSELECT, BSELECT, GET-LIST, FORM-LIST, SEARCH or ESEARCH.
Put the PQ-SELECT command in the stack so that it will be processed as part of the external job stream when the required list is active.
Retrieve the list elements one at a time, using a "!n" direct or an indirect reference.
PQ-SELECT cannot be executed directly from the shell.
001 PQN 002 HSSELECT SALES 003 STON 004 HPQ-SELECT 1 005 P 006 10 MV %1 !1 007 IF # %1 X Done 008 T %1 009 GO 10
This example selects all the records in the SALES file, loads the record-list into select register 1 and displays the keys one at a time.
Back to jCL.