This section describes how to invoke and terminate the SYSMAIN utility either in menu mode or by using a subprogram.
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
 To invoke SYSMAIN from the Natural main
                     				menu
Select  and then select
                        					 SYSMAIN or enter S.
                     
Or:
Select  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).
                     
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) ¦ +---------------------+ | 
If you want to process any object types except DDMs, mark by choosing UP ARROW if required (marked by default).
Or:
If you want to process DDMs only, mark  by choosing DOWN ARROW.
                     
 To invoke SYSMAIN with a subprogram in online or in batch
                     				mode
 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.
                     
 To terminate SYSMAIN
 To terminate SYSMAIN 
From the SYSMAIN menu, choose .
Or:
Choose ESC repeatedly.
                     
Or:
When using the MAINUSER subprogram, in the command string,
                        					 specify a period (.). See also Using SYSMAIN with
                           					 Subprogram.