× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



David:

On Thu, 08 November 2001, David.X.Kahn@gsk.com wrote:

> Tom wrote:
>
> > I can submit a batch job that at some point chooses to ACQuire a
> > device, do some interactive stuff and later RELease the device
>
> I thought you needed to have a requestor device in order to be able to
> acquire further devices. In other words the job needs to be interactive in
> the first place otherwise the open of the WORKSTN file will fail. If a
> truly batch job can acquire WORKSTN files that would be really neat. How
> can I do this?

I'm including a trivial example in CL just to demonstrate batch/workstation 
capability. It's a modification of some demo code that I created years ago 
(apparently V2R1) for testing when I put together a function for sending 
messages to workstations that were at the signon panel.

To run, sign on to one session (SSN1 perhaps) in order to do the SBMJOB. Have a 
second session (SSN2) available but leave it at the signon panel. Then:

 нн> sbmjob cmd(call acqbch parm(SSN2))

and watch what happens to the signon panel on SSN2. Naturally, compile the CLP 
and dspf into a library that the SBMJOB will have available.

The ACQBCH CLP:

 ACQBCH: PGM        PARM(&DEV)

         DCL        VAR(&DEV) TYPE(*CHAR) LEN(10)

         DCLF       acqbch


         OVRDSPF    acqbch   DEV(&DEV)

 RETRY:  chgvar &msg1  ('Message line 1 (*char 32)')
         chgvar &msg2  ('Message line 2 (*char 32)')
         chgvar &msg3  ('Message line 3 (*char 32)')

         SNDRCVF    RCDFMT(acqbcR1) WAIT(*NO)
         MONMSG     MSGID(CPF4128) EXEC(DO)
         SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) +
            MSGDTA('Device is in use or not varied on') +
            MSGTYPE(*COMP)
         RETURN
         ENDDO

         dlyjob     30

         RETURN
         ENDPGM


The ACQBCH DDS:

     A*%%TS  SD  19920519  113746  QPGMR       REL-V2R1M0  5738-PW1
     A*%%EC
     A                                      DSPSIZ(24 80 *DS3)
     A* This format is not to be input or output. It exists only to hold
     A* the KEEP and ASSUME keywords for the display file.
     A          R DUMMYFMT
     A                                      KEEP
     A                                      ASSUME
     A                                  1  2':'
     A          R ACQBCR1
     A*%%TS  SD  19920519  113746  QPGMR       REL-V2R1M0  5738-PW1
     A                                      TEXT('Acquisition format')
     A                                      ALARM
     A                                      CLRL(*NO)
     A                                      OVERLAY
     A                                 13 25'..................................-
     A                                      ..'
     A                                      COLOR(BLU)
     A                                 14 25':'
     A                                      COLOR(BLU)
     A                                 14 27'Just testing...'
     A                                      COLOR(YLW)
     A                                 14 60':'
     A                                      COLOR(BLU)
     A                                 15 25':'
     A                                      COLOR(BLU)
     A            MSG1          32   O 15 27
     A                                 15 60':'
     A                                      COLOR(BLU)
     A                                 16 25':'
     A                                      COLOR(BLU)
     A            MSG2          32   O 16 27
     A                                 16 60':'
     A                                      COLOR(BLU)
     A                                 17 25':'
     A                                      COLOR(BLU)
     A            MSG3          32   O 17 27
     A                                 17 60':'
     A                                      COLOR(BLU)
     A                                 18 25'..................................-
     A                                      ..'
     A                                      COLOR(BLU)

Of course, line-wrap due to e-mail will mess those up somewhere along the line, 
but I'm sure you'll get the idea. If not, I can e-mail direct.

Using RPG, examine op-codes such as ACQ and REL.

Tom Liotta

--
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788
Fax  253-872-7904
http://www.400Security.com


___________________________________________________
The ALL NEW CS2000 from CompuServe
 Better!  Faster! More Powerful!
 250 FREE hours! Sign-on Now!
 http://www.compuserve.com/trycsrv/cs2000/webmail/






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.