identification division. program-id. forms$demo_timer_ast_routine. ***************************************************************************** * DECforms : Display Time of Day, using Asynchronous output * ***************************************************************************** * * * © Copyright 2005 Hewlett-Packard Development Company, L.P. * * Consistent with FAR 12.211 and 12.212, Commercial Computer Software, * Computer Software Documentation, and Technical Data for Commercial * Items are licensed to the U.S. Government under vendor's standard * commercial license. * * AUTHOR. Hewlett-Packard Development Company, L.P. 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.