Selecting a Device Group (QAB )

Before your application can access any of the PODs or input devices set up for the Device Group, the initialisation POD must be selected. Although Device Groups cannot be directly selected, selecting an initialisation POD is equivalent to selecting the Device Group as a whole.

A program can only have one device group open at a time (for example a POS program may occasionally want to print to a regular DP4 printer instead of a special device based printer such as a journal). This can cause a few problems. There are two ways round this difficulty:

There are two places in a QA Build program where you can select a Device Group:

  1. Selecting the Device Group in the Program Header

    The effect of selecting the Device Group in the program header is to fix the choice of Device Group for the whole of program execution. When writing the rest of your program you will only be able to select PODs and input devices owned by the selected Device Group. Note that in a program called from another QA Build program, the Device Group is set to that specified in the called program's header. However, if the called program is an overlay, the Device Group remains set to that of the calling program. You must be careful when selecting PODs in an overlay.

    To set the Device Group in the program header:

    1. From the program editing menu select Summary
    2. Answer Yes to Initialise printer/output file?

      Here is an example Summary screen for the DP4 Till program:

    3. Make any other selections you require in the program summary, then save and return to the program editing menu. Select Output devices
    4. Make sure that the printer option is set to Yes, then select your Device Group. You will be offered the range of available initialisation PODs, that is, PODs that map to CODs defined as '1'. In our example, one of these will be TILL_INIT, the initialisation POD for the DP4 Till. Here is the Output destination screen for the example program:

      You can see that the selected POD is TILL_INIT, which we defined as belonging to COD '1' for the DP4 Till.

  2. Selecting the Device Group in a Procedure Body

    The effect of selecting the Device Group in a procedure body is that you can use more than one Device Group in a program. The restriction in this case is that only subsidiary procedures of the procedure in which you did the selection will be able to access the PODs and input devices of that Device Group.

    To set the Device Group:

    1. You must answer No to Initialise printer/output file ? in the program Summary menu as described above.
    2. Enter the procedure tree and select your procedure
    3. Choose Body editing then Procedure overview
    4. Set Procedure type to Device select/print

    The input devices and PODs owned by the Device Group are specified at procedure level, as described on the next few pages.