Writing records - syncsort_simulate_2000 - Latest

Syncsort™ Storage Management Portal 2000 Rules Language Guide

Product type
Software
Portfolio
Integrate
Product family
Syncsort™ software
Product
Syncsort™ Storage Management > Syncsort™ Simulate 2000
Version
Latest
ft:locale
en-US
Product name
Syncsort Storage Management
ft:title
Syncsort™ Storage Management Portal 2000 Rules Language Guide
Copyright
2025
First publish date
1991
ft:lastEdition
2025-11-28
ft:lastPublication
2025-11-28T15:31:25.787000
L1_Product_Gateway
Integrate
L2_Product_Segment
IBM Infrastructure
L3_Product_Brand
Precisely Syncsort
L4_Investment_Segment
Mainframe
L5_Product_Group
Mainframe Storage Optimization
L6_Product_Name
Syncsort Storage Management

The rules language can also produce and write records. The records use symbolic fields and literal strings to produce fixed format records.

The DEFREC statement defines a record used in the rules language. During rules and procedure processing, the SET and ISSUE action statements use the WRITEREC parameter to actually write the record. When the rules are being processed in environments that do not allow file I/O, the records are scheduled to be written to DD statements allocated in the DIF started task, or written to an APPC network node. For non-authorized environments, the records are written to DD statements in the current job step.

Building Records - The DEFREC statement builds the record with the use of FIELD substatements. The FIELD substatements can use symbolic fields or literal values. The LENGTH parameter on the DEFREC defines the logical record size. If not specified, the record length will be established using the last field definition in the record.

The fields can be placed at specific offsets within the record with the POSITION parameter. If no position is specified, the field will be added immediately after the previous field. By default, the compiler obtains the field lengths from the symbolic field, or calculates the length of a literal string. The length can be specified on the field definition with the LENGTH parameter.

The records can contain both character fields and numeric fields. Numeric fields can be specified as binary or packed. If TRANSLATE(ASCII) has been specified, the character fields in the record will be translated to ASCII before the record is written.

The following example illustrates the use of the DEFREC and FIELD statements. The @ACTREC record length is fixed at 245 bytes long, and will be initialized to blanks. The fields that define the record use implicit offsets and lengths - the compiler will calculate the position and length of each field. During program execution, when a rule definition requests a WRITEREC(@ACTREC), the record will be built and written to the RTMDB DD statement.

DEFREC @ACTREC INIT(BLANKS) DDNAME(RTMDB) LEN(245) FIELD &SYSID
FIELD &CURLDATE FIELD &CURDAY FIELD &CURTIME FIELD &JOBNAME FIELD "ACTION " FIELD &VOLSER FIELD &DSNAME FIELD &ENV
FIELD &ENVS FIELD &DADSM_RC FIELD &RUSER
Note: For information about the DEFREC statement, examine DEFREC.