|
One way to do this is in the RPG program rather than the CL. If another job has the file allocated, you can trap the error and display it in the application program. Define your file as User Controlled open. If you let RPG implicitly open the file, the default error handler will have control - you cannot trap any open errors unless you perform the OPEN yourself. Use the Program Status Data Structure to retrieve the status and the error message text. Excuse the state of the code - it is from a System/38: FTTIND IF E K DISK UC ... I SDS I 91 170 PSDSMG ... C* Do this as user controlled to trap any errors associated C* open/close. C OPEN TTIND 20 C* Error OPENing TTIND C* C* If an error occurs, display the message from CPF and let C* the user decide what to do. Most probably, the error is C* that the index was not yet created. (no member) C* C 20 DO C MOVELPSDSMG MESSAG C GOTO DSPERR C ENDDO Buck Calabro Aptis; Albany, NY > -----Original Message----- > From: Çagatay AZKIN > Sent: Thursday, December 09, 1999 2:46 AM > To: RPG400-L@midrange.com > Subject: wrkobjlck > > How can I pass WRKOBJLCK job name to &ACTJOB variable ? I have a > statistical File "SS0101L". > If some user works on this file, Other can not create new statistical > data. > So, I have to warn inquery user. How can I Put locked active job to a > &ACTJOB variable and send a message to that job. > +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.