select-clause

The select-clause comprises either a Workplan of the type SELECTION or LIST, or selection specifications for the objects, FDTs or applications to be processed.

This section describes the syntax that applies to the select-clause. The keywords and variable values contained in the syntax diagrams represent the parameters that can be used to specify object selection criteria. If indicated, a variable value must be supplied with a keyword.


Syntax of select-clause

The select-clause consists of one of the following options:

(selection-workplan)
(list-workplan)
object-selection
delete-instruction-selection

The selection-workplan and list-workplan options are explained in SELECTION or LIST Workplan below.

The use of object-selection depends on the object type, DDM, FDT or application you want to process, for each of which the appropriate syntax and keywords are explained in the remainder of this section.

The delete-instruction-selection options are explained in Delete Instructions for Selected Objects.

SELECTION or LIST Workplan

A Workplan of the type SELECTION contains a header (TYPE SELECTION) and a selection from one of the following types of object or file: Natural library objects, Natural-related objects, Natural system error messages, Natural command processor sources, external files (external objects) or Adabas FDTs (Field Definition Tables).

A Workplan of the type LIST contains a header (TYPE LIST) and a selection list of objects as described in the section Object List - LIST Workplan. Such an object list can be used for the UNLOAD, LOAD or FIND command only.

For further information on using Workplans, see the section Workplans.

Natural Library Object and DDM Selection

This selection is used to select Natural objects for processing including Natural DDMs, user-defined error messages and shared resources.

The appropriate syntax is shown and explained in the following section.

Syntax of Natural Library Object and DDM Selection

object-name
LIBRARY library-name
[DBID dbid FNR fnr]
[OBJTYPE group-type]

SETNO set-number [SETUSER set-user] [SETLIBRARY set-library]

       
[NATTYPE object-type]
[SCKIND object-kind]
[MODE object-mode]
[FMNUM error-number-from]
[TONUM error-number-to]
[SLKIND message-type]
[LANGUAGE languages]
[DDMDBID ddm-dbid] [DDMFNR ddm-fnr]
[NATVERS natural-version]

DATE date [DATECHECK date-check]
[FMDATE date-from] [TODATE date-to] [DATECHECK date-check]

           

[SIZE size]
[FMSIZE size-from] [TOSIZE size-to]

           
[USERID user-id]
[TID terminal-id]
[except-clause]

except-clause

EXCEPT
( object-name
[LIBRARY library-name]
[OBJTYPE group-type]
[SCKIND object-kind]
[NATTYPE object-type]
[MODE object-mode]
[SLKIND message-type]
[FMNUM error-number-from] [TONUM error-number-to]
[LANGUAGE languages]
[DDMDBID ddm-dbid] [DDMFNR ddm-fnr]
[NATVERS natural-version]

 

DATE date
[FMDATE date-from] [TODATE date-to]

 

 

SIZE size
[FMSIZE size-from] [TOSIZE size-to]

 

[USERID user-id]
[TID terminal-id]
)

Note:
For the command FINDLIB, only the following keywords are processed: LIBRARY, DBID and FNR.

Keyword Explanation of Natural Library Object and DDM Selection

The keywords and valid values for the objects to be processed are described in the following section.

Keyword Valid Values Default Value
object-name

A valid object name or a range of names.
If object-name contains blank characters, it must be enclosed in double quotation marks (" ").

See also Name in Name, Date and Time Specification.

none
LIBRARY A valid library name or a range of names.

If SETNO is specified, a range of names is not allowed.

See also Name.

none
DBID

A valid database ID.

0
(current FNAT/FUSER)

FNR

A valid file number.

0
(current FNAT/FUSER)

OBJTYPE Types of object are:
E User-defined error messages
N Natural programming objects
R   Shared resources
* Asterisk (all)

or a valid combination.

*
SETNO Only applies to the unload and find functions and if Predict is installed. Not applicable to application objects (see also Selecting Application Objects).

