|
rob wrote:
Now, if you have multiple CL names I'd store the device name in a dataarea, retrieve that, and use that in the CPYTOTAP.
I've used a lot of *dtaaras, but I've (slowly) been moving away from them. Instead, I try to add entries to a *usridx.
It doesn't take a lot to create basic, generic AddUIEntry, RmvUIEntry and RtvUIEntry procs/cmds. Once you have them, they can be used as easily as CHGDTAARA or RTVDTAARA.
You can add named entries to the *usridx, each entry with very different characteristics if needed -- some *CHAR(10), some *CHAR(200), some *DEC(7 2), whatever. Each can have a very descriptive index key that effectively replaces the name of a *dtaara object.
You have a single object, one owner, one set of authorities. Lots of flexibility to change the data-definition of the element on-the-fly -- *CHAR(100) wasn't big enough? No problem; change it to *CHAR(1000) and write it back out.
And once you start using it, you can find lots of other uses.Of course, a *dtaara for a device name that's really only used in one small part of programming... not much point in getting fancy and creating a whole mini-app. If you already have procs and a *usridx available ahead of time, though,...
Tom Liotta
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.