Dbdo()
From Recital Documentation Wiki
Revision as of 12:51, 1 May 2009 by Yvonnemilne (Talk | contribs)
PURPOSE
execute a RECITAL program
SYNOPSIS
#include "dbl.h" int dbdo(program, parameters) <input parameters> char *program; /* Address of a buffer containing a RECITAL program name to execute */ char *parameters; /* Address of a buffer containing up to nine parameters separated with commas that will be passed to program */ <output parameters> none
RETURN VALUE
The dbdo() function returns 0 for success or < 0 if an error occurs. See the section on return code values for a detailed list of return codes.
DESCRIPTION
The dbdo() function executes a RECITAL program specified in the buffer. Up to nine parameters may be passed to the RECITAL program. Each parameter must be separated by a comma. The parameters will be defined as public and will be named "_PARA1" through "_PARA9" in RECITAL.
EXAMPLE
The following example runs a RECITAL program called "accounts.prg" passing three parameters.
#include "dbl.h" int rc; static char program[] = "accounts.prg"; rc = dbdo(program , "para1, para2, para3"); if (rc != SUCCESS){ printf("error no %d \n", rc); exit(1); }