PreviousFunction Code List Error MessagesNext

Chapter 20: Syntax of Import/Export Files

This chapter describes the syntax of the files created by the export utility from screenset definitions (see the sections Import (F9) and Export (F10) in the chapter Using Dialog System for information about how to use the import and export facilities).

The DOS, OS/2, and UNIX versions all support the full Import/Export syntax.

The following notations are used in this section:

upper-case word a required key word
lower-case word a user-defined word, literal, or syntactic entry
[ ] material in brackets is an option or a portion of syntax that you can include or omit, as required.
{ } one of the options in the braces must be specified
[| |] any number or none of the options between the parallel lines can be specified, but each option can only be specified once.
{| |} one or more of the options between the parallel lines can be specified, but each option can only be specified once.
... the position at which the syntax can be repeated.

20.1 Data Types

The table below shows the mappings of types used in data declaration to the types used in Dialog System:

Data-Type
Dialog System Representation
Character X
Alphabetic A
integer, n 9
S
Decimal 9
S
data-group-num An integer, denoting group number.
text-value Number of characters to be specified for one line. Maximum of 80 characters. A single quotation mark (") must be represented by two quotation marks ("") in the string.
start-row, start-col An integer giving coordinates of top left corner of the rectangular area.
end-row, end-col Integer giving coordinates of bottom right corner of the rectangular area.
color One of the following colors: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, WHITE.

20.2 Full Import/Export Syntax

The following syntax is the full screenset definition syntax.

20.2.1 Screenset Definitions

  FORM screenset-name
      [ screenset-details ]
      [ form-data-declaration ]
      [ error-messages-declaration ]
      [ data-validation-declaration ]...
      [ global-dialog-declaration ]
      [ panel-declaration ]...
  END FORM

20.2.1.1 screenset-details

  SCREENSET DETAILS
   {| FIRST panel-name                           |}
   {| SCREENSET { NORMAL|MF }                    |}
   {| SEARCH { GLOBAL|LOCAL }                    |}
   {| KEYTRANS { ON|OFF }                        |}
   {| COLORIZE { ON|OFF }                        |}
   {|   [system-color-name attribute-details]... |}
   {| END COLORIZE                               |}
  END DETAILS

20.2.1.2 form-data-declaration

  FORM DATA
  [[ GROUP data-group-num VERTICAL OCCURS n 
        [ data-declaration ] ...           ]|
   [data-declaration]...                     ]
  END DATA

20.2.1.3 error-messages-declaration

  ERROR MESSAGES msg-filename
      [ msg-no "text-value" ]...
  END MESSAGES

20.2.1.4 data-validation-declaration

  DATA VALIDATION data-name
      {| NULL DISALLOWED [ ERRMSGNO msg-no ]    |}
      {| RANGE-TABLE { TRUE|FALSE }             |}
      {|     [ ERRMSGNO msg-no ]                |}
      {|    {| { X-low } [ THRU { X-up }] |}    |}
      {|    {| { 9-low } [ THRU { 9-up }] |}... |}
      {| END RANGE-TABLE                        |}
      {| CHECKDIGIT { VALUES|DIGITS }           |}
      {|     [ ERRMSGNO msg-no ]                |}
      {|     [ DIVISOR n ]                      |}
      {|     [ WEIGHT (n.m) ]...                |}
      {| END CHECKDIGIT                         |}
      {| DATE date-format [ ERRMSGNO msg-no ]   |}
  END VALIDATION

20.2.1.5 panel-declaration

  PANEL panel-name
      [ panel-details ]
      [ attribute-palette-declaration ]
      [ BORDER { NONE|SINGLE|DOUBLE } ]
      [ panel-text-declaration ]...
      [ panel-protect-declaration ]...
      [ panel-field-declaration ]...
      [ panel-group-declaration ]...
      [ panel-dialog-declaration ]
  END PANEL

20.2.1.6 global-dialog-declaration

  GLOBAL DIALOG
      CASE-SENSITIVITY { ON|OFF }
      [ dialog-declaration-1 ]...
      [ dialog-declaration-2 ]...
  END DIALOG

20.2.1.7 panel-dialog-declaration

  PANEL DIALOG
      CASE-SENSITIVITY { ON OFF }
      [ dialog-declaration-1 ]...
      [ dialog-declaration-2 ]...
  END DIALOG

20.2.1.8 data-declaration

            { CHARACTER(n) [ ERROR-FIELD ]   }
            { ALPHABETIC(n)                  }
  data-name { INTEGER(n) [ IMPLICIT SIGN
                              [COMPUTATIONAL]] |
                         [ COMPUTATIONAL ]     |
                         [ COMP  [SIGNED]]     |
                         [ COMP-3[SIGNED]]     |
                         [ COMP-5[SIGNED]]     |
                         [ COMP-X        ]      }
            { DECIMAL(n.m) [ IMPLICIT SIGN]    |
                           [COMP  [SIGNED]]    |
                           [COMP-3[SIGNED]]    |
                           [COMP-5[SIGNED]]    |
                           [COMP-X        ]     }

20.2.1.9 panel-details

  ANCHOR TOP|BOTTOM
  SIZE LINE start-row END-LINE end-row COLUMN
      start-col END-COLUMN end-col

20.2.1.10 attribute-palette-declaration

  ATTRIBUTE PALETTE
      [ DEFAULT attribute-details ]
      [ LIST-1 attribute-details ]
      [ LIST-2 attribute-details ]
      [ LIST-3 attribute-details ]
      [ LIST-4 attribute-details ]
      [ LIST-5 attribute-details ]
      [ AUX1 attribute-details ]
      [ AUX2 attribute-details ]
      [ AUX3 attribute-details ]
      [ AUX4 attribute-details ]
      [ ERROR attribute-details ]
      [ INPUT attribute-details ]
      INP-ATTR { ON OFF }
  END PALETTE

20.2.1.11 panel-text-declaration

  LITERAL TEXT
      LINE start-row COLUMN start-col
      VALUE "text-value"
      [ attribute-details ]
  END LITERAL

20.2.1.12 panel-protect-declaration

  PANEL PROTECT
      [ panel-protect-field-declaration ]...
  END PROTECT

20.2.1.13 panel-field-declaration

  PANEL FIELD data-name [ SCROLLING ]

      LINE start-row COLUMN start-col

      LENGTH {n  } [ ORDER order-ind ]
             {n.m}

            { IN   }
            { OUT  }
      USAGE { EXIT }
            { XMOD }
            { XREG }
            { XENT }

      [            [| AUTO   |] ]
      [            [| REQD   |] ]
      [ PROPERTIES [| FULL   |] ]
      [            [| NOECHO |] ]
      [            [| UPPER  |] ]
      [            [| LOWER  |] ]

             { ALPHABETIC    }
             { ALPHANUMERIC  }
             { NUMERIC       }
             { SIGN          }
      FORMAT { SUPPRESS      }
             { SIGN-SUPPRESS }
             { 99/99         }
             { 99/999        }
             { 99/99/99      }
             { 99/AAA/99     }
             { 99/99/9999    }

      [ DELIMITER "date-delim" ]

      [         { USERFMT1 } ]
      [ USERFMT { USERFMT2 } ]
      [         { USERFMT3 } ]
      [         { USERFMT4 } ]

  END FIELD

20.2.1.14 panel-group-declaration

  PANEL GROUP panel-group-name VERTICAL

      LINE start-row COLUMN start-col 
                                  HEIGHT n WIDTH n

           {                  { BAR } }
           { DATA ACC-EXIT    {     } }
      TYPE {                  { END } }
           { ATTRIBUTE                }
           { FIXED-TEXT               }
           { VIRTUAL-TEXT             }

      [ SELECT BAR                   ]
      [     [ LENGTH integer    ]    ]
      [     [ attribute-details ]... ]
      [ END BAR                      ]

      { [ panel-field-declaration ]...          }
      {                                         }
      { [ { OCCURRENCE group-occ      }    ]    }
      { [ {  [ LENGTH n attr-dets]... }... ]    }
      { [ { END OCCURRENCE            }    ]    }
      { [                                  ]... }
      { [ { OCCURRENCE group-occ   }       ]    }
      { [ {     VALUE "text-value" }...    ]    }
      { [ { END OCCURRENCE         }       ]    }

  END GROUP

20.2.1.15 dialog-declaration-1

[ EK ] proc-num [| fn  p1 (subs-1) |]
                [|     p2 (subs-2) |]
                [|     p3 (subs-3) |]...

EK signifies an event key. You must place each function (with any parameters) in square brackets.

20.2.1.16 dialog-declaration-2

[ EK ] key-value [| fn  p1 (subs-1) |]
                 [|     p2 (subs-2) |]
                 [|     p3 (subs-3) |]...

EK signifies an event key. You must place each function (with any parameters) in square brackets.

20.2.1.17 attribute-details

  BACKGROUND bground-color 
          FOREGROUND fground-color 
                 [| INTENSITY BLINK |]

20.2.1.18 panel-protect-field-declaration

  data-name     n n n n n n n n n n n n

20.2.1.19 Data Types

n integer
date-format { DDMM    }
{ MMDD    }
{ MMYY    }
{ YYMM    }
{ YYDDD   }
{ DDMMYY  }
{ YYMMDD  }
{ MMDDYY  }
{ DDMMMYY }
date-delim One character denoting the delimiter used for a date field (for example "/").
data-name, panel-name, panel-group-name Maximum of 8 characters. Names longer than 8 characters are truncated.
system-color-name Dialog System system color name, values SYS-1 through SYS-16.
data-group-num An integer denoting group number.
msg-filename Error messages filename. Maximum of 12 characters.
msg-no Error message number. Integer.
text-value A line of text characters. Maximum of 80 characters. To represent a quote character ("), use two quotes ("") in the string.
X-low, X-up Lower and upper alphanumeric range value, specified as an alphanumeric literal, in quotes. Maximum of 20 characters.
9-low, 9-up Lower and upper numeric range value, specified as a numeric literal. Maximum of 18 characters.
start-row, start-col Integer giving coordinates of top left corner of the rectangular area.
end-row, end-col Integer giving coordinates of bottom right corner of the rectangular area.
group-occ Integer denoting occurence of panel group.
order-ind One character denoting field order. Possible values are 0-9, A-Z, a-z.
bground-color, fground-color Can be one of the following colors: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, WHITE.
proc-num, key-value Valid Dialog System procedure number or key mnemonic. Maximum of 4 characters.
fn Valid Dialog System function mnemonic. Maximum of 8 characters.
p1, p2, p3, subs-1, subs-2, subs-3 Parameter and subscript values. Maximum of 30 characters.

20.2.2 Sample Text File

The following sample external text file was created by the export facility from components of the screenset customer.s and can be imported into a Dialog System screenset.

FORM CUSTOMER 

  SCREENSET DETAILS 
      FIRST full-scr 
      SCREENSET NORMAL 
      SEARCH GLOBAL 
      KEYTRANS OFF 
      COLORIZE OFF 
      END COLORIZE 
  END DETAILS 

  FORM DATA 
        C-CODE                    CHARACTER(5) 
        C-NAME                    CHARACTER(15) 
        C-ADDR1                   CHARACTER(15) 
        C-ADDR2                   CHARACTER(15) 
        C-ADDR3                   CHARACTER(15) 
        C-ADDR4                   CHARACTER(15) 
        C-LIMIT                   INTEGER(4) IMPLICIT SIGN 
        C-AREA                    CHARACTER(1) 


      GROUP 1 VERTICAL OCCURS 10 
        ORD-NO                    INTEGER(6) IMPLICIT SIGN 
        ORD-DATE                  INTEGER(6) 
        ORD-VAL                   DECIMAL(4.2) 
        PAY-VAL                   DECIMAL(4.2) IMPLICIT SIGN 
        ORD-BAL                   DECIMAL(4.2) IMPLICIT SIGN 
      END GROUP 

        C-BAL                     DECIMAL(5.2) IMPLICIT SIGN 

      GROUP 2 VERTICAL OCCURS 1 
        DEL-FLG                   INTEGER(1) 
        LOAD-FLG                  INTEGER(1) 
        SAVE-FLG                  INTEGER(1) 
        CLR-FLG                   INTEGER(1) 
        EXIT-FLG                  INTEGER(1) 
      END GROUP 

        ERR-MSG                   CHARACTER(20) 
        C-ORD-NO                  INTEGER(6) 
        C-ORD-DT                  INTEGER(6) 
        C-ORD-VL                  DECIMAL(4.2) IMPLICIT SIGN 
        C-PAY-VL                  DECIMAL(4.2) IMPLICIT SIGN 
  END DATA 

  GLOBAL DIALOG 
      CASE-SENSITIVITY ON 
           P255 [RFTD   ] 
  END DIALOG 

END FORM

20.2.3 Restrictions

Since the import process is driven by DS keywords (PANEL, GROUP), it is important that user-defined words (data-names, panel-names) are not also DS keywords or the import will stop. Note that Dialog itself does not restrict the use of these words, only the import module. Thus it is possible to create a screenset, export it successfully and for the import module to be unable to import it again.

As well as the keywords listed in the syntax diagrams, there are some additional internal keywords that the import module disallows as user-defined words. These are:

ACC-EXIT
ALPHABET
ALPHANUM
ATTRIB
BGROUND
CASESEN
CHAR
CHECKDIG
OLDCOMP
DELIMIT
DEPTH
DISALLOW
ERRORFLD
FIX-TXT
FGROUND
INTENS
OCCURR
PROPS
RECT
RNGE-TAB
SCROLL
SSET
SIGN-SUP
VALID
VIRT-TXT
WIDTH


Copyright © 1998 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
PreviousFunction Code List Error MessagesNext