Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

SSELECT

Description

SSELECT generates an implicit list of record keys or specified fields, based on the selection criteria specified. It takes the general form: 

SSELECT file-specifier {record-list} {selection-criteria} {sort-criteria} {output-criteria} {USING file-specifier} {(options}

 where options are:

  • C{n} Display running counters of the number of records selected and records processed. Unless modified by n, the counter increments after every 500 records processed or the total number of records if less than 500.
  • n specifies a number other than 500 by which to increment. For example, C25 increments the counter after every 25 records processed.

 

Note:

The records will be sorted in key order unless a sort criteria clause is specified.


If an output-criteria clause is specified, the generated list will comprise the data (field) values defined by the clause, rather than the selected record keys.

When the command terminates, the total number of entries in the generated list is displayed and the list is made available to the next command. This is indicated by the ">" prompt if in jSHELL.

If the BY-EXP or BY-EXP-DSND connectives are used on a multivalued field, the list will have the format:

record-key]multivalue#

where multivalue# is the position of the multivalue within the field specified by BY-EXP or BY-EXP-DSND. multivalue# can be accessed by a READNEXT Var,n statement in a jBC program.

 

EXAMPLE 1

SSELECT SALES WITH S.CODE = "ABC]"
23 Records selected
>LIST SALES WITH VALUE > "1000"

Select all the records in SALES file with an S.CODE value that starts with ABC. Sort the list into key order. Then, using the list, report on the records in the SALES file which have a VALUE field greater than 1000.

EXAMPLE 2

SSELECT SALES WITH S.CODE = "ABC]" BY P.CODE
23 Records selected
>SAVE-LIST SALES.ABC

Select all the records in SALES file with an S.CODE value that starts with ABC. Sort the list into P.CODE order and then save the list as SALES.ABC.


See also the SELECT command.

Back to JQL

Was this article helpful?