× 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.


  • Subject: Re: Device Acquiring
  • From: "Scott Klement" <infosys@xxxxxxxxxxxx>
  • Date: 02 Jun 1999 10:04:51 -0500

Actually, the MAXDEV keyword goes in the F-specs (for the correct
display file) not the H-specs.

You probably also want to specify the DEVID keyword.  something like:

In your DDS, you'll want to specify FRCDTA on the format that you
plan to write to each device.   If you're also taking input from each
device, you'll also want to specify INVITE.

Below is an example of compiling the display file with 50 devices.
I also specify DEV(*NONE) so it doesn't automatically acquire anything

CRTDSPF FILE(MYDSPF) SRCFILE(xxx/xxx) DEV(*NONE) MAXDEV(50)

Then, my F-specs look like this, with the aforementioned keywords:

FMYDSPF    CF   E             WORKSTN MAXDEV(*FILE)
F                                     DEVID(device)


In your program you need some kind of a list of devices, either
hard coded or loaded from a file or something.   I usually put
them into an array, and acquire each one...   if any of the
ACQ's fail, I blank out that entry in the array so I don't try to
do it again...

Now, I write a screen to each device in a loop.   Again, I use an
array, I loop through each device that I acquired, set DEVICE (or
whatever you specified on your DEVID keyword) to the device I
want to write to, and do a WRITE op-code.  Because I used FRCDTA
and INVITE, once the WRITE is done, each device is displaying my
screen...

Now I do a READ to the display file.   In this case, I do READ MYDSPF,
I do not specify a record format, or a device on the READ.  This tells
the system that I want to read from whichever acquired device sends
me input first.

Once I get input, I can check my DEVICE variable to see where the
input came from, and deal with it appropriately, then go back to
waiting for input -- and so on, in a loop.

Anyway, thats what I do.  I'm not really certain what the original
poster was asking...   Any one of several steps could create the
symptoms he describes...

Scott Klement
Information Systems Manager
Klement's Sausage Co, Inc.



cmassoglia@voyager.net (Charles L. Massoglia) wrote:
> You have to use the ACQ op code in the C-specs to acquire a signed o
> terminal.  Also, the MAXDEV keyword in the H-specs specifies the
>  maximum
> number of devices you want to acquire.
>
> >Haai Friends,
> >
> >I am trying to acquire many screen devices in my RPG program and
>  write my
> >display record format to that devices. This becomes possible when I
>  am
> >acquiring one device after releasing the previous device. Is it tha
>  I can
> >not write a record format to all the devices at a time whichever ar
>  in SIGN
> >ON DISPLAY mode?.
> >
> >If yes, pl. tell me. That will be helpful to my project.
> >
> >With thanks,
> >
> >Kannan
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.