Version 4.2.6 for Mainframes
 —  Utilities  —

Using Menu Functions and Commands

A SYSMAIN function can be performed in either menu or command mode.

This section describes how to use a SYSMAIN menu or a direct command and the options provided when performing a SYSMAIN function.

This section covers the following topics:


Performing Menu Functions

In menu mode, you perform a SYSMAIN function by entering codes for the object type to be processed and the function to be performed. As an alternative to entering a function code, you can press a corresponding PF key.

Start of instruction set To perform a SYSMAIN menu function

Using PF Keys

You can use PF keys to perform SYSMAIN menu functions. PF keys which are not valid within a menu are not displayed for this menu. The PF keys are summarized in the table below:

PF Key Name Function
PF1 Help Display online help depending on the current cursor position.

If the cursor is positioned in the Object Code or Function Code field, SYSMAIN general help is displayed.

If the cursor is in another field, field-specific help is displayed. See also SYSMAIN Online Help.

PF2 Menu Display the SYSMAIN Utility Main Menu.
PF3 Exit Return to the previous screen. If you press PF3 on the SYSMAIN Utility Main Menu, SYSMAIN is terminated.
PF4 Copy Perform the Copy function for the object specified.
PF5 Del Perform the Delete function for the object specified.
PF6 Find Only applies to programming objects, error messages and rules.

Perform the Find function for the object specified.

PF7 List Perform the List function for the object specified.
PF8 Move Perform the Move function for the object specified.
PF9 Ren Not applicable to DDMs and DL/I subfiles.

Perform the Rename function for the object specified.

PF10 Fsec Invoke the security screen for specifying the Adabas security information of the FSEC system file if Natural Security is installed.
PF11 Fdic Not applicable to debug environments, error messages and profiles.

Only applies to programming objects, rules and DDMs.

Invoke the security screen for specifying the Adabas security information of the FDIC system file. If Predict is installed, you can also specify a Predict set user when performing the Copy, Delete, Move or Rename function on programming objects.

PF12 Fnat Not applicable to rules, DL/I subfiles and DDMs.

Invoke the security screen for specifying the system file information of the FNAT and/or FUSER system files.

Top of page

Executing Commands

This section provides instructions for executing a SYSMAIN function by using a direct command or issuing a system command from within the SYSMAIN utility.

A direct command is used to perform a SYSMAIN function in either online or batch mode.

In batch mode, a report is automatically provided that shows the status of objects processed. This report can also be displayed in online mode: see Online Report Mode.

This section covers the following topics:

Issuing Direct Commands

Direct commands consist of a string of keywords that represent parameters. A period (.) indicates the end of a command. If this character is detected anywhere within a command string, all subsequent data is ignored.

The syntax that applies when issuing a direct command is described in the object-type specific sections of the SYSMAIN Utility documentation. The respective keywords and variables are explained in Keywords and Variables in Direct Commands. Examples of direct commands are shown in the object-type specific sections, the SYSMAIN online help and on a Selection screen (see the example screen in Selective Processing).

Start of instruction set To issue a direct command online

Start of instruction set To issue a direct command in batch

  1. Use the command SYSMAIN and specify a command string in either of the following ways:

    1. The command string follows the SYSMAIN command in the same input line; each keyword in the command string can be delimited by a blank character instead of the delimiter.

    2. The command string follows the SYSMAIN command in the next input line; each keyword in the command string must be delimited by the delimiter and not by a blank character.

      If the direct command string is longer than one single line, the characters CF (see also the session parameter CF described in CF - Character for Terminal Commands in the Parameter Reference documentation) must be placed at the end of the line to continue with the direct command in the next line.

  2. If you want to execute other Natural commands after the SYSMAIN command(s), you must first terminate SYSMAIN by using the direct command END or QUIT.

Using the SYSMAIN Command Line

In the Command line of any SYSMAIN menu, you can enter one of the following:

Top of page

Description of Functions

The functions provided in a SYSMAIN menu or as direct commands are described in the following section. For each function provided in a menu, there is a corresponding direct command with the same name. Exception: Help.

For the syntax that applies when using a direct command, refer to the object-type specific sections of the SYSMAIN Utility documentation.

For the special commands that can be issued to the SYSMAIN utility, refer to Special Commands Issued to SYSMAIN.

Function/Command Explanation
Copy Copies a Natural object from a source environment to a target environment. The object remains unchanged in the source environment.

If the target environment already contains an object with the same name (or in the case of an error message, the same number) as the object to be copied, the specified object is not copied.

You can use the replace option (see Using the Replace Option) to overwrite an object in the target environment.

Delete Deletes a Natural object from a source environment. During online automated processing (see Function Processing and Reporting), a confirmation window is displayed, which gives you the option of continuing or terminating the function.

