This section describes the batch utilities provided with Super Natural.
This section covers the following topics:
Super Natural provides the following batch utilities:
Batch Utility | Description |
---|---|
SNULD | Unloads profile data and transaction specifications |
SNLOAD | Loads profile data and transaction specifications |
SNDELUF | Deletes user files |
SNSORTFI | Sorts file links in user profiles |
You use the utilities SNULD and SNLOAD to copy Super Natural user profile data, file profile data, help texts, and transaction specifications between different Natural user system files (FUSER). You can also use SNULD to delete profile data and help texts.
Notes:
Use the Natural Object Handler to copy or move JCL members, prototype programs and objects between system files.
For further information on SNULD and SNLOAD, see the following sections.
The program SNULD in library SYSSN unloads Super Natural user profile data, file profile data, help texts and transaction specifications from the current Natural user system file (FUSER) to sequential work file 4 in a form suitable to be reloaded using the program SNLOAD.
The following table shows which functions are available for batch jobs using SNULD and which parameters are required:
Function Code | Object Name | Language Code | Library |
---|---|---|---|
* | |||
D | Required | ||
F | Optional | ||
H | Optional | Optional | |
S | Required | Required | |
U | Optional |
The * function
unloads all user and file
profiles and help texts. It does not unload transactions.
The D
function deletes objects according to
the object name parameter specified. You can use the following object name
parameters with the D
function:
* | File profile data, user profile data and help texts |
F | File profile data |
H | Help texts (language specific) |
U | User profile data |
All objects of the type specified are deleted.
The F
function unloads either all file
profiles (including user file and superfile profiles) or named file profiles.
It does not unload the sources (transaction specifications) of superfiles.
The H
function unloads either all or named
help texts either in all languages or in a specified language.
Note:
You cannot load help texts from Super
Natural 2.3 to a Super Natural 3.1
environment.
The S
function unloads transaction
specifications. It does not unload the generated source code and the
Natural object code. To regenerate the
Natural source and object code, you must modify and
save every transaction.
You can also use SYSMAIN to copy the transaction objects, so the transactions can be run immediately in the new environment.
If you do not specify a transaction name and library name containing the appropriate prefix, all transaction specifications and layouts from all libraries are unloaded.
If you use the asterisk notation (*) following the prefix, all transaction specifications and layouts or libraries with that prefix are unloaded.
The U
function unloads either all or named
user profiles.
Parameters must be entered after the function code in the following order:
function-code,object-name,language-code,library
The parameters must be separated from the code and from one another by
the Natural delimiter character. If one of the parameters is not specified, or
not applicable, the character preceding it is still required. For example, if
you want to unload all English help texts, the parameters must be specified as:
H,,1
You can use the asterisk notation with the parameters to further limit
the object name and library of the items to be unloaded. For example the
notation S,TR*,,Y*
would unload all transactions whose name begins
with TR in the library with prefix "Y".
Each function must be written on a separate line (along with its parameters).
LOGON SYSSN
SNULD
H,,1
S,TR*,,Y*
.
FIN
1: Unloads all English help texts.
2: Unloads all transactions whose names start with TR in libraries with the prefix Y.
LOGON SYSSN
SNULD
S,*,,Y*
.
FIN
Unloads all transactions in all private libraries with the prefix Y.
LOGON SYSSN
SNULD
S,IPGMNAME,,YUSERID
.
FIN
Unloads the specified transaction in the library given.
LOGON SYSSN
SNULD
S,I*,,YUSERID
.
FIN
Unloads all transactions in the specified library whose name start with I.
LOGON SYSSN
SNULD
S,*,,YUSERID
.
FIN
Unloads all transactions in the specified library.
LOGON SYSSN
SNULD
F,*
S,*,,public-library-prefixSUPFILE
.
FIN
1: Unloads all file profiles including user file and superfile profiles.
2: Unloads the sources (transaction specifications) of the superfiles.
The program SNLOAD in library SYSSN loads Super Natural user and file profile data, help texts and transaction specifications from sequential work file 4 to a user system file (FUSER). The data must be in the same format as achieved by unloading Super Natural data using the program SNULD.
To load Super Natural data
Specify the following in a batch Naturalsession:
LOGON SYSSN
SNLOAD
.
FIN
SNDELUF2 replaces SNDELUF and is used to delete user files in batch. SNDELUF2 caters for the extended ranges of FNR and DBID available with NaturalVersion 2.3.
Notes:
To delete user files in batch
Issue the following command in the library SYSSN:
LOGON SYSSN
SNDELUF2 parameter1,parameter2,parameter3,parameter4,parameter5
.
FIN
with the parameters described in the following section.
Note:
Parameters must be in delimiter mode
(Natural parameter
IM=D
).
Specify the physical Adabas file and database ID (DBID (N5) FNR (N5)) of the Super Natural personal database.
Specify the ID of the user for whom the files are to be deleted.
*END
indicates the end of the sequence,
*ALL
indicates all users
.
Specify which file is to be processed. blank ( )
indicates all files
.
Specify which of the processed files are to be deleted.
blank ( )
indicates all files marked by the user for
deletion and all files with expired retention period.
ALL
indicates all
files
.DAT
indicates unconditional deletion
of all specified data.
Specify the user file DDM prefix as defined in the options (default
UF
).
The utility SNSORTFI should be used in batch mode. It sorts alphabetically the files that are linked to a user profile so that the file list at transaction creation is displayed in alphabetical order.
This utility should be used from time to time when new files are added to a Super Natural environment and are linked with users through the file profile. In this case, the file list of the user is not newly sorted alphabetically. Instead, the file is added to the end of the list.
Note:
When a new file is linked through a user profile, the files of this
user are automatically newly sorted.
File links in user profiles are sorted by using the program SNSORTFI in library SYSSN in the form:
LOGON SYSSN
SNSORTFI parameter
FIN
If parameter
is blank, file links of all user
profiles are sorted. Parameter
can be used in any of the
following forms:
NAME | sorts file links in one specific user profile |
NAM* | sorts file links in all user profiles starting with NAM |
NAM< | sorts file links in all user profiles from the beginning until NAM |
NAM> | sorts file links in all user profiles from NAM until the end |