Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Embedded SQL MUMPS Program

1995 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

  1. 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.
  2. A <MUMPS host identifier> is any valid MUMPS variable name. A <MUMPS host identifier> shall be contained in an <embedded SQL MUMPS program>.
  3. An <embedded SQL statement> may be specified wherever a MUMPS command may be specified.
  4. A <MUMPS variable definition> defines one or more host variables.
  5. 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>.
  6. INT describes an exact numeric variable. The equivalent SQL data type is INTEGER.
  7. 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>.
  8. REAL describes an approximate numeric variable. The equivalent SQL data type is REAL.
  9. 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.

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

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)