Outputs data in a format suitable for producing labels
COMMAND SYNTAX
ROW
Number of lines for each record; the output of each element of the output specification is on a separate line, if more elements exist in the output specification than there are rows specified it ignores the extra elements. If specifying more rows than elements, the output specification for these rows will be blank.
SKIP Number of blank lines between each record.
INDENT Number of spaces for left margin.
SIZE Number of spaces required for the data under each column
SPACE Number of horizontal spaces to skip between columns.
C Optional. Suppresses null or missing data. If absent, null or missing values are output as blanks. If present, the C must be upper case and not in quotes.
COL Number of columns required to list the data across the page.
ROW Number of lines for each record; the output of each element of the output specification is on a separate line, if more elements exist in the output specification than there are rows specified it ignores the extra elements. If specifying more rows than elements, the output specification for these rows will be blank.
SKIP Number of blank lines between each record.
INDENTNumber of spaces for left margin.
SIZE Number of spaces required for the data under each column
SPACE Number of horizontal spaces to skip between columns
C Optional: Suppresses null or missing data. If absent, null or missing values are output as blanks. If present, the C must be upper case and not in quotes.
Comments: The total number of columns specified must not exceed the page width, based on the calculation:
ROW must be a minimum of one for each field, plus one for the record key (if not suppressed). If record keys are not suppressed, the first row of each label will contain the record key. If you specify a sort criteria clause, it sorts the records in key order.
If INDENT is not zero, at the prompt supply a series of HEADERs that will appear in the left margin for each field. If a heading is not required for a particular line, press RETURN. Multivalued fields appear on separate lines.
If specified, COL-HDR-SUPP or HDR-SUPP, or the C or H options, the page number, date, and time will not be output and the generated report will be without page breaks.
See also the LIST-LABEL Command.
SREFORMAT
SREFORMAT is similar to the SORT Command in that it generates a formatted list of fields, but directs its output to another file or the magnetic tape rather than to the terminal or printer.
COMMAND SYNTAX
SREFORMAT file-specifier {record-list} {selection-criteria} {USING file-specifier} {output- specification} {format-specification} {(options}
Prompt: At the prompt supply the destination file:
File: Enter a file name, or the word “TAPE” for output to a magnetic tape.
COMMENTS:
“I” option is specified.
Two EOF marks terminate the file on tape. See the REFORMAT Command for Examples.
SSELECT
Generates an implicit list of record keys or specified fields, based on the selection criteria specified
COMMAND SYNTAX
SSELECT file-specifier {record-list} {selection-criteria} {sort-criteria} {output-criteria} {USING file-specifier} {(options}
SYNTAX ELEMENTS 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.
Comments: Unless you specify a sort criteria clause it sorts the records in key order. See also the SELECT Command.
If you specify an output-criteria clause, the generated list will comprise the data (field) values defined by the clause, rather than the selected record keys.
When the Command terminates, it displays the total number of entries in the generated list; the list is available to the next Command. This is indicated by the “>” prompt if you are in jSHELL. If you use the BY-EXP or BY-EXP-DSND connectives 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 jBASIC program.
EXAMPLE 1
SSELECT ORDER WITH ORD.AMT = ‘100’ 23 Records selected
LIST ORDER WITH ORD.QTY > ‘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 ORDER WITH ORD.AMT = “ABC]” BY P.CODE 23 Records selected
>SAVE-LIST SALES.ABC
Select all the records in ORDER file with an ORD.AMT value that starts with ABC. Sort the list into ORD.AMT order and then save the list as SALES.ABC.