A one- or two-digit number that identifies the retained set to be used for the names of the objects to be processed. A retained set is created with the save set option of the LIST XREF command.

If SETNO is specified, the value specified for object-name is ignored.

For detailed information on Predict sets, refer to the Predict documentation.

none
SETUSER Only applies to the unload and find functions and if Predict is installed. Not applicable to application objects (see also Selecting Application Objects).

The ID of the user who created the Predict set. If no ID is specified, the value of the system variable *USER (see also the System Variables documentation) is used.

*USER
SETLIBRARY Only applies to the unload and find functions and if Predict is installed. Not applicable to application objects (see also Selecting Application Objects).

The name of the library to be searched for a Predict set. If you do not specify SETLIBRARY, the library specified with LIBRARY is used instead.

 
NATTYPE

One or more single-character codes for Natural object types:

P   Program
N Subprogram
S Subroutine
C Copycode
H Helproutine
T Text
7 Function
8 Adapter
G Global data area
L Local data area
A Parameter data area
M Map
4 Class
3 Dialog
5 Natural command processor
V DDM
* All object types
*
SCKIND

The kind of Natural programming objects.
Valid input values are:

S   Source objects: objects that are only stored in source form.
C Cataloged objects: objects that are only stored in cataloged form.
A All source and cataloged objects.
W All stowed objects: source and cataloged objects with identical date and time.
B Source and cataloged objects if both exist.

Note:
W and B are valid for the UNLOAD and FIND commands only. For LOAD and SCAN, W and B are valid entries, but they are treated like A (all objects). If data is processed in Transfer format, only S (source objects) or A applies.

The search result of an object check also depends on the settings of DATE (or FMDATE and TODATE) and DATECHECK.

A
MODE

The programming mode of the Natural programming objects.
Valid input values are:

A   Any.
R All objects in reporting mode.
S All objects in structured mode.
 
FMNUM A start number of Natural error messages.

Valid range: 1 to 9999.

1
TONUM An end number of Natural error messages.

Valid range: 1 to 9999.

The value must be greater than or equal to the value of FMNUM, if specified.

9999
or value of
FMNUM
(if specified)

SLKIND

The kind of Natural error message text.
Valid input values are:

S   Short text.
Cannot be applied to the DELETE command (see Basic Command Syntax).
L Long text.
A Short and/or long text.
B Short and long text if both exist.
A
LANGUAGE Up to 8 valid language codes (for example, code 1 for English) of user-defined error messages. An asterisk (*) selects all language codes. *
DDMDBID The valid database ID (1 to 65535) of a DDM.

UNLOAD, LOAD and SCAN: 0 denotes that no check is performed. DDMs are processed, regardless of their database ID (DBID).

0

DDMFNR The valid file number (1 to 65535) of a DDM.

UNLOAD, LOAD and SCAN: 0 denotes that no check is performed. DDMs are processed, regardless of their file number (FNR).

0

NATVERS The Natural version of Natural programming objects. You can also specify a range of versions: see Name.

blank
(no check)

DATE The save or catalog date of Natural programming objects, and the date of shared resources.

You can add a time by inserting a blank between date and time. For the format and ranges allowed, see Date and Time in Name, Date and Time Specification.

Special terms allowed are YESTERDAY and TODAY. See Special Dates in Date.

A date check can also be defined for a specified object kind (source or cataloged object): see DATECHECK.

blank
(no check)

DATECHECK Kind of object (source or cataloged object) to be checked for the date or date range defined with DATE, or FMDATE and TODATE, respectively.

Valid input values are:

S   Check the date of source objects and (if available) the date of objects which exist only as cataloged objects.
C   Check the date of cataloged objects and (if available) the date of objects which exist only as source objects.

The search result of the object check also depends on the setting of SCKIND.

blank
(no check)

FMDATE A start value:

The date on or after which Natural programming objects were cataloged or saved, and the date of shared resources. The format is identical to DATE. See Date.

Special terms allowed are YEAR, MONTH, YESTERDAY and TODAY. See Special Dates in Date.

