|
We have an rpg program (PROG1) that, based on the workstation id of the caller, determines the company and location being processed and the printer id. The cl program (CL1) that called PROG1 then changes the current library, does overrides for a number of jobs in the call stream and calls the primary order entry program. Very seldom do the company/loc/printerid change between calls and then only for super users. If they are changed, it would be acceptable to reroute the job and have the person enter the command/menu item again. Since the only way to get to the primary oe program is through CL1, PROG1 could test if its display file is open. If yes, the program is all ready active and it could test if the parameters have changed and if necessary instruct the cl program to issue a msg then reroute the job. I think this would work. Any other ideas appreciated. I know that in the near future, workstation id will be an old concept and we will need a replacement. Thanks much ------------------------------ message: 5 date: Tue, 09 May 2006 14:54:25 -0500 from: Jerry Adams <jerry@xxxxxxxxxxxxxxx> subject: Re: Is a program all ready active? Francis, This idea would probably work if the files are always open, but I think Jim said something about file overrides changing. Which is where Opening and Closing the files manually comes in real handy. And kinda makes this option hit-or-miss. Aside from some API somewhere (equivalent to the // IF ACTIVE- test in 36EE) Lim's idea about the *INZSR routine seems like the best. But, then, one could set a switch and test it. On the other hand, Jim did not indicate if he needed to know that status *before* his order entry program was actually invoked by the user. If so, none of these techniques will work, and time to find that API. * Jerry C. Adams *IBM System i Programmer/Analyst B&W Wholesale Distributors, Inc.* * voice 615.995.7024 fax 615.995.1201 email jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx> Lapeyre, Francis wrote: >I should have mentioned that you need to declare the files as Usropn. Then >you just check at the top of the processing loop whether the file is open or >not (and open them if needed). Within that IF clause, you'll know if the >program has been called before (because the file is %OPEN). > > >Francis Lapeyre >IS Dept. Programmer/Analyst >Stewart Enterprises, Inc. >E-mail: flapeyre@xxxxxxxx > > >-----Original Message----- >From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] >On Behalf Of Lapeyre, Francis >Sent: Tuesday, May 9, 2006 1:15 PM >To: 'RPG programming on the AS400 / iSeries' >Subject: RE: Is a program all ready active? > >If %open(file); > > >Francis Lapeyre >IS Dept. Programmer/Analyst >Stewart Enterprises, Inc. >E-mail: flapeyre@xxxxxxxx > >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.