For error messages: If Natural Security is installed, the delete function is disallowed for system error messages. When attempting to delete a system error message the following Natural system message occurs: 4897:Invalid error application specified.

Find Only applies to programming objects and error messages.

Locates one or more programming objects or error messages in a source environment.

During online processing, a window showing the library currently scanned is displayed.

In menu mode, the find function also provides the option to list and select libraries or reduce the number of objects displayed on a selection list: see Listing and Selecting Libraries or To shorten a selection list (Using a Selection List) respectively.

List Displays a range of Natural objects in a source environment.

For programming objects, debug environments and error messages: In menu mode, the list function also provides the option to list and select libraries or reduce the number of objects displayed on a selection list: see Listing and Selecting Libraries or To shorten a selection list (Using a Selection List) respectively.

For programming objects: In batch mode, you can obtain a list of library names by using the direct command LISTLIB.

Move Transfers a Natural object from a source environment to a target environment. The object is deleted from the source environment and added to the target environment. If the target environment already contains an object with the same name (or in the case of an error message, the same number) as the object to be moved, the specified object is not moved.

During online automated processing, a confirmation window is displayed, which gives you the option of continuing or terminating the function.

You can use the replace option (see Using the Replace Option) to overwrite the object in the target environment.

Rename Not applicable to DL/I subfiles and DDMs.

Gives an object a new name (or in the case of an error message, a new number) using either of the following options:

  1. Rename the object in the source environment.

  2. Rename the object and transfer it to another (that is, target) environment. You cannot rename objects in both a source and a target environment at the same time. The rename function can only be performed separately for each environment.

The rename function deletes the original object in the source environment; therefore, you are prompted with an option to retain the original object. If the original object is to be retained, it is not deleted.

If the target environment already contains an object with the same name (or in the case of an error message, the same number) as the object to be renamed, the specified object is not renamed. You can use the replace option (see Using the Replace Option) to overwrite the object in the target environment.

Only a single programming object, environment, profile or rule can be renamed using automated processing. If a range of programming objects, environments, profiles or rules is to be renamed, selective processing (see below) must be used.

For error messages: When renumbering a range of error messages within a single (source) library, the range values must not overlap. For example, it is not possible to rename error numbers 1 - 6 as new error numbers 5 - 10. A range of error messages can be renamed with automated processing (see below). When large ranges of error messages are being processed, the processing of messages may require significant resources. In such cases, batch-mode processing may be preferable.

Help Provides help information on SYSMAIN: see SYSMAIN Online Help.

The help function is only available in a SYSMAIN menu; there is no corresponding direct command.

Exit Terminates the SYSMAIN utility.

PF3 (Exit) also terminates SYSMAIN if pressed in the SYSMAIN Utility Main Menu.

This section covers the following topics:

Using the Replace Option

If the target environment already contains an object with the same name as the object to be copied, moved or renamed, the specified object is not processed and processing continues with the next object. You can use the replace option to override this default feature and overwrite the object in the target environment.

If a programming object is replaced, it is also deleted from the Natural buffer pool; any existing cross-reference records are also deleted if Predict is installed.

Start of instruction set To activate the replace option in command mode

Start of instruction set To activate the replace option in menu mode

  1. In a SYSMAIN menu, in the Replace field, enter a Y.

  2. Perform a function. If the Sel. List (Selection List) option has been set to N, a window appears where you can choose whether to confirm every replace operation before it is performed: Enter a Y to confirm each replacement, or press ENTER to continue processing without confirmation.

  3. If you entered a Y to confirm a replacement, for each object that is to be replaced a window appears where you can enter one of the following characters:

Listing and Selecting Libraries

This option only applies to programming objects, debug environments and error messages.

When using the list function, you can invoke a selection list of libraries that contain the specified object(s). This also applies to the find function if the specified object is contained in several libraries.

Start of instruction set To invoke a list of libraries for programming objects

When using the find function, the Library Selection screen appears if the specified object is found in several libraries.

The Library Selection screen also appears when you leave a Find Selection or a List Selection screen by pressing PF3 (Quit).

Start of instruction set To invoke a list of libraries for debug environments

Start of instruction set To invoke a list of libraries for error messages

Top of page

Function Processing and Reporting

There are two types of processing that can be used when performing a SYSMAIN function: selective processing and automated processing.

This section describes the two types of function processing and how to obtain a status report about function processing:

Automated Processing

Automated processing is the default type of processing when operating online in command mode. In batch mode, automated processing is the standard type of processing.

Automated processing is an online or batch facility which processes objects without displaying an intervening selection list. This requires little or no terminal I/O after a function has been selected.

Using automated processing online, the status of individual objects is not displayed, but an appropriate message is displayed upon completion of processing. If any of the following Natural system error messages is displayed, some or all of the specified objects were not processed:

4867:Nothing found for this request.
4810:All data rejected by these selection criteria.
4893:Normal completion, but some data were rejected.

