PASS.TO - Passing PICK Data Directly into DOS or Windows Products

HostAccess provides a powerful facility for PICK users to be able to pass data directly into DOS or Windows products using virtually any ACCESS/ENGLISH/INFORM etc., like statement. It is not necessary for a user to understand how to read or import data into the DOS or Windows software since HostAccess, through the PASS.TO routines, can do everything automatically.

"PASS.TO" implies all of the HostAccess pass to DOS or Windows routines, for example PASS.TO.EXCEL, PASS.TO.LOTUS, PASS.TO.SUPERCALC, PASS.TO.SYMPHONY, PASS.TO.QUATTRO, PASS.TO.WORD, or PASS.TO.WORDPERFECT. The PASS.TO routines fall into the following categories:

  • PASS.TO Spreadsheet products -PASS.TO.EXEL, PASS.TO.LOTUS, PASS.TO.SUPERCALC, PASS.TO.SYMPHONY and PASS.TO.QUATTRO.

  • PASS.TO  Wordprocessing products - PASS.TO.WORD and PASS.TO.WORDPERFECT.

  • PASS.TO DOS files - PASS.TO.DIF and PASS.TO.DOS.

Notes on Using PASS.TO

All these routines can be driven directly as TCL commands. They can also be driven from PICK/BASIC as subroutine calls or are available as command interfaces from EASY.ACCESS.

It is recommended that you read the topics relating to the GET process  before using any of the PASS.TO routines.

All the PASS.TO routines will pass the data from the last GET enquiry into the particular DOS or Windows software product or file format such as LOTUS, SUPERCALC, DIF etc.

Each PASS.TO application has a control record, and any application that supports both DOS and Windows has 2 records, the Windows record having a suffix of .WINDOWS. The PASS.TO control records also hold information on graph types (where relevant) and how to start and run the DOS or Windows application.

Most of the PASS.TO routine names that explicitly imply a DOS or Windows product, for example PASS.TO.LOTUS (as opposed to those that imply a DOS file format such as PASS.TO.DIF) not only file transfer the data to the PC but also take the user directly into the product as well. In most cases, PASS.TO routines can continue by importing the data and even plotting graphs automatically, without any user intervention.

Note: For backwards compatibility, the COMMAND parameter in all the PASS.TO application subroutines still exists. However, we recommend that you leave this null and that the DOS or Windows command is stored in attribute 3 of the relevant control record in the PIX.CONTROL.F file. For example, with PASS.TO.LOTUS the stored command would read:
003   123

and with PASS.TO.LOTUS.WINDOWS the stored command would read:

003   123W.EXE

This is based on the assumption that your DOS PATH variable has been correctly configured to point to this command. We recommend that you use this standard for calling all DOS or Windows applications through HostAccess.

The command used to start the spreadsheet application is retrieved by reading attribute 3 of the PASS.TO. application record in the PIX.CONTROL.F file. If the  'nth' multi-value ( 'n' being port number plus 2) is not null then the command stored there is used. If this multi-value is null then the command stored in multi-value 1 is used. We recommend that everyone on the host calls the particular DOS or Windows product in the same way. That is, they should use multi-value position 1 only. This is easier on networks, for example, where the port number is not always known.

Note: When you use PASS.TO routines, temporary DOS files are created. If data is being passed to a DOS product, the temporary files are subsequently removed automatically. However, if data is being passed to a Windows product, the temporary files cannot be deleted owing to Windows multi-tasking environment. Your application may want to delete this temporary DOS file or just leave it to be overwritten by the next PASS.TO routine. The temporary DOS file is called PIXELnn.TMP (in PASS.TO.QUATTRO it is called PIXELnn.DIF) where nn is the host port number.
Note: EXCEL and the Windows versions of  WORD, QUATTRO PRO, and LOTUS, can be DDE servers. Therefore, data that is passed to or merged into these products using the PASS.TO routines is done using the DDE calls and subroutines built into HostAccess.

Using the PASS.TO Routines

An example of the way a "PASS.TO" routine works in conjunction with GET is briefly described here.

If you require a spreadsheet containing sales information for each area, the following TCL statement:

GET SALES BREAK-ON AREA TOTAL SALES ID-SUPP // BY AREA

followed by:

PASS.TO.LOTUS (P

will take the result of the GET statement, transfer this data into a DOS file, call LOTUS (for Windows or DOS), import the DOS file, change the column widths, and draw a piechart. All with no user intervention.

PASS.TO Applications Integration

The PASS.TO facilities can easily be integrated into PICK applications so that a PICK user could, perhaps, select a menu option such as  'Histogram total Costs by Area '. Underneath, your application will first call the GET subroutine and then call the PASS.TO.LOTUS subroutine. The user will see this facility as an integral part of your own application and will be completely unaware that the GET and PASS.TO are doing most of the work.

PASS.TO Program Example

*
* Program to automate taking last year's COST figures
* out of PICK using ACCESS statements via the GET
* process and then to plot a LOTUS histogram.
*
* GET called with D and I options, DET-SUPP and ID-SUPP
* 
CALL PIX.GET ("COST.FILE BREAK-ON AREA TOTAL COSTS",
"BY AREA","DI","",ERROR)
*
CALL PIX.PASS.TO.LOTUS("","H",ERROR) ; * "H"istogram
*
END