You can format the record with SPECs using WHILE and record() to
extract from a moving position in the record, but whether you write a
specs program or a REXX program is probably eins bier.   j.

2010/8/12 van Sleeuwen, Berry <[email protected]>:
> Hi Listers,
>
> I am looking into the data a linux machine can put into the CP MONITOR.
> For instance process mon_fsstatd gives us filesystem statistics in the
> CP MONITOR. Most records within the CP MONITOR are fixed in length but
> not this one. I'd like to process this data within a pipe but the
> problem is that several fields within the records are variable in
> length.
>
> The first part of the record is fixed, 9.8 for the TOD, 25.8 for the
> Userid. But once the filesystemdata starts, there are a few fields that
> are of variable length. Basically a value contains two fields, the first
> is the length, the second is the value, the size is the previous
> mentioned length. Then the next value is once again a field with the
> length and next the actual data. Obviously the start of the second value
> depends on the length of the first value.
> To process this records within a pipeline it would require the pipeline
> to get the length of the field, print the actual field and then proceed
> with the next value but is has to be able to calculate the start of the
> next field.
>
> So something like:
>
> 65.2    size1
> 65+2.size1    printvalue1
> 65+2+size1.2    size2
> 65+2+size1+2.size2    printvalue2
> 65+2+size1+2+size2.2    size3
>
> etc.
>
> Actually, it is more or less the same as the raw data of MONWRITE where
> the first part of the record gives the length of that record.
>
> I can write my own rexx stage to process the records but can this also
> be done without a custom stage?
>
>
>
> Met vriendelijke groet/With kind regards,
> Berry van Sleeuwen
> Flight Forum 3000 5657 EW Eindhoven
>
> ( +31 (0)6 22564276
>
>
>

Reply via email to