The extended (long) message text of error NAT4810 lists reasons why an object may not have been processed. Reasons for an object not to be processed are also discussed in the section Processing Status and Error Notification.

Batch mode or selective processing should be used if it is necessary to see the status of each object after it is processed.

If required, when operating online, you can obtain a batch report with the processing status of all objects as described in Online Report Mode.

Selective Processing

Selective processing is the default type of processing when operating in menu mode.

Selective processing is an online facility which displays a selection list of all objects that meet the specified selection criteria. A selection list provides the following options:

Using a Selection List

This section provides instructions for invoking a selection list to further process single or multiple objects. In addition, this section describes how to shorten a selection when using the list or find function. This option is useful with large libraries in order to restrict the number of objects being displayed.

Start of instruction set To use a selection list online

  1. In menu mode: In a SYSMAIN menu, in the Sel. List field, enter a Y (this is the default setting) to activate selective processing. Input of an N deactivates selective processing.

    Or:
    In command mode: Include the keyword HELP in the with-clause of the direct command or enter a question mark (?) immediately after the object name; see also the syntax diagrams in the object-type specific sections of the SYSMAIN Utility documentation.

    When selective processing has been activated, a Selection screen similar to the example below appears:

     11:05:22             ***** NATURAL SYSMAIN UTILITY *****            2005-08-10
     User SAG                   -    Copy   Selection  -                           
                                                                                   
    COPY ALL * WITH XREF N FROM OLDLIB WHERE DBID 10 FNR 50 TO NEWLIB WHERE DBID   
    10 FNR 60                                                                      
                                                                                   
    C  Name     Type   S/C  Message        C  Name     Type   S/C  Message         
    -  -------- ------ ---  ------------   -  -------- ------ ---  ------------    
    _  AA       Copycd S/C                 _  G0000001 Global S                    
    _  G0000002 Global S/C                 _  G0000003 Global S/C                  
    _  L0000001 Local  S/C                 _  L0000002 Local  S/C                  
    _  L0000003 Local  S                   _  M0000001 Map    S                    
    _  M0000002 Map    S/C                 _  M0000003 Map    S/C                  
    _  P0000001 Progrm S                   _  P0000002 Progrm   C                  
    _  P0000003 Progrm S/C                 _  P0000004 Progrm S/C                  
    _  P0000005 Progrm S                   _  P0000006 Progrm S/C                  
    _  P0000007 Progrm S/C                 _  S0000001 Subpgm S/C                  
    _  S0000002 Subpgm S/C                 _  S0000003 Subpgm S                    
    _  T0000001 Text   S                   _  T0000002 Text                        
                                                           Listed Library: OLDLIB  
                                                                                   
                  Enter options (above), or '?' (Help) or '.' (Exit) _             
    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
          Help  Menu  Exit  Copy  Del   Find  List  Move  Ren               Canc
    

    The list contains the names and the types of the specified objects and indicates whether saved objects (S) and/or cataloged (C) objects exist.

    The lines above the selection list (highlighted in the example above) displays the SYSMAIN direct command that corresponds to the input values you entered in the menu fields.

    This command corresponds to the command syntax that applies when you work in command mode, although some keywords are optional, as shown in the syntax diagrams in the object-type specific sections of the SYSMAIN documentation.

  2. Select one or more objects for further processing: In the C (command) column next to the object(s) desired, enter one of the line commands described in the object-type specific sections of the SYSMAIN Utility documentation.

  3. Press ENTER to perform one or more line commands.

    Line commands are executed in alphabetical order of the specified object names whereby commands that perform a SYSMAIN maintenance function (for example, delete) are always executed last.

    If no SYSMAIN maintenance function (for example, displaying source code) was performed on any object, you can again enter a line command for any object(s). However, once a SYSMAIN maintenance function has been performed on any object(s), the fields of the C column are no longer available for input.

    If a line command has been executed, the status of the object(s) processed is displayed in the Message column as shown in the example below:

     11:05:22             ***** NATURAL SYSMAIN UTILITY *****            2005-08-10
     User SAG                   -    Copy   Selection  -                           
                                                                                   
    COPY ALL * WITH XREF N FROM OLDLIB WHERE DBID 10 FNR 50 TO NEWLIB WHERE DBID   
    10 FNR 60                                                                      
                                                                                   
    C  Name     Type   S/C  Message        C  Name     Type   S/C  Message         
    -  -------- ------ ---  ------------   -  -------- ------ ---  ------------    
    _  AA       Copycd S/C  Copied         _  G0000001 Global S    Copied                
    _  G0000002 Global S/C  Copied         _  G0000003 Global S/C  Copied          
    _  L0000001 Local  S/C  Copied         _  L0000002 Local  S/C  Copied      
    _  L0000003 Local  S    Replaced       _  M0000001 Map    S    Replaced      
    _  M0000002 Map    S/C  Replaced       _  M0000003 Map    S/C  Replaced      
    _  P0000001 Progrm S                   _  P0000002 Progrm   C                  
    _  P0000003 Progrm S/C                 _  P0000004 Progrm S/C                  
    _  P0000005 Progrm S                   _  P0000006 Progrm S/C                  
    _  P0000007 Progrm S/C                 _  S0000001 Subpgm S/C                  
    _  S0000002 Subpgm S/C                 _  S0000003 Subpgm S                    
    _  T0000001 Text   S                   _  T0000002 Text                        
                                                           Listed Library: OLDLIB  
                                                                                   
                  Enter options (above), or '?' (Help) or '.' (Exit) _             
    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
          Help  Menu  Exit  Copy  Del   Find  List  Move  Ren               Canc
    

    For a list of possible status messages, see Status Messages in the section Processing Status and Error Notification.