A date check can also be defined for a specified object kind (source or cataloged object): see DATECHECK.

blank
(no check)

TODATE An end value:

The date on or before which Natural programming objects were cataloged or saved, and the date of shared resources. The format is identical to DATE. See Date.

Special terms allowed are YEAR, MONTH, YESTERDAY and TODAY. See Special Dates in Date.

A date check can also be defined for a specified object kind (source or cataloged object): see DATECHECK.

blank
(no check)
or high value
(if FMDATE specified)

SIZE The size of Natural programming objects and shared resources (up to 7 digits).

0
(no check)

FMSIZE A start value:

The minimum size of Natural programming objects and shared resources (up to 7 digits).

0
(no check)

TOSIZE An end value:

The maximum size of Natural programming objects and shared resources (up to 7 digits).

0
(no check)
or high value
(if FMSIZE specified)

USERID The ID of the user who saved or cataloged the Natural programming objects.

You can also specify a range of user IDs: see Name.

blank
(no check)

TID

The ID of the terminal where the Natural programming objects were saved or cataloged (provided by the Natural system variable *INIT-ID).

You can also specify a range of terminal IDs: see also Name.

blank
(no check)

EXCEPT All items that match the selection criteria entered before EXCEPT are checked against all parameters contained within the parentheses following the keyword EXCEPT. If they match all these parameters too, they are not processed. not applicable

Notes:

  1. Parameters that are irrelevant for OBJTYPE are ignored. For example: DATE, SIZE and USERID have no meaning for Natural error messages.
  2. DBID and FNR are ignored by the LOAD or SCAN command. These parameters must instead be specified in the parameter-setting clause as described for LOADFNAT... and LOADFUSER... in Keyword Explanation of parameter-clause.
  3. If an object for shared resources contains blank characters, it must be enclosed in double quotation marks (" ").

Natural-Related Object Selection

This selection is used to select Natural-related objects for processing.

The appropriate syntax is shown and explained in the following section.

Syntax of Natural-Related Object Selection

object-name NATPATH natural-path-name

DATE date
[FMDATE date-from] [TODATE date-to]

SIZE size
[FMSIZE size-from] [TOSIZE size-to]

[ EXCEPT  
  (object-name NATPATH natural-path-name  
 

DATE date
[FMDATE date-from] [TODATE date-to]

 

SIZE size
[FMSIZE size-from] [TOSIZE size-to]

   ) ]  

Keyword Explanation of Natural-Related Object Selection

The keywords and valid input values for the objects to be processed are described in the following section.

Keyword Valid Values Default Value
object-name The name of a Natural-related object. If object-name contains blank characters, it must be enclosed in double quotation marks (" ").

See also Name in Name, Date and Time Specification.

none
NATPATH

NATROOT
NATGUI_BMP
TMP_PATH
NATBIN
PROFILE_PATH
PARM_PATH
NATERR

none
DATE The modification date of Natural-related objects.

You can add a time by inserting a blank between date and time. For the format and ranges allowed, see Date and Time in Name, Date and Time Specification.

Special terms allowed are: YESTERDAY and TODAY.
See Special Dates in Date.

blank
(no check)

FMDATE A start value:

The date on or after which Natural-related objects were modified. The format is identical to DATE. See Date.

Special terms allowed are: YEAR, MONTH, YESTERDAY and TODAY. See Special Dates in Date.

blank
(no check)

TODATE An end value:

The date on or before which Natural-related objects were modified. The format is identical to DATE. See Date.

Special terms allowed are: YEAR, MONTH, YESTERDAY and TODAY. See Special Dates in Date.

blank
(no check)
or high value
(if FMDATE specified)

SIZE The size of Natural-related objects (up to 10 digits).

0
(no check)

FMSIZE A start value:

The minimum size of Natural-related objects (up to 10 digits).

0
(no check)

TOSIZE An end value:

The maximum size of Natural-related objects (up to 10 digits).

