identification division. program-id. forms$demo_timer_ast_routine. ***************************************************************************** * DECforms : Display Time of Day, using Asynchronous output * ***************************************************************************** * * * COPYRIGHT (c) 1990 BY * DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. * * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * TRANSFERRED. * * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * CORPORATION. * * DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS * SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * AUTHOR. Digital Equipment Corporation INSTALLATION. DATE-WRITTEN. 26-Jan-1990 DATE-COMPILED. *++ * * PROGRAM ABSTRACT: * * DECforms : Asynchronous output example. * * [The main program is in FORMS$DEMO_TIMER_AST.COB] * [This is one of the subroutines] * * This routine operates at AST level * and performs a SEND updating a field * which shows the current date/time. * *-- data division. working-storage section. copy "sys$library:forms$cob_definitions.lib". * ----------------------------------------------------------- * The definition of ws-ast-data must match the definition * in FORMS$DEMO_TIMER_AST.COB, since it's shared. * ----------------------------------------------------------- * Shared data: * AST level session id and return status 01 ws-ast-data external. 03 ws-ast-session-id pic x(16). 03 ws-ast-status pic s9(9) comp. * ----------------------------------------------------------- * Single record indicator: 01 ws-local. 03 ws-single-record pic s9(9) comp value 1. * Data to send to the form: * Full date/time 01 ws-ast-record. 03 ast_time_field pic x(23). * Request options for the SEND: * * item-1 is filled in at * run time and specifies an * AST completion routine * (forms$demo_timer_comp_routine). 01 request-options. * Item-1: * size 4 bytes 03 filler pic s9(4) comp value 4. * item code FORMS$K_ASTADR set at * run time. 03 item-1 pic s9(4) comp. * pointer to completion * routine 03 filler pointer value external forms$demo_timer_comp_routine. * No reply length 03 filler pic s9(9) comp value 0. * End of list 03 filler pic s9(9) comp value 0. / procedure division. aa-start. * Get the current date/time in * ASCII format into the form record. call "lib$date_time" using by descriptor ast_time_field giving ws-ast-status call "forms$demo_timer_check_status" using ws-ast-status * Set up the AST address item code in * the request options list for the SEND move forms$k_astadr to item-1 * Send the date/time for asynchronous display call "forms$send" using by descriptor ws-ast-session-id "AST" by reference ws-single-record omitted omitted omitted omitted omitted omitted by reference request-options by descriptor ws-ast-record omitted giving ws-ast-status call "forms$demo_timer_check_status" using ws-ast-status exit program. end program forms$demo_timer_ast_routine.