Start of instruction set To shorten a selection list

Online Report Mode

Online report mode can be used to obtain a SYSMAIN batch report online instead of a selection list. An online batch report lists all objects that were affected by a SYSMAIN function and indicates the action performed on each of these objects.

Start of instruction set To use a batch report online

  1. In a SYSMAIN menu, in the Sel. List (Selection List) field, enter an N to activate automated processing.

  2. In the Command line, enter one of the following direct commands:

    BATCH

    or

    BAT

    A message appears confirming that batch mode has been activated.

  3. If required, you can obtain a hardcopy of the report by entering the following terminal command:

    %H

    (See also %H - Hardcopy Output in the Terminal Commands documentation.)

  4. Execute a SYSMAIN function. SYSMAIN now processes the function as if in batch mode. Hence, only the result of each action is present in a report-type format as shown in the example below:

    10:50:30              ***** NATURAL SYSMAIN UTILITY *****            2005-08-10
    User SAG                   - Copy   Function -                                 
                                                                                   
    COPY ALL * WITH XREF N FROM TESTLIB1 WHERE DBID 10 FNR 30 TO TESTLIB2 WHERE
    DBID 10 FNR 40
                                                                                   
                                                                                   
    
    
    Saved     Progrm TEST1    has now been Copied                                  
    Saved     Progrm TEST2    has now been Copied                                  
    Saved     Progrm TEST3    has now been Copied                                  
    Stowed    Progrm TEST4    has now been Copied                                  
    Stowed    Progrm TEST5    has now been Copied                                  
    Stowed    Progrm TEST6    has now been Copied                                  
    Stowed    Progrm TEST7    has now been Copied                                  
    Saved     Record TEST8    has now been Copied                                  
    Saved     Text   TEST9    has now been Copied                                  
    Cataloged Progrm TEST10   has now been Copied                                  
    Saved     Progrm TEST11   has now been Copied                                  
    Stowed    Progrm TEST12   has now been Copied                                  
    MORE                                                                           
    Stowed    Progrm TEST13   has now been Copied                                  
    Cataloged Progrm TEST14   has now been Copied                                  
    Stowed    Progrm TEST15   has now been Copied
    
  5. If required, you can interrupt function processing by entering a system command or terminal command at a MORE prompt. Otherwise, press ENTER until you have reached the end of the list and return to the SYSMAIN menu where a message confirms successful execution of the function.

Top of page

SYSMAIN Online Help

The SYSMAIN online help facility provides information on all functions provided by SYSMAIN including detailed explanations of the direct command syntax and examples of direct commands.

In addition to the help facility, SYSMAIN provides individual information on any input field available on any SYSMAIN screen.

Start of instruction set To invoke SYSMAIN help topics

  1. In the SYSMAIN Utility Main Menu, position the cursor in the Object Code or the Function Code field and press PF1 (Help) or enter a question mark (?).

    The Help Menu of the SYSMAIN utility appears similar to the example below with a list of help topics provided:

     15:54:28             ***** NATURAL SYSMAIN UTILITY *****            2005-08-10
     User SAG                       - Help Menu -                                  
                                                                 Help Name SHT-0001
                                                                                   
                      Code  Topic                                                  
                                                                                   
                        A   SYSMAIN General Overview                               
                        C   Command Mode                                           
                        E   Environment Definition                                 
                        F   Functions / Commands                                   
                        S   Security Environment                                   
                        .   Exit                                                   
                                                                                   
                                                                                   
                                                                                   
                                                                                   
                                                                                   
                                                                                   
               Code ... _                                                          
                                                                                   
    Select a function code.                                                        
                                                                                   
    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
                Menu  Exit                                                  Canc   
    
  2. In the Code field, enter the one-letter code that corresponds to the help topic desired.

  3. Press ENTER.

    A result screen appears with information on the help topic selected, or another menu is invoked with further help topics that help narrow down your search.

Start of instruction set To invoke help on an input field

Top of page