0
(no check)
or high value
(if FMSIZE specified)

EXCEPT See EXCEPT in Natural Library Object and DDM Selection.  

Note:
The NATPATH clause in the EXCEPT part is evaluated by the LOAD or SCAN command only.

Natural System Error Message Selection

This selection is used to select Natural system error messages for processing.

The appropriate syntax is shown and explained in the following section.

Syntax of Natural System Error Message Selection

ERROR NATERROR
[DBID dbid FNR fnr]
[FMNUM error-number-from] [TONUM error-number-to]
[SLKIND message-type]
[LANGUAGE languages]
[ EXCEPT
  (
  [FMNUM error-number-from] [TONUM error-number-to]
  [SLKIND message-type]
  [LANGUAGE languages]
  ) ]

Keyword Explanation of Natural System Error Message Selection

The keywords and valid input values for the Natural system error messages to be processed are described in the following section.

Keyword Valid Values Default Value
DBID

Only applies to system error messages on mainframes.

A valid database ID.

0
(current FNAT)

FNR Only applies to system error messages on mainframes.

A valid file number.

0
(current FNAT)

FMNUM A start number of system error messages.

Valid range: 1 to 9999.

1
TONUM An end number of system error messages.

Valid range: 1 to 9999.

The value must be greater than or equal to the value of FMNUM if specified.

9999
or value of FMNUM
(if specified)

SLKIND See SLKIND in Natural Library Object and DDM Selection. A
LANGUAGE Up to 8 valid language codes (for example, code 1 for English) of system error messages.

An asterisk (*) selects all language codes.

*
EXCEPT See EXCEPT in Natural Library Object and DDM Selection.  

Note:
DBID and FNR are ignored by the LOAD or SCAN command. These parameters must instead be specified in the parameter-setting clause as described for LOADFNAT... in Keyword Explanation of parameter-clause.

Natural Command Processor Selection

This selection is used to select Natural command processor sources for processing.

The appropriate syntax is shown and explained in the following section.

Syntax of Natural Command Processor Source Selection

object-name   PROCESSOR ncp-library-name

DBID ncp-dbid FNR ncp-fnr [file-options]

[EXCEPT  
  (object-name  
  [LIBRARY ncp-library-name]  
  ) ]  

file-options

[CIPHER ncp-cipher]

PASSWORD
PSW

ncp-password

Note:
For the command FINDLIB, only the following keywords are processed: PROCESSOR, DBID, FNR, CIPHER and PASSWORD or PSW.

Keyword Explanation of Natural Command Processor Source Selection

The keywords and valid input values for the Natural command processor sources to be processed are described in the following section.

Keyword Valid Values Default Value
object-name The name of a valid Natural command processor source or a range of names.

See also Name in Name, Date and Time Specification.

none
PROCESSOR A valid library name or a range of names.

See also Name.

none
DBID The valid database ID of the Adabas file where the Natural command processor sources are stored.

Value of
LFILE 190

FNR The valid file number of the Adabas file where the Natural command processor sources are stored.

Value of
LFILE 190

CIPHER The 8-digit cipher code of the Adabas file where the Natural command processor sources are stored. blank
PASSWORD

or

PSW
The 8-character Adabas password of the Adabas file where the Natural command processor sources are stored. blank
EXCEPT See EXCEPT in Natural Library Object and DDM Selection.  

Note:
DBID, FNR, CIPHER and PASSWORD or PSW are ignored by the LOAD or SCAN command. These parameters must instead be specified in the parameter-setting clause as described for LOADNCP... in Keyword Explanation of parameter-clause.

External File Selection

This selection is used to select external files (external objects) for processing.

The appropriate syntax is shown and explained in the following section.

Syntax of External File Selection

external-file-name PATH external-path-name

DATE date
[FMDATE date-from] [TODATE date-to]

SIZE size
[FMSIZE size-from] [TOSIZE size-to]

