Record schemas - Latest

Syncsort™ Storage Management Monitor Explorer User Guide

Product type
Software
Portfolio
Integrate
Product family
Syncsort™ software
Product
Syncsort™ Storage Management > Syncsort™ SCC Monitor
Version
Latest
ft:locale
en-US
Product name
Syncsort Storage Management
ft:title
Syncsort™ Storage Management Monitor Explorer User Guide
Copyright
2025
First publish date
1991
ft:lastEdition
2025-12-05
ft:lastPublication
2025-12-05T10:35:42.010000

If fixed format records are returned to the Explorer GUI, the script requires a matching record schema to load the returned data into a grid. The schema can be embedded in the returned data, internally defined in the script, or made available to the script in an external file on the PC.

The topics in this concept:

Scripts that execute the Monitor to obtain data for a grid usually request that the schema be returned with the records. The request is made by specifying the Monitor RECORDS(SCHEMA) parameter in the script code. The input cards that the script passes to Monitor also define the return record format. For example:

Cards:='
#DDNAME=TEMPPDS MEMBER=SYSIN
RULES(NAME(MONRULES) LIST) POOL(MON PRODUCT) RECORD(SCHEMA) INCLUDE(ENVS(DSNAME)) VTOC(SMS)
INCLUDE(VOLUME(
%volser%
))
DD(SYSOUT(TOUTPUT OPT(MSGID)))
#DDNAME=TEMPPDS MEMBER=MONRULES DEFRULE MESSAGE
ISSUE WRITEREC(@GVTOC)
*
* VTOC INFORMATION
*
DEFREC @GVTOC TYPE(DATASET GRID FAST)
FIELD &POOL_NAME HEADER(POOL) KEY(POOLNAME) FIELD &VOLSER HEADER("VOLUME") KEY(VOLSER)
FIELD &DSNAME KEY(DSNAME)
FIELD &DSORG FIELD &LRECL FIELD &BLKSIZE FIELD &RECFM FIELD &SPACE
.
.
.

When Monitor returns the requested records, the records are prepended with the record schema Monitor generates from the DEFREC statements. After executing the script, if you examine the raw data on the Log tab, the record schema messages start with MON10171-I and MON10172-I. The returned records are prefixed with MON10103-I. For performance considerations, the data records are not displayed in the Log tab, but can be viewed in the SYSPRINT output produced by the MONRUNM Monitor task on the host system. The Explorer GUI application can automatically extract the record schema and data records from the returned data, and then use the information to build the grid.


MON10171-I | DATASET | 643 | @GVTOC  
MON10172-I | POOL    |     |       1 |  8 CH | POOLNAME |
MON10172-I | VOLUME  |     |       9 |  6 CH | VOLSER   |
MON10172-I | DSNAME  |     |      15 | 44 CH | DSNAME   |
MON10172-I | DSORG   |     |      59 |  8 CH |          |
MON10172-I | LRECL   |     |      67 | 10 CH |          | INT
MON10172-I | BLKSIZE |     |      77 | 10 CH |          | INT
MON10172-I | RECFM   |     |      87 |  8 CH |          |
MON10172-I | SPACE   |     |      95 |  8 CH |          | 
    .
    .
    .
MON10172-I | VSAM_INDEX          641 |  3 CH |          | BOOL            
MON10103-I | ALLPOOL STOR05SYS1.VTOCIX.STOR05                    PS
2048       | ...                                             
MON10103-I | ALLPOOL STOR05FTP.COLHCA.LOGREC1                    PS
133        | ...                                             
MON10103-I | ALLPOOL STOR05FTP.COLHCA.LOGREC2                    PS
133        | ...                                             
MON10103-I | ALLPOOL STOR05HAL.ABAROUT                           PS
121        | ...                                                 

Schema Defined in the Script

A script can receive fixed format records from host datasets, or user programs that can be executed using the MONRUNP started task. A script can also internally build records by parsing message text returned to the script. Before these records can be displayed in a grid, the records must be mapped by a schema.

The following code segment shows how a script can internally define the record schema using the difcon.recdef property. The segment was extracted from the MVS > Display > Active Jobs script:

difcon.recDef:='
dataRecOffset=13
dataRecPrefix=DIF01390-I
MON10171-I * | 256 R1
MON10172-I JOBNAME   | 1   | 8 CH
MON10172-I STEPNAME  | 9   | 8 CH
MON10172-I PROCNAME  | 17  | 8 CH
MON10172-I SWAP      | 25  | 3 CH
MON10172-I | A       | 28  | 2  | CH
MON10172-I | ASID    | 30  | 4  | CH
MON10172-I | PER     | 34  | 2  | CH
MON10172-I | SMC     | 36  | 3  | CH
MON10172-I | PGN     | 39  | 3  | CH
MON10172-I | DMN     | 42  | 3  | CH
MON10172-I | AFF     | 45  | 7  | CH
MON10172-I | CT      | 52  | 8  | CH
MON10172-I | ET      | 60  | 8  | CH
MON10172-I | WUID    | 68  | 8  | CH
MON10172-I | USERID  | 76  | 8  | CH
MON10172-I | WKL     | 82  | 9  | CH
MON10172-I | SCL     | 91  | 9  | CH
MON10172-I | P       | 100 | 4  | CH
MON10172-I | RGP     | 104 | 8  | CH
MON10172-I | SRVR    | 112 | 3  | CH
MON10172-I | QSC     | 115 | 3  | CH
';     
Note: The MON10171 and MON10172 messages define the record schema. Examine the dataRecOffset and dataRecPrefix topic for information about how to select the data records from the returned data stream.

An external PC file can also be used to define the record schema, and would normally be used if the same record format was used by multiple scripts.

Sample property statement:

difcon.recdef:=LoadFromFile(LOCAL_RECDEFS_DIR+'\jobschema.txt');

The contents of the record schema file are identical to the information described in the previous sections. For an example of the file contents, examine the Schema Defined in the Script section.

dataRecOffset and dataRecPrefix

When the Explorer GUI loads the grid using the records and the schema information, the load procedure needs to know how to determine which returned messages are data records. The dataRecOffset and dataRecPrefix values are used to filter the returned information to extract the data records. The dataRecOffset and dataRecPrefix values can be set in-stream within the schema definition, or set as properties using difcon.dataRecOffset and difcon.dataRecPrefix. An example using in-stream statements:


dataRecOffset=13
dataRecPrefix=DIF01390-I
MON10171-I * | 256 R1
MON10172-I JOBNAME   | 1   | 8 CH
MON10172-I STEPNAME  | 9   | 8 CH
.
.
.
MON10172-I QSC       | 115 | 3 CH  

You can examine the returned information by viewing the Data tab when the Force Log Data field has been enabled to help debug scripts. For more information about setting the debug option, examine Step2 - Setting Preferences (Optional).

Tip: Scripts that build records internally should prefix the records with a fixed-length message identifier so that the Explorer GUI can reliably detect data records. For example, the MVS > Display > Active Jobs script prefixes messages with DIF01390-I and uses a prefix length of 13.
Important: The difcon.dataRecOffset and difcon.dataRecPrefix fields are not required for scripts using Monitor. When Monitor returns both the schema and records, the record schema messages are prefixed with MON10171-I and MON10172-I, and the returned data records are prefixed with MON10103-I. The Explorer GUI internally recognizes these prefixes, so explicit dataRecOffset/dataRecPrefix settings are optional.