Workfile processing using AM=SMARTS

Using AM=SMARTS under Com-Plete to read MVS datasets from online Natural. Is there a way to configure the system so that “READ WORK FILE” returns a record at a time rather than a block of data at a time?

When reading variable length records, I am unable to differentiate between the H’15’ end of record delimiter and an embedded H’15’ that might occur in the data (e.g. packed number (H’00154F’). Also, having issues reassembling the last record in block if it splits into next block.

I’m trying to write a common routine that will process a variety of workfile lengths.

Thanks for any advice!

Chris Walsh

I’m afraid there’s no trivial way. READ WORKFILE reads as much data as fits into the area you provide, AFAIK.
The underlying layer (Smarts) is a C-type environment, which doesn’t have a concept of record length, so you can handle either binary data or data broken into records, but not binary data broken into records.

You’d have to request a new function like GET WORKFILE-RECORD from Natural development if this is a strong requirement.

Steffen