Soft close one or more open cursors

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
value = %SSC_SCLOSE(dbchannel, dbcursor[, ...])

Return value


This function returns SSQL_NORMAL (success). (i)



An internal database channel previously initialized using %SSC_INIT and connected by %SSC_CONNECT. (n)


One or more logical cursor numbers within the range from 1 through the maximum number specified by maxcur during %SSC_INIT. These cursors must have been opened by %SSC_OPEN. (n)


%SSC_SCLOSE soft closes one or more logical cursors opened in %SSC_OPEN. A soft close enables SQL Connection to reuse the associated database cursor, if there is one. For information on closing and reusing cursors, see Closing cursors and Reusing cursors. Note the following:


The following code segment shows re-use of a soft closed cursor (the SELECT statement isn’t re-parsed).

sqlp = "SELECT name, id, type FROM objects "
  &      " WHERE name = :1 AND type = :2"
do forever
    call get_name_and_type        ;Set the search name and type
    if (sts = %ssc_open(dbchn, cur1, sqlp, SSQL_SELECT,
  &                     SSQL_STANDARD, 2, spec, stype))
      goto err_exit
    if (%ssc_define(dbchn, cur1, 3, name, id, type))
      goto err_exit
    sts = %ssc_move(dbchn, cur1, 1)
    if (sts.eq.SSQL_NOMORE) then
    else if (sts.eq.SSQL_FAILURE)
      goto err_exit
    call do_processing
    if (sts = %ssc_slose(dbchn, cur1))
      goto err_exit