subroutine U2196( proc, ibn, pib, sib, ip, obn, pob, sob ) ******************************************************************************* * * Retrieve the terminal number into a proc * * Module %M% Version %I% Date %H% * * (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved * This is unpublished proprietary source code of Ardent Software Inc. * The copyright notice above does not evidence any actual or intended * publication of such source code. * ******************************************************************************* * * Maintenence log - insert most recent change descriptions at top * * Date.... GTAR# WHO Description......................................... * 10/14/98 23801 SAP Change copyrights. * 07/25/88 - - Maintenence log purged at 5.2.1, see release 5.1.10. * ******************************************************************************* * * This "user-exit" returns the user's terminal number onto the * terminal or into the primary input buffer or current output buffer * of a proc. * * Usage: proc line n: U2196 * line n+1: target * line n+2: normal return * * where target can be: T - print on the terminal screen * P - place into primary input buffer * S - place into the current output buffer * A - place into the other output buffer * * Arguments to this subroutine are: * proc - the text of the proc itself * ibn - the current input buffer switch (0 = primary; * 1 = secondary) * pib - the primary input buffer * sib - the secondary input buffer * ip - the input buffer pointer * obn - the current output buffer switch (0 = primary; * 1 = secondary) * pob - the primary output buffer * sob - the secondary output buffer * * ******************************************************************************* * $options DEFAULT * * Get the next line of the proc after the one containing "U2196". * That line contains the "target" and tells us where to put the * terminal number. * Note that the "remove" pointer has already been set to the current * line in the proc. * REMOVE target FROM proc SETTING junk target = TRIM( target ) * * Find out the user's terminal number. * ans = @USERNO * * Put it wherever the proc says to. * BEGIN CASE CASE target = "T" print ans CASE target = "T+" print ans: CASE target = "S" IF( obn ) THEN sob = ans END ELSE pob = ans END CASE target = "A" IF ( obn ) THEN pob = ans END ELSE sob = ans END CASE target = "P" IF pib[ ip, 1 ] = @AM THEN ip += 1 first.part = pib[ 1, ip - 1 ] : ans : @AM last.part = pib[ ip + 1, len( pib )] DEL last.part< 1 > pib = first.part : last.part END CASE RETURN END