[ EXCEPT  
  (external-file-name [PATH external-path-name]  
 

DATE date
[FMDATE date-from] [TODATE date-to]

 

SIZE size
[FMSIZE size-from] [TOSIZE size-to]

   ) ]  

Keyword Explanation of External File Selection

The keywords and valid input values for the external files to be processed are described in the following section.

Keyword Valid Values Default Value
external-file-name

The name of an external file.

If external-file-name contains blank characters, it must be enclosed in double quotation marks (" ").

See also Name in Name, Date and Time Specification.

none
PATH The name of the path where the external file is located. none
DATE

The modification date of external files.

You can add a time by inserting a blank between date and time. For the format and ranges allowed, see Date and Time in Name, Date and Time Specification.

Special terms allowed are YESTERDAY and TODAY. See Special Dates in Date.

blank
(no check)

FMDATE

A start value:

The date on or after which external files were modified. The format is identical to DATE. See Date.

Special terms allowed are YEAR, MONTH, YESTERDAY and TODAY. See Special Dates.

blank
(no check)

TODATE

An end value:
The date on or before which external files were modified. The format is identical to DATE. See Date.

Special terms allowed are YEAR, MONTH, YESTERDAY and TODAY. See Special Dates.

blank
(no check)
or high value
(if FMDATE specified)

SIZE The size of external files (up to 10 digits).

0
(no check)

FMSIZE

A start value:
the minimum size of external files (up to 10 digits).

0
(no check)

TOSIZE

An end value:
The maximum size of external files (up to 10 digits).

0
(no check)
or high value
(if FMSIZE specified)

EXCEPT See EXCEPT in Natural Library Object and DDM Selection.  

Note:
The NATPATH clause in the EXCEPT part is only evaluated by the LOAD and SCAN commands.

FDT Selection

This selection is used to select Adabas FDTs (Field Definition Tables) for processing.

For detailed information about the Adabas FDTs, see the Adabas on Windows and for Linux and Cloud documentation > Adabas Basics > FDT Record Structure.

For loading FDTs, see also FDTs in the section Object Specification.

The appropriate syntax is shown and explained in the following section.

Syntax of FDT Selection

FDT
DBID dbid

FNR fnr [CIPHER cipher]

PASSWORD
PSW

password

FMFNR fnr-start TOFNR fnr-end

Keyword Explanation of FDT Selection

The keywords and valid input values for the FDTs to be processed are described in the following section.

Keyword Valid Values Default Value
DBID The database ID of the FDT. none
FNR The file number of the FDT. none
CIPHER The 8-digit Adabas cipher code of the FDT. none
PASSWORD

or

PSW
The 8-character Adabas password of the FDT. none
FMFNR Only applies to the FIND or UNLOAD command.

A start value:
The file number (FNR) of an FDT.

none
TOFNR Only applies to the FIND or UNLOAD command.

An end value:
The file number (FNR) of an FDT.

none

Application Selection

This selection applies to applications created and maintained in Natural Studio's application workspace and the libraries or objects that belong to these applications.

The appropriate syntax is shown and explained in the following section.

Selecting Base and Compound Applications

This selection only applies to the find function.

Syntax

APPLICATION APNAME application-name
[APTYPE application-type]
[COMPAPPLICATION compound-application-name]
[ EXCEPT
  (APNAME application-name
  [APTYPE application-type]
  ) ]

Selecting Application Libraries

This selection only applies to the find function.

Syntax

APPLICATION APLIBRARY application-library-name
[BASEAPPLICATION base-application-name]
[ COMPAPPLICATION compound-application-name]

DBID dbid [FNR fnr]

 
[ EXCEPT
  (APLIBRARY application-library-name
  [BASEAPPLICATION base-application-name]
  ) ]

Selecting Application Objects

This selection only applies to the find and unload functions.

Syntax

