Using the Fields in an Object-Specification Window

This section describes the fields and input options provided in an object-specification window, in which you can specify selection criteria for the objects to be processed with a SYSMAIN function.

If a field only applies to a particular function, this is indicated by an appropriate remark.

Field Explanation
OBJECT The name of the object to be processed or a range of names.

The default setting is asterisk (*) which means that all objects are selected for processing.

For valid name ranges, see Specifying a Range of Names.
LIBRARY The name of a source or a target library or a range of names.

The source library contains the object to be processed. The target library is an existing or a new library to which the object is to be copied or moved, or where the object is renamed or imported.

For valid name ranges, see Specifying a Range of Names.
DBID The database ID of a source or a target library.

The source database contains the library and system file where the object to be processed is stored. The target database contains the library and system file to which the object is to be copied or moved, or where the object is renamed.

Valid database IDs are 1 to 65535. If no value (or 0) is specified, the current FUSER or FNAT system file is used.
FNR The file number of a source or a target system file (FNAT or FUSER).

The source file contains the library where the object to be processed is stored. The target file contains the library to which the object is to be copied or moved, or where the object is renamed or imported.

Valid file numbers are 1 to 65535. If no value (or 0) is specified, the current FUSER or FNAT system file is used.
USER ID Not applicable to the import function.

The ID of the user who last saved and/or cataloged the object to be processed.

DATE Not applicable to the import function.

Selects all objects that were saved and/or cataloged on or after the date and/or time entered in these fields. By default, no date or time is entered.

A start date must be specified in the following format: YYYY-MM-DD (YYYY = year, MM = month, DD = day). Example: 2007-01-31.

A start time must be specified in the following format: HH:II (HH = hours, II = minutes). Example: 09:15.

CODE
Not applicable to the import function.

Selects the object kind:

   
(S)ource The source (saved) object only.
(C)ataloged The cataloged object only.
   
By default, both the source object and the cataloged object are selected.

Find or list function only:
The source code of an object can only be displayed if a source object exists. If you select (C)ataloged or if the result window only contains cataloged objects, you cannot select any objects from this list to display their source codes.

XREF
Not applicable to the find, list or import function.

Indicates whether cross-reference (XRef) data stored on Predict system files is to be processed for programming objects (not applicable to DDMs).

Possible input values are:

   
N No. XRef data is not processed. This is the default setting.
Y Yes. All XRef data is processed.
   

See also XRef Considerations.

TYPE Not applicable to the find or list function.

A read-only field that indicates the object types as selected from the OBJECT TYPE window:

The field contains either all indicating all object types, an object type such as Program (import function only) or one or more object-type codes such as P for program. For possible codes, see TYPE Specification.

REPLACE
Not applicable to the find, list or delete function.

Specifies whether the replace option is activated:

   
Y An object is automatically replaced.
N An object is only replaced after prior confirmation. This is the default setting.
 
See also Using the Replace Option.
CONFIRM
Only applies to the delete function.
 
Indicates whether a confirmation window appears before the selected objects are deleted. Possible input values are:
   
Y A confirmation window appears, where you can enter Y to confirm the deletion or enter N to cancel it. This is the default setting.
N All objects are deleted immediately, without prior confirmation window. This is the default setting.
PATH Only applies to the import function.

The complete Linux path name of the directory from which the import function is to be executed.

The path name can start with a Linux environment variable such as $HOME. When you choose ENTER, the environment variable is replaced by the full path name. If you want to import objects from the default path assigned to you at Natural session start, enter the following: ./

MODE
Only applies to the import function.
   
Specifies the Natural programming mode to be set for the programming object to be imported:
   
Structured Structured mode is used.
Report Reporting mode is used.
   
For further information, see Natural Programming Modes in the Programming Guide.

This section covers the following topics:


Specifying a Range of Names

All SYSMAIN functions provide the option to specify either a name or a range of names for the libraries or the objects to be selected.

The valid asterisk (*) notations for name ranges are listed below where value denotes any combination of one or more characters:

Input Objects or Libraries Selected
* All objects or libraries.
value* All objects or libraries with names that start with value.

Example: AB*
Selected: AB, AB1, ABC, ABEZ
Not selected: AA1, ACB

value*value* All objects or libraries that match value combined with one or two asterisks (*) in any order.

Example: A*C*
Selected: ABCZ, AXXCBBBZ, ANCZ
Not selected: ABDEZ, ACBBBZA

Renaming Multiple Objects

If you want to rename multiple objects, value* must be specified in both the source environment and the target environment; you cannot specify a single name for the source environment and a range of names for the target environment, or vice versa.

If value* is used, the number of characters before the asterisk (*) in the source environment determines the number of characters to be replaced. For example, if you specify ABC for the source environment and WXYZ for the target environment, each object in the target environment that starts with ABC will be replaced by an object name that starts with WXYZ. The remainder of each name (after the first four characters, in this example) is retained.

Using the Replace Option

If the target library already contains an object with the same name as the object to be copied, moved, renamed or imported, 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 library. If an object is replaced, it is also deleted from the Natural buffer pool; any existing cross-reference records are also deleted.

Start of instruction setTo activate or deactivate the replace option in menu mode

  • In the REPLACE field of a SYSMAIN object-specification window:

    Enter N to activate the replace option.

    You are prompted to confirm each object replacement.

    Or:
    Enter Y to deactivate the replace option (this is the default setting).

    All objects are replaced without prior confirmation message.

Start of instruction setTo activate the replace option using a command in the MAINUSER subprogram

  • In the command string, specify the keyword REPLACE as described in Using SYSMAIN with Subprogram.