Sends and receives data to and from a DECforms form. Control text items can be also sent and received. Format WITH_FORM form-name IN file-name SEND FROM datatrieve-source [USING exchange-record] [,] . . . . . . . . . TO decforms-name RECEIVE FROM decforms-name TO datatrieve-destination [USING exchange-record] [,] . . . . . . . . . [SEND_CONTROL_TEXT send-control-item [,...]] [RECEIVE_CONTROL_TEXT receive-control-item [,...]]
1 – Arguments
form-name Is the name of the DECforms form in the form file. The form name is syntactically required but ignored when the file name is a .FORM file. file-name Is the DECforms file name. It can either be a .FORM or a .EXE file (the default file extension is .EXE). A complete file specification has the following format: node-spec::device:[directory]file-name.type;version decforms-name Is a DECforms record name or list name. A list is a DECforms structure. If a list name is specified as decforms-name, all the equivalent datatrieve-sources or datatrieve-destinations must be specified. datatrieve-source/datatrieve-destination Is the name of a DEC DATATRIEVE data element; a data element can be represented by a DEC DATATRIEVE record, by a group field, by a field, or by a variable. When datatrieve-source and datatrieve- destination can be used interchangeably, they are referred to as "DEC DATATRIEVE data element". The DEC DATATRIEVE data element can not be a COMPUTED BY field (for more information see the DEC DATATRIEVE Guide to Interfaces). When the decforms-name is a list name, specify a list of DEC DATATRIEVE data elements separated by commas. exchange-record Is the Oracle CDD/Repository path name of a record used to send and receive data with DECforms. It is an optional argument of the datatrieve-source and datatrieve-destination structures. send-control-item Is the input parameter (variable or string literal) that activates the proper actions defined by the user inside the .IFDL file. If you specify more than one input parameter, separate them with commas. Every control-item has to be from one to five characters long. For more details on how to build and use a SEND_ CONTROL_TEXT see the DECforms documentation. receive-control-item Is a DEC DATATRIEVE variable previously declared which receives a text control item returned by the form. The content of the variable will be loaded by the form depending on the rules established by the user in the .IFDL file. If you specify more than one output parameter, separate them with commas. Every receive-control-item should be five characters long.
2 – Example
In the following example the WITH_FORM statement causes DEC DATATRIEVE to send records contained in the YACHTS domain to the form record named BOAT. The form responds to the send operation by displaying the form record data (one record at a time) on the screen. DTR> READY YACHTS DTR> FOR X IN YACHTS CON> WITH_FORM YACHT IN DTR$LIBRARY:FORMS CON> SEND FROM X TO BOAT;