APPLICATION APOBJECTS application-object-name
[BASEAPPLICATION base-application-name]
[COMPAPPLICATION compound-application-name]
[LIBRARY library-name]
[object-specification]
[ EXCEPT  
  (APOBJECT application-object-name
  [LIBRARY library-name]
  [BASEAPPLICATION base-application-name]
  [object-specification]
  ) ]

Keyword Explanation of Application Selection

The keywords and valid input values for the applications, application libraries or application objects to be processed are described in the following section.

Keyword Valid Values Default Value
APNAME

A valid name of a Natural application or a range of names.

See also Name in Name, Date and Time Specification.

*
APTYPE

A valid application type:

   
B Base application
O Compound application
* All: base and/or compound applications
*
COMPAPPLICATION

Only applies if APTYPE is set to * or B.

The name of a compound application to which the specified base application belongs or a range of names.

Only base applications that belong to the specified compound application(s) are selected; base applications that do not belong to a compound application are not selected.

none
EXCEPT See EXCEPT in Natural Library Object and DDM Selection. not applicable
APLIBRARY

The valid name of a library that belongs to a Natural base or compound application or a range of names.

See also Name in Name, Date and Time Specification.

*
BASEAPPLICATION

The valid name of a Natural base application to which an application library or application object belongs.

See also Name in Name, Date and Time Specification.

*
DBID

The valid database ID of an application library.

0
(no check)

FNR

The valid file number of an application library.

0
(no check)

APOBJECT

The valid name of an application object that belongs to a base or compound application, or a range of names.

See also Name in Name, Date and Time Specification.

*
LIBRARY

A valid library name or a range of names.

If OBJTYPE is set to D (see Natural Library Object and DDM Selection), the library name is ignored.

See also Name in Name, Date and Time Specification.

*
object-specification

Indicates that additional selection criteria can be specified for application objects as shown in the syntax diagram for Natural library objects and DDMs: all items listed below LIBRARY library-name can also be applied to application objects whereas object-name in the EXCEPT clause is irrelevant for application objects.

not applicable

Object Selection for Delete Instructions

This selection is used to specify delete instructions for Natural library objects, DDMs, user-defined error messages and Natural system error messages. The delete instructions are executed when a work file of internal format is loaded in the target environment with the DELETEALLOWED option specified.

The appropriate syntax is shown and explained in the following section.

Syntax of Delete Instructions for Natural Library Objects and DDMs

object-name
LIBRARY library-name

OBJTYPE

../graphics/cbo2.gif

N

../graphics/cbc2.gif

NATTYPE

../graphics/cbo2.gif

*
V

../graphics/cbc2.gif

[SCKIND object-kind]

Keyword Explanation of Delete Instructions for Natural Library Objects and DDMs

The keywords and valid values for the objects to be processed are described in the following section.

Keyword Valid Values Default Value
object-name

A valid object name or a start value (value*) for a range of names such as ABC*.

none
LIBRARY A valid library name. A range specification is not allowed. none
OBJTYPE A valid object-type code:
N Natural programming objects
*
NATTYPE

A Natural object type. Valid input values are:

* All object types
V DDMs
*
SCKIND

The kind of Natural programming objects.
Valid input values are:

S       Source objects. If used in the except-clause (see Syntax of Natural Library Object and DDM Selection): objects that are stored only in source form.
C Cataloged objects. If used in the except-clause: objects that are stored only in cataloged form.
A All source and cataloged objects.
A

Syntax of Delete Instructions for User-Defined Error Messages

*
LIBRARY library-name
OBJTYPE E
FMNUM error-number-from
[TONUM error-number-to]
[SLKIND message-type]
[LANGUAGE languages]

library-name denotes the name of a single library; a range specification is not allowed.

For explanations of the other elements used in this syntax, see Keyword Explanation of Natural Library Object and DDM Selection.

Syntax of Delete Instructions for Natural System Error Messages

ERROR NATERROR
FMNUM error-number-from
[TONUM error-number-to]
[SLKIND message-type]
[LANGUAGE languages]

For explanations of the elements used in this syntax, see Keyword Explanation of Natural System Error Message Selection.