Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

7.93 OPEN

Note
Note: Usage options

The OPEN command is used to open (or control the opening of) the database file(s) specified by the FILE parameter. Individual files or all files can be opened or controlled.

...

There is normally no need to code OPEN or CLOSE commands into RDML programs. LANSA will automatically open and close files as required. OPEN and CLOSE commands are only used to specifically open or close a file, or to modify how and when LANSA automatically opens and closes them.

Portability Considerations

FILE (library) is not supported in Visual LANSA. A build warning will be generated if used in Visual LANSA code. Refer to parameters: ALWCPYDTA, OPTIMIZE, SEQONLY, COMMIT and TYPE , ALWCPYDTA, OPTIMIZE, SEQONLY, COMMIT and TYPE , FILE , KEYFLD, ALWCPYDTA, OPTIMIZE, SEQONLY, COMMIT and TYPE , QRYSLT, ALWCPYDTA, OPTIMIZE, SEQONLY, COMMIT and TYPE , ALWCPYDTA, OPTIMIZE, SEQONLY, COMMIT and TYPE , and USE_OPTION .

Also See

7.93.1 OPEN Parameters

7.93.2 OPEN Comments / Warnings

7.93.3 OPEN Examples

                                                         Optional

...


Panel
bgColor#ffffcc

                                                                                        Optional

  OPEN --------- FILE---

...

----------

...

*ALL.

...

*

...

FIRST ------------------->

                                file name.library name

...

                                                     file name.library name

                   >-- USE_OPTION ---

...

*

...

FIRSTSCREEN ----------------->

...

                                                    *IMMEDIATE

...

                                                    *ONDEMAND

...

                                                   *OPNQRYF

...

                                                   *KEEPOPEN

...

                 >--

...

IO_

...

STATUS ------

...

*

...

STATUS ------------------------>

                                field name

...

                                                   field name

                >-- IO_ERROR -------

...

*

...

ABORT ------------------------->

...

                                                  *NEXT

...

                                                  *RETURN

                                label

...

                                                  label

                >-- QRYSLT ---------

...

*

...

ALL ------------------------------>

                                'selection criteria'

                                #field name

...

                                                'selection criteria'
                                                #field name
                                                '=EXCHANGE'

...

                >-- KEYFLD --------

...

*

...

NONE ---------------------------->

...

                                                *FILE

                                'key / sort order required'

                                #field name

...

                                                'key / sort order required'
                                                #field name

               >-- ALWCPYDTA --- *YES -----

...

--------------------------->

...

                                              *NO

...

               >--

...

OPTIMIZE -----

...

*ALLIO ------------------------------>

...

                                              *FIRSTIO

...

                                             *MINWAIT

...

               >-- SEQONLY --

...

-- *YES --- number of records --

...

---

...

----->

...

                                            *NO

...

              >-- COMMIT ---

...

--- *NO ----

...

----------------------------->

...

                                            *YES

...

              >--

...

TYPE ---------

...

*NORMAL -----------------------------|

...

                                           *PERM