On Mon, 17 Aug 2020 at 22:46, David Boyes <dboye...@gmail.com> wrote:

> Was looking through the manual and couldn’t find anything obvious that
> could do this. Did I miss something?
>
> If not, I’d like to suggest a stage or stages that lets you both read and
> update a CMS NAMES format file. Most of the uses of NAMES files these days
> are quick no-frills datastores for small numbers of entries. There’s a good
> section in the Pipes manual on SQL, but DB2/VM is very difficult to obtain
> these days and is generally overkill for these little datastores with a few
> dozen entries or so. The CMS NAMEFIND command will do the reading part, but
> the ability to update would be a real boon (the NAMES command relies on a
> fairly cryptic external XEDIT macro to update the file). There has to be a
> better way; alternative ideas or suggestions welcomed.
>

Correct, there isn't. I don't think there's an API to operate on NAMES
files. As you say, reading can be done by running NAMEFIND through the
COMMAND stage and intercept the response. As the NAMES file is frequently
RECFM V, updating in general means rewriting and replacing a section. And
if you don't know the tags you're looking for, then reading would also need
to be done by hand. I suppose when I talk to enough people to understand
the format of the files, I could come up with a few examples showing how to
dissect and assemble the files.

Considering the various restrictions, I have some doubts about leveraging
it as a generic registry. Would it help if CMS Pipelines were able to make
sense of JSON data? I would expect a stream of JSON documents where you can
extract, modify or remove objects. The stream could come from a CMS file as
well as from the Internet.

Rob

Reply via email to