|
On Fri, 2005-12-16 at 07:33 -0800, Willie J. Moore wrote: > Donald, > We have printers though out the plant. When a tech prints a tag we want it to > print at a printer near him. The tech can move around to different areas, but > keep the same handheld with him. The tech could even sign off, so I do not > want them to have to select the location each time they sign on. > > I will give them a menu to select their location and then set the printer ID > that is closest to them in their data area. It would then update his data > area with the printer id. In the print CL, I would read this data area and > load the printer id into a declare statement which would set the printer outq > in the print override. > > If he moves, he could select the menu option to set a new printer id. > > I have used the *LDA in other programs, but never tried to select a data area. > > This seamed so simple at first. But with little experience in RPGLE I am have > some problems. > > Thanks for all the help you are giving me. So, why a data area? Why not a file keyed by user id? UNIQUE R FORMAT UserID 10A LocationId 2A K UserID FUSERS IF E K DISK * Program Status Data Structure D psds sds D sds_proc *proc D $usr 358 367 /free chain $usr USERS; if %found(USERS); // do something endif; *inlr = *on; /end-free That way, if you have 1000 users, you won't have 1000 data areas lying about, just 1000 records in a table and the data will persist easily. Regards, Rich
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.