Invoking and Terminating SYSMAIN

#### Search Results

Search

# Invoking and Terminating SYSMAIN

This section describes how to invoke and terminate the SYSMAIN utility either in menu mode or by using a subprogram.

- Invoking SYSMAIN

- Terminating SYSMAIN

## Invoking SYSMAIN

The following instructions describe the methods of invoking the SYSMAIN utility by using menu functions or a subprogram.

To invoke SYSMAIN from the Natural main menu

1. Select Services and then select SYSMAIN or enter `S`.

   Or:
   Select Direct and, in the Direct Command window, enter the following system command:

       SYSMAIN

   A SYSMAIN menu similar to the example below appears:

       2007-04-04                         NATURAL                 Library: SYSTEM
        19:56:22                  V 6.3.2 Software AG 2007        Mode   : STRUCTURED
        User: SAG                                               Work Area : empty
       +------------------------------------------------------------------------------+
       ¦Library          Direct           Services         OS                Fin      ¦
       +------------------------------------------------------------------------------+

                                         +-----------+
                                         ¦L List     ¦
                                         ¦F Find     ¦
                                         ¦C Copy     ¦
                                         ¦M Move     ¦
                                         ¦D Delete   ¦
                                         ¦R Rename   ¦
                                         ¦I Import   ¦
                                         ¦T Terminate¦
                                         +-----------+

         List all files in Library

   The current setting of the system variable `*LIBRARY-ID` is passed to SYSMAIN and used as the default source library for processing objects (in the example above: `SYSTEM`).

2. Select a function or enter the one-letter code that corresponds to the function required (for example, `L` for List).

   Except for Import and Terminate, a selection window similar to the example below appears:

       +------- LIST --------+
       ¦X Programming Objects¦
       ¦  Views (DDM)        ¦
       +---------------------+

3. If you want to process any object types except DDMs, mark Programming Objects by choosing UP ARROW if required (marked by default).

   Or:
   If you want to process DDMs only, mark Views (DDM) by choosing DOWN ARROW.

To invoke SYSMAIN with a subprogram in online or in batch mode

- Use a Natural program with a `CALLNAT` statement that invokes and executes the MAINUSER subprogram, which issues commands to SYSMAIN. See also Using SYSMAIN with Subprogram.

## Terminating SYSMAIN

To terminate SYSMAIN

- From the SYSMAIN menu, choose Terminate.

  Or:
  Choose ESC repeatedly.

  Or:
  When using the MAINUSER subprogram, in the command string, specify a period (.). See also Using SYSMAIN with Subprogram.

### On this page

- Invoking SYSMAIN
- Terminating SYSMAIN