|
|
|
|
|
|
|
☜ | Embedded SQL MUMPS Program1995 Version of ANSI (Equivalent to Current ISO Version) of Standard | ☞ |
"19.7 <embedded SQL MUMPS program>"
Function
Specify an <embedded SQL MUMPS program>
Format
<embedded SQL declare section> ::= !!
See the Syntax Rules.
<embedded SQL MUMPS program> ::= !!
See the Syntax Rules.
<embedded SQL statement> ::= !! See
the Syntax Rules.
<MUMPS host identifier> ::= !! See
the Syntax Rules.
<MUMPS variable definition> ::=
{ <MUMPS numeric variable> | <MUMPS character
variable> } <semicolon>
<MUMPS character variable> ::=
VARCHAR <MUMPS host identifier> <MUMPS length
specification>
[ { , <MUMPS host identifier> <MUMPS length
specification> }... ]
<MUMPS length specification> ::=
<open paren> <length> <close paren>
<MUMPS numeric variable> ::=
{ INT
| DEC [ { <precision> [ , <scale> ] ) ]
| REAL }
<MUMPS host identifier> [ { , <MUMPS host identifier> }... ]
<precision> ::= !! See the Syntax
Rules.
<scale> ::= !! See the Syntax
Rules.
Syntax Rules
- An <embedded SQL MUMPS program> is a compilation unit
that consists of MUMPS text and SQL text. The MUMPS text shall
conform to standard MUMPS. The SQL text shall consist of one or
more <embedded SQL statement>s and, optionally, one or more
<embedded SQL declare section>s.
- A <MUMPS host identifier> is any valid MUMPS variable
name. A <MUMPS host identifier> shall be contained in an
<embedded SQL MUMPS program>.
- An <embedded SQL statement> may be specified wherever a
MUMPS command may be specified.
- A <MUMPS variable definition> defines one or more host
variables.
- The <MUMPS character variable> defines a
variable-length string. The equivalent SQL data type is VARCHAR
whose maximum length is the <length> of the <MUMPS
length specification>.
- INT describes an exact numeric variable. The equivalent SQL
data type is INTEGER.
- DEC describes an exact numeric variable. The <scale>
shall not be greater than the <precision>. The equivalent
SQL data type is DECIMAL with the same <precision> and
<scale>.
- REAL describes an approximate numeric variable. The
equivalent SQL data type is REAL.
- An <embedded SQL MUMPS program> shall contain either a
variable named SQLCODE defined with a datatype of INT or a
variable named SQLSTATE defined with a data type that is VARCHAR
with length 5, or both.
Note: SQLSTATE is the preferred status parameter. The
SQLCODE status parameter is a deprecated feature that is
supported for compatibility with earlier versions of this
standard. See Annex D, "Deprecated Features".
[ ... ]"
Note that the Annex D mentioned in the last paragraph above
refers to the SQL standard, not to the M[UMPS] standard.
Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.
This page most recently updated on 28-Nov-2011, 21:03:46.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)