access.sreformat Verb: Access/Access: Verbs


Command access.sreformat Verb: Access/Access: Verbs
Applicable release versions: AP, R83
Category Access: Verbs (152)
Description moves the sorted values from the attributes specified in the Access sentence and places them either in another file or to tape in the order of the specified sort key(s) (specified in "seqlist").

Each entry in the outlist becomes an attribute in the destination item, in the same order as in the outlist. The source item-id is selected first and becomes the destination item-id, unless "id-supp" (or an "i" option) is specified. In this case, the first attribute value becomes the new item-id.

Upon execution of this command, the prompt, "file name:", appears on the screen. Either a file.reference may be entered, which directs the output to the specified file.reference, or the literal, "tape", which directs the output to the attached magnetic tape.

The output specifications indicate those attributes that are to be selected.

The attributes are written to the new file or tape in the order they are selected.

To write the output back onto the source file, press <return> or <enter>. If the items are to be written back to the source file, an item list must be specified or a list must be active. Otherwise, an infinite loop condition may result, in which items are continually added to the file!

When a file is reformatted to tape, the values are concatenated and either truncated or padded at the end with nulls (hexadecimal 00) to the record length specified by the most recently executed "t-att" verb. One tape record is written for each item.

The item-ids are printed as items are not printed as the items are transferred.

A tape label, containing the file name, tape record length in hexadecimal, time, and date, is written first, unless the "hdr-supp" or "col-hdr-supp" connectives ("h" or "c" options) are specified. Two end-of-file (eof) marks terminate the tape.

Any processing code (or correlative) that refers to a selected attribute is applied before the item is written to the destination file or tape.
Syntax sreformat file.reference {sellist} {itemlist} {outlist} {seqlist} {modlist} {options}
filename:{destination-file | tape }
Options * see "options: Access"
:sreformat sls by region region total amount (d
Related access.options