This document covers the following topics:
The ASF Utilities and Services are a set of functions which can be started from the ASF Utilities and Services Menu (Main Menu option "A").
The ASF Utilities are used for the management of an ASF system. This includes:
"Condensing" of nucleus records to generate averages and/or differences.
Transferring (loading) records from a foreign ASF system.
Synchronizing the store times of ASF records.
Maintenance of the user exits such as the displaying of delta values instead of cumulative values.
Demonstrate the use of the Application Programming Interface (API).
The ASF Services are used for the maintenance of an ASF environment. This includes:
Display the ASF version and correction status.
Maintain the ASF System file settings.
Maintain the User Profiles.
The diagnosis of ASF with the SYSRDC debugger or with the ASF internal trace facility.
Figure 4-1: ASF Utilities and Services
18:59:42 *** A D A B A S Statistics Facility *** 2008-01-23 USERID - ASF Utilities and Services Menu - MUM00001 Code Service ------- --------------------------------------- A Condense records to average records D Condense records to delta records S Synchronize / regenerate store times T Transfer from foreign ASF system V ASF Version Information F ASF System File Maintenance P Profile Maintenance X Userexit Maintenance I ASF Application Program Interface 1/2 API Example 1/2 R/M SYSRDC Debugger / ASF Trace Maintenance ./? Terminate / Help ------- --------------------------------------- Enter code: _ Direct command ==> _______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help More Term Menu |
Figure 4-2: Menu for ASF Utilities and Services
The menu lists the available ASF Utilities and Services. You can select one of the listed items by typing the corresponding one-letter code in the "Enter code" field. When you have entered the input data, press ENTER to activate the function.
This menu is reached by selecting the service code "A" in the Main Menu.
The following table lists the utilities and services available.
Code | Description |
---|---|
A | Condense records to average or modified average records on a daily, weekly or monthly basis. |
D | Condense records to difference records on a daily, weekly or monthly basis. |
S | Synchronize the store times of nucleus records, or regenerate the original store times in records which were previously synchronized. |
T | Transfer (load) records from a foreign ASF system. |
V | Receive information about the current installed ASF version, the last correction applied, the ASF system file numbers, and more. |
F | Switch to another ASF environment by changing the ASF system file settings (ASF Data and ASF Profiles). |
P | Maintain the General User Profile, the e-Mail Profile and the Con-nect Profile. |
X | Maintain the ASF User Exits such as "Display delta values". The ASF User Exit menu is described in the section User Exit Maintenance Menu. |
I | Test the Application Programming Interface (API) subprogram ASFGET01 to retrieve and display ASF records. |
1 | Run the API example 1. |
2 | Run the API example 2. |
R | Analyze ASF with the SYSRDC debugger. |
M | Debug ASF with the ASF Trace Facility. |
Since the proper use of condensed records can be very beneficial in the management of your ASF system, the following section has been included as a guide to usage.
ASF offers the utility functions "Condense Records to Average Records" and "Condense Records to Delta Records", both of which generate new "condensed" records which contains averages and/or differences of the ASF data fields in a set of nucleus records. The following paragraphs contain general information concerning the purpose of such condensed records.
In an ASF system, nucleus records are typically stored daily at the end of the online operation. Over the period of 1 month, this results in about 20 daily records (one record per weekday). If you wish to make an evaluation over a longer period of time, for example 6 months, this would require the data from about 120 nucleus records. In many cases, however, it would be sufficient to use a representative set of data for each month, based on the average values of each of the individual ASF data fields.
For this purpose, the utility function "Condense records to average records" is provided. This function generates new records, each containing average values from a set of nucleus records which were created over a given period of time, for example one week or one month.
In an environment in which the nucleus is shut down and restarted every day, average values can be calculated for cumulative ASF data fields (such as READ ASSO) as well as for non-cumulative ASF data fields (such as ASSO USED). Records containing such average values are called average records. If, however, the nucleus is run in a 24-hour environment (no daily shutdown), it is meaningless to calculate average values for the cumulative ASF data fields, since these values are not reset to 0 every day in this environment. Therefore, in order to generate a representative set of data for a given period of time (for example, one week or one month) in a 24-hour environment, differences (instead of averages) are calculated for the cumulative ASF data fields and averages are calculated for the non-cumulative ASF data fields. Records containing this combination of average and difference values are called modified average records.
In an environment with a daily shutdown, you can generate either average records or modified average records. In a 24-hour environment, only modified average records can be used, since it is not meaningful to calculate average values for cumulative ASF data fields in this environment.
For some special calculations it can be useful to summarize the differences which have occurred in the ASF data fields over a given period. For this purpose, the utility function "Condense records to delta records" is provided. With this function, differences are calculated for both cumulative and non-cumulative ASF data fields in 24-hour environments as well as in environments with a daily nucleus shutdown. The records thus created are called difference records. Unlike the average records discussed above, such difference records are not representative of the values of the ASF data fields during the time period; they express only how values have changed.
The following examples show the circumstances in which condensed records are generated.
Figure 4-3: Example with daily nucleus shutdown.
Figure 4-3 shows in graphical form the values which were recorded on a daily basis over the period of 1 week for the cumulative ASF data field READ ASSO and the non-cumulative ASF data field ASSO USED. The values were recorded in an environment where the nucleus was shut down and restarted every day.
For the field READ ASSO, and for all other cumulative ASF data fields, there are two ways to "condense" the values:
The average daily value can be calculated from Monday to Sunday, or
the difference from Sunday to Sunday can be calculated, thereby giving the total number of ASSO reads for the week.
For the field ASSO USED, and for all other non-cumulative ASF data fields, there are also two ways to condense the values:
The average daily value can be calculated from Monday to Sunday, or
the difference from Sunday to Sunday can be calculated, thereby giving the increase in Associator space allocation during the week.
If you select the utility function "Condense Records to Average Records", average values as described in this example are calculated for all cumulative and non-cumulative ASF data fields. The records which are generated are average records.
Similarly, if you select the utility function "Condense Records to Delta Records", differences as described in this example are calculated for all cumulative and non-cumulative ASF data fields. The records which are generated are difference records (also called delta records).
Figure 4-4: Example for 24-hour environment (no daily nucleus shutdown).
Figure 4-4 shows in graphical form the values which were recorded on a daily basis over the period of 1 week for the cumulative ASF data field READ ASSO and the non-cumulative ASF data field ASSO USED. The values were recorded in an environment where the nucleus was run continuously in a 24-hour environment.
For the field READ ASSO, and for all other cumulative ASF data fields, there is only one meaningful way to condense the values:
The difference from Sunday to Sunday can be calculated, thereby giving the total number of Associator reads for the week.
For the field ASSO USED, and for all other non-cumulative ASF data fields, the same possibilities exist as for running in an environment with a daily shutdown, so meaningful averages and differences can be calculated.
Here, the utility function "Condense Records to Delta Records" can be used for both cumulative and non-cumulative ASF data fields.
However, since average values are only meaningful for the non-cumulative ASF data fields in a 24-hour environment, the utility function "Condense Records to Average Records" should be used with the field "24-hr environment" marked, resulting in the following processing:
Averages are calculated for the non-cumulative ASF data fields.
Differences are calculated for the cumulative ASF data fields.
The records which result are modified average records, and they contain a combination of average values for the non-cumulative ASF data fields and differences for the cumulative data fields.
Average Records:
Suitable for databases with a daily shut down, not suitable for databases in a 24-hour environment.
The condensed records summarize the nucleus records over a given period of time (for example, 1 month).
Difference Records:
Suitable for databases with a daily shut down and for databases in a 24-hour environment.
The condensed data represents only changes (for example, ASSO USED = 0) in ASF data fields over a period of time. Such data can be useful for special applications, but since absolute values are missing, the data in such records is not entirely representative.
Modified Average Records:
Suitable for databases with a daily shut down and for databases in a 24-hour environment.
The condensed records contain average values for non-cumulative ASF data fields and differences for cumulative data fields.
The condensed records summarize the nucleus records over a given period of time (for example, 1 month).
When planning your ASF system, you should choose only one of these methods. If you are running your database in a 24-hour environment, there is only one choice, namely modified average records. If you shut down and restart the nucleus every day, you can choose any of the methods. Average records have the advantage that the values calculated for the cumulative ASF data fields such as READ ASSO are the daily average values which you already know from the Adabas utility ADAREP or the nucleus end session summary. Furthermore, ASF can calculate these average values faster than if the nucleus is run in a 24-hour environment.
The basic administrative method for creating condensed records for use in evaluations is:
Run the appropriate condense function to access all the nucleus records stored for a given period, for example 1 month, and generate new condensed records containing average and/or differences for the ASF data fields.
Generate the condensed records for a given period of time, for example 1 month, at the start of the next period.
Assign a special Store Type to the condensed records, so that they can be used in all of the available 10 types of ASF evaluations (see the description of the special Store Types later in this section).
When you activate the first user function of ASFUEX01, delta (difference) values are displayed in every evaluation. This function is described in details in the section Displaying Delta Values. We outline here the difference between condensing records and the values displayed with the user exit ASFUEX01:
The user exit shows the difference of two succeeding ASF record. It does not "condense" multiple records into one.
The user exit shows only virtual values, i.e. the values are calculated while the evaluation runs. No records are stored on the ASF Data file.
The user exit processes only cumulative values. Non-cumulative values remain and are displayed as they are.
The user exit works as-is for daily shut down and 24-hour environments. It can compare databases of both types in one evaluation.
The user exit can be modified, e.g. to display differences of non-cumulative fields. But in general, the delivered user exit should be sufficient.
No special procedure is required for the generating of the delta values with the user exit. It is just a "switch on and see".
18:21:41 *** A D A B A S Statistics Facility *** 2008-01-24 USERID - Condensing nucleus records to average records - MSV00001 Code Service ------- ------------------------------------- S Start condensing ? Help . Terminate ------- ------------------------------------- Enter code : _ Snapshots from : __________ , 00:00 to __________ , 23:59 Store profile : ________________ ID: Store type : __ 24 hr environment : _ <= delta method for cumulative fields Generate st. type : __ Condensing period : __ Reduced on DB-ID : _____ Restart from reduced DB-ID : _ Direct command ==> _______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help More Term Menu |
Figure 4-5: Menu for condensing nucleus records to average records.
This menu is used for generating average records or modified average records. Average records contain daily, weekly or monthly average values of ASF data fields. Modified average records are similar to average records, but for cumulative ASF data fields a difference is calculated instead of an average. Therefore, each modified average record contains a mixture of average and difference values.
This menu is reached by selecting the service code "A" in the ASF Utilities Menu.
ASF reads the nucleus records which meet the selection criteria, and generates new average records which contain the averages of the individual numerical ASF data fields. If you mark the field "24 hr environment", modified average records are generated instead of average records. The period of time to which each condensed record refers is defined in the input field "Condensing period". In each condensed record, the non-numerical ASF data fields are set to the values from the last nucleus record processed for the condensed record.
A distinction is made between a 24-hour environment (the nucleus runs continuously) and daily shutdown (the nucleus is shut down and restarted every day).
For operation with a daily shutdown, in which cumulative ASF data fields such as READ ASSO are reset to 0 every day at nucleus startup, records are condensed so that averages are calculated for both cumulative and non-cumulative ASF data fields. Such records are called average records.
In a 24-hour environment, the nucleus runs continuously, so cumulative ASF data fields such as READ ASSO are NOT reset to 0 every day. In this case it is meaningless to calculate average values for the cumulative ASF data fields, so instead the records are condensed so that
Differences are calculated for the cumulative ASF data fields and
averages are calculated for the non-cumulative ASF data fields.
Such records are called modified average records.
Note:
The function Condense Records to Delta Records (Code D),
described later in this section, generates a third type of condensed record,
namely difference records.
ASF writes values into the following special ASF data fields of the condensed records:
ASF Data Field | Description |
---|---|
CONDENSED FROM D |
For average records, this contains the date of the first selected nucleus record in the specified period. For difference records and modified average records, this contains the date of the most recent nucleus record before the start of the selected period. |
CONDENSED TO DAT | For average records, modified average records and difference records, this contains the date of the last selected nucleus record in the specified period. |
RECORD TYPE |
This field indicates the method (average, modified average or difference) and the time period (day, week, month or entire period) which was used to generate the condensed record. The values for monthly condensed records are: AverMonth average records AvDelMonth modified average records DeltaMonth difference records Corresponding values exist for Week, Day and FromTo (entire period). |
STORE-DATE | For monthly condensed records, this field is set to the 15th of the month. For weekly condensed records, this field is set to the date of the Wednesday of the week. |
STORE-TIME | ASF always sets this field to 12:00. |
SYNC-DATE | (same as STORE-DATE). |
SYNC-TIME | (same as STORE-TIME). |
Select this code to start condensing nucleus records to average records or modified average records.
The code of the service you wish to activate.
The time frame (starting date/time and end date/time) for which condensed records are to be generated.
You can specify the date in either absolute or relative format. For further details, refer to the section Absolute and Relative Date Format.
The time frame should be big enough for the condensing period selected. For a condensing period "DA" it should cover the next day, for "WE" the next Monday, for "MO" the first day of the next month.
The Store Type used by the Store Program while the data was being collected. Type "*" to get an active help list.
The Store Type used by the Store Program while the data was being collected. Type "*" to get an active help list.
If you mark this field, ASF generates modified average records, which contain average values for non-cumulative ASF data fields and difference values for cumulative ASF data fields.
If you do not mark this field, ASF generates average records, which contain average values for both cumulative and non-cumulative ASF data fields.
The Store Type which ASF assigns to the generated records.
Software AG recommends you to use Store Types whose names begin with a special character such as "+", "&" or "#", in order to differentiate between condensed records and nucleus or trend records. The following Store Types are predefined in ASF for average records and modified average records:
Store Type | Description |
---|---|
+D | daily modified average records (24-hour environment) |
+F | one modified average record (24-hour environment) for the entire period |
+M | monthly modified average records (24-hour environment) |
+W | weekly modified average records (24-hour environment) |
#D | daily average records, nucleus restarted daily |
#F | one average record for the entire period, nucleus restarted daily |
#M | monthly average records, nucleus restarted daily |
#W | weekly average records, nucleus restarted daily |
The unit of time which each condensed record represents. Valid values are: DA (daily), WE (weekly), MO (monthly), and FT (from-to). Type "*" to get an active help list.
If you specify DA, ASF generates one condensed record for each 24-hour period in the entire period.
If you specify WE, ASF generates one condensed record for each 7-day period (Monday to Sunday) in the entire period.
If you specify MO, ASF generates one condensed record for each calendar month in the entire period.
If you specify FT, ASF generates one condensed record for the entire period.
If you enter a database ID in this optional input field, then data will be stored only for the database specified. The database ID must be one of those defined in the Store Profile.
If, however, you mark the field "Restart from reduced DB-ID", the ID you specify in the field "Reduced on DB-ID" is the ID of the database at which ASF restarts processing after a previous run of the function was aborted. You can determine the database ID at which the previous run was aborted by examining the job output from that run.
Mark this field if you want to restart a previously aborted run of the condense function. Specify the ID of the database with which ASF is to restart in the field "Reduced on DB-ID".
18:22:45 *** A D A B A S Statistics Facility *** 2008-01-24 USERID - Condensing nucleus records to delta records - MSV10001 Code Service ------- ------------------------------------- S Start condensing ? Help . Terminate ------- ------------------------------------- Enter code : _ Snapshots from : __________ , 00:00 to __________ , 23:59 Store profile : ________________ ID: Store type : __ Nucleus end : EN end nucleus <= store type of nucleus-end records Generate st. type : __ Condensing period : __ Reduced on DB-ID : _____ Restart from reduced DB-ID : _ Direct command ==> _______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help More Term Menu |
Figure 4-6: Menu for condensing nucleus records to delta records.
The menu is used for generating difference records (also called delta records). These records contain daily, weekly or monthly difference values of ASF data fields. A single difference record can also be generated for the entire period.
This menu is reached by selecting the service code "D" in the ASF Utilities Menu.
ASF reads the nucleus records which meet the selection criteria, and generates new records which contain daily, weekly or monthly differences of the individual numerical ASF data fields. The period of time to which each difference record refers is defined in the input field "Condensing period". In each condensed record, the non-numerical ASF data fields are set to blanks if the value has not changed, or to "* changed *" if the value has changed. If the field is not long enough to contain all of this text, a substring (for example "* chan" for a 6-character field) is used instead.
ASF writes values into the following special ASF data fields of the condensed records:
ASF Data Field | Description |
---|---|
CONDENSED FROM D |
For average records, this contains the date of the first selected nucleus record in the specified period. For difference records and modified average records, this contains the date of the most recent nucleus record before the start of the selected period. |
CONDENSED TO DAT | For average records, modified average records and difference records, this contains the date of the last selected nucleus record in the specified period. |
RECORD TYPE |
This field indicates the method (average, modified average or difference) and the time period (day, week, month or entire period) which was used to generate the condensed record. The values for monthly condensed records are: AverMonth: average records AvDelMonth: modified average records DeltaMonth: difference records Corresponding values exist for Week, Day and FromTo (entire period). |
STORE-DATE | For monthly condensed records, this field is set to the 15th of the month. For weekly condensed records, this field is set to the date of the Wednesday of the week. |
STORE-TIME | ASF always sets this field to 12:00. |
SYNC-DATE | (same as STORE-DATE). |
SYNC-TIME | (same as STORE-TIME). |
Select this code to start condensing nucleus records to difference records.
The code of the service you wish to activate.
The time frame (starting date/time and end date/time) for which condensed records are to be generated.
You can specify the date in either absolute or relative format. For further details, refer to the section Absolute and Relative Date Format.
The time frame should be big enough for the condensing period selected. For a condensing period "DA" it should cover the next day, for "WE" the next Monday, for "MO" the first day of the next month.
The name of the Store Profile which was used by the Store Program while the data was being collected. Type "*" to get an active help list.
The Store Type used by the Store Program while the data was being collected. Type "*" to get an active help list.
The Store Type of explicit nucleus end or of the refresh nucleus records, should any such records exist.
If no explicit nucleus end records are written during the nucleus shutdown procedure, inaccuracies of up to 5% (for the cumulative ASF data fields) can occur in the calculation of monthly difference records. This is because, even in a 24-hour environment, the nucleus must occasionally be shut down, and information concerning the cumulative ASF data fields is lost if no explicit nucleus end records are stored.
For example, if the nucleus is shut down at 11:25 and restarted at 11:40, the daily nucleus records written at 18:00 include only values for the cumulative ASF data fields from 11:40 onwards, so data for approximately half a day is lost. If, however, explicit Nucleus End records are written during the shutdown procedure, no data is lost.
The Store Type which ASF assigns to the generated records. Software AG recommends you to use Store Types whose names begin with a special character such as "+", "&" or "#", in order to differentiate between condensed records and nucleus or trend records. The following Store Types are predefined in ASF for condensed difference records:
Store Type | Description |
---|---|
&D | daily difference records |
&F | one difference record for the entire period |
&M | monthly difference records |
&W | weekly difference records |
The unit of time which each condensed record represents. Valid values are: DA (daily), WE (weekly), MO (monthly), and FT (from-to). Type "*" to get an active help list.
If you specify DA, ASF generates one condensed record for each 24-hour period in the overall time frame.
If you specify WE, ASF generates one condensed record for each 7-day period (Monday to Sunday) in the overall time frame.
If you specify MO, ASF generates one condensed record for each calendar month in the overall time frame.
If you specify FT, ASF generates one condensed record for the entire time frame.
If you enter a database ID in this optional input field, then data will be stored only for the database specified. The database ID must be one of those defined in the Store Profile.
If, however, the field "Restart from reduced DB-ID" is marked, the field "Reduced on DB-ID" contains the ID of the database at which ASF should restart processing after a previous run of the function was aborted.
Mark this field if you want to restart a previously aborted run of the condense function. Specify the ID of the database with which ASF is to restart in the field "Reduced on DB-ID".
18:23:39 *** A D A B A S Statistics Facility *** 2008-01-24 USERID - Synchronize store times of nucleus records - MSS20001 Code Service ------- ------------------------------------- S Synchronize store times R Regenerate store times ? Help . Terminate ------- ------------------------------------- Enter code : _ Snapshots from : __________ , 00:00 to __________ , 23:59 Single storage in : 00:00 h to 00:00 h Same day as 'Single storage' from Generate timestmp : 00:00 h Same day as 'Single storage' from Store profile : ________________ ID: Store type : __ Reduced on DB-ID : _____ Direct command ==> _______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help More Term Menu |
Figure 4-7: Menu for synchronizing store times of nucleus records
The menu is used for synchronizing the store times of nucleus records, or for regenerating the original store times in records which were previously synchronized.
This menu is reached by selecting the service code "S" in the ASF Utilities Menu.
When records are synchronized, their original store times are modified to a new, common store time. This is useful in cases where ASF records have been created with slightly different store times, even though they belong logically to the same set of measurements (for example, if records from a remote ASF system are loaded into the database on the local system).
When records are synchronized, the ASF data fields STORE-DATE and STORE-TIME in each of the records are modified to the synchronized time. However, the ASF data fields REAL-STORE-DATE and REAL-STORE-TIME in each record are not modified; these fields always contain the original date and time when the record was created.
When records are regenerated, the ASF data fields STORE-DATE and STORE-TIME of each record are changed back to the original, unsynchronized store times stored in the ASF data fields REAL-STORE-DATE and REAL-STORE-TIME.
Select this code to synchronize the store times.
Select this code to regenerate the original store times in records which were previously synchronized.
The code of the service you wish to activate.
The time frame (starting date/time and end date/time) for which records are to be synchronized or regenerated.
You can specify the date in either absolute or relative format. For further details, refer to the section Absolute and Relative Date Format.
Note:
Relative dates are especially useful when used in the Workplan
(see Option P in the Main Menu).
For the synchronize function, this is the range of time (starting time to end time) which will be treated as a single, common time.
For the regenerate function, this is the range of time of the records before they were synchronized.
For the synchronize function, this is the new, common time for all records being synchronized.
If the regenerate function is being used, all records which were previously synchronized to this time will be modified to contain the original, unsynchronized time.
The name of the Store Profile which was used by the Store Program while the records were being collected. Type "*" to get an active help list.
The Store Type used by the Store Program while the records were being collected. Type "*" to get an active help list.
If you enter a database ID in this optional input field, records will be synchronized or regenerated only for the database specified. The database ID must be one of those defined in the Store Profile.
18:25:17 *** A D A B A S Statistics Facility *** 2008-01-24 USERID - Transfer from foreign ASF system - MTFS0001 Code Service ------- -------------------------------------- S Start transfer from foreign ASF system ? Help . Terminate ------- -------------------------------------- Enter code : _ Store profile (id): ________________ Direct command ==> _______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help More Term Menu |
Figure 4-8: Menu for transferring data from a foreign ASF system.
This function allows ASF records from a foreign ASF system to be loaded into the local ASF system. The records which are loaded from the foreign system are unloaded on the foreign ASF system by the EXPORT function. When the records are loaded into the local ASF system, the Store Profile ID stored in each record is changed from the original value on the foreign ASF system to the ID of the Store Profile specified in the mask. This is necessary because the internal ID of the Store Profile is different in different ASF systems, even if the name is the same.
It is recommended to use the same Store Profile name on all foreign ASF systems for data which will be later loaded with a common Store Profile name into the local system. This will simplify the administrative task involved.
This function runs only in batch mode with most TP monitors, since input data is read from a work file.
Note:
You cannot import ASF records which have been exported by an ASF
1.2 or earlier system.
This menu is reached by selecting the service code "T" in the ASF Utilities Menu.
Select this code to load data from a foreign ASF system into the local ASF system.
The code of the service you wish to activate.
The name of the Store Profile which ASF will assign to records loaded into the local ASF database. If you enter a valid Store Profile name, ASF automatically displays the internal ID of the Store Profile.
Product ........: ADABAS Statistics Facility (ASF) Version ........: 8.1.1 Catalog Date ...: 2008-01-17 Last Correction : ASF81101 Last Corr. Date : 2008-01-21 User ...........: USERID Library ........: SYSASF Natural Version : 04.02.04 ASF Data .......: 1424 / 14 ASF Profiles ...: 1424 / 15 |
Figure 4-9: ASF Version Information
This screen provides information about the current installed ASF version and environment.
This screen is reached
by selecting the service code "V" in the ASF Utilities and Services menu;
by typing the command "VERSION" in the direct command line of any screen;
by starting the Natural program "VERSION" in the SYSASF library.
The following information is provided in the ASF Version Information screen:
Code | Description |
---|---|
Product | Product name and abbreviation. |
Version | Current used ASF version. |
Catalog Date | Catalog date of the current used version. |
Last Correction | Name of the last correction applied to ASF. See the section ASF Corrections in the ASF Installation documentation for more information on ASF corrections. |
Last Corr. Date | Catalog date of the last correction applied. |
User | Current user Id. |
Library | Current library. |
Natural Version | Natural version in use. |
ASF Data | DBID and file number of the ASF Data system file. |
ASF Profiles | DBID and file number of the ASF Profiles system file. |
17:17:35 *** A D A B A S Statistics Facility *** 2008-01-25 USERID - System File Maintenance - MLFILE Current values ....: ASF Data 1424 / 14 ASF Profiles 1424 / 15 New values ........: ASF Data _1424 / 14___ ASF Profiles _1424 / 15___ Enter the new DBID / FNR combinations. Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Term Save Menu |
Figure 4-10: Menu for ASF System File Maintenance
During the installation of ASF, you have defined in the Natural parameter module, which file numbers are used for the ASF system files (see the section Step 1: Customizing Natural in the ASF Installation documentation). This screen shows you the database ID and file number of the currently used ASF Data and ASF Profiles files. If there is more than one pair of ASF system files in your environment, you can access the other ASF system files by overwriting the corresponding "New values".
This screen is reached
by selecting the service code "F" in the ASF Utilities and Services menu;
by typing the command "LFILE" in the direct command line of any screen;
by starting the Natural program "LFILE" in the SYSASF library.
There are two Natural system files for ASF, namely the ASF Data file and the ASF Profiles file. The line "Current values" displays the currently used database ID and file numbers of the ASF system files. In the line "New values", you can specify another DBID/FNR combination for the ASF system files.
This function may also be used as temporary solution if ASF has been started and the ASF system files are not yet defined in the Natural parameter module.
You save the modifications by pressing the PF6 key. You leave the screen with PF3 (back to where you came from) or with PF12 (display the ASF Main Menu). If you have modified the ASF system file values and you leave the screen without pressing PF6 before, ASF will ask you whether you want to save your modifications.
The new values for the ASF system files are only valid for your current Natural session. If you open a new Natural session, the values specified in the Natural parameter module will be taken. Other Natural users are not affected by your modifications.
Purpose:
The User Profile defines a set of defaults which affect the behavior of ASF. Three screens are available for defining the User Profile:
In the General User Profile you specify general default parameters.
In the e-Mail Profile you specify information required for sending Critical Reports as e-mails.
In the Con-nect Profile you specify information required for sending Critical Reports as memos to Con-nect cabinets (if you are using Con-nect).
Screen selection
The General User Profile is reached by selecting the service code "P" in the ASF Utilities and Services menu or by typing the command "PROFILE" in the direct command line of any screen. From here you reach the e-Mail Profile by pressing PF7 and the Con-nect Profile by pressing PF8.
Figure 4-11: User Profile Navigation
This section covers the following topics:
18:26:26 *** A D A B A S Statistics Facility *** 2008-01-25 USERID - ASF Utilities and Services Menu - MUM00001 +----------< Define user-profile for user STANDARD >------------+ ! ! ! Date format : 2 (1=YYYY-MM-DD,2=DD.MM.YYYY) ! ! Decimal character : . Separating sign : , ! ! Kilo if > 1000 : N (Y/N) Mega if > 1000 k : N (Y/N) ! ! Stay after save : Y (Y/N) Keep environment : Y (Y/N) ! ! ! ! Printer name : PDEFAULT Char. per line : 80_ ! ! Left margin : 3__ Print one document: Y (Y/N) ! ! Batch output : 2 (1=seqfile,2=sysout) ! ! ! ! Limit CPU-units : 1800___ Limit ADA-calls : 1800___ ! ! Get Num.rec.loaded : Y (Y/N) Accuracy level : 10 ! ! Not used : N (Y/N) Start with menu : Y (Y/N) ! ! ! En +---------------------------------------------------------------+ Direct command ==> ______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help More Term User eMail CONNE Menu |
Figure 4-12: Menu for General User Profile Maintenance
The General User Profile is reached
by selecting the service code "P" in the ASF Utilities and Services menu;
by typing the command "PROFILE" or "PROFILE STANDARD" or "PROFILE username" in the direct command line of any screen;
by pressing PF6 in the e-Mail Profile or in the Con-nect Profile.
The PROFILE command selects the profile which contains your own defaults. The PROFILE STANDARD command selects the profile which contains the defaults for new users. The PROFILE username command selects the profile for the user username.
Type 1 to get the format YYYY-MM-DD (US format), or type 2 to get the format DD.MM.YYYY (European format).
You can choose a period "." or a comma "," as the decimal character to be used when floating point numbers are printed in the Evaluation Reports.
You can specify a comma or a period to separate groups of three digits which are displayed to the left of the decimal character. If you leave the field empty, no separating sign will be used.
If this is set to "Y", then certain numerical values greater than 1000 will be displayed using the K notation. Thus 25000 will be replaced by 25 K. Values less than 1000 will be rounded off, so that 25800 gives 26 K, whereas 25499 gives 25 K.
If this is set to "Y", then certain values greater than 1 000 000 will be displayed using the M notation. Thus 2 000 000 will be replaced by 2 M. Values less than 1 million will be rounded, so that 2 600 000 gives 3 M, whereas 2 499 000 gives 2 M.
This allows you to control the behavior of the SAVE function (PF6 key) in all subsequent screens. If you specify "N", then pressing PF6 in subsequent screens to perform the SAVE function performs not only the SAVE function but also automatically deselects the screen. If you specify "Y", then subsequent screens are not automatically deselected when you press PF6 to perform the SAVE function.
This feature allows you to retain dialogue data from one run of the ASF Menu System to the next. Dialogue data are the values which you enter in the input fields of the ASF menus, for example Evaluation Profiles, Store Profiles, Time Intervals, Store Types. Normally when you terminate ASF, the values in these fields are lost. However, if you specify "Y" in the Keep Environment field of the User Profile, these values are retained and inserted automatically into the appropriate input fields at the start of the next run of ASF. Specify "N" to switch off this option.
The name of the printer to be used for all printer output.
The number of characters per line to be used on the printer. The only valid values are 80 and 132. This value is required by ASF to determine the number of data columns which can be displayed in a printed report.
The size of the left margin to be used in printer reports, expressed as a number of characters.
If this is set to "Y" (the default value), then printer output is generated without information pages being printed between each two pages of the generated report.
If you specify "1", all printed output is directed to your specified or default output channel. If you specify "2", output is directed to the system spool queue.
A value restricting the amount of CPU time to be allowed during an evaluation.
A value restricting the number of Adabas calls to be allowed during an evaluation.
If "Y" is specified, the ASF data field "Number of records loaded" is activated and can be displayed in the Evaluations.
Critical Trend Reports will not display any ASF fields whose computed accuracy lies below the given figure. The default value is 0.
(This field is reserved for future use)
Specify "Y" if you want the ASF Main Menu to be displayed when ASF Menu System is started or "N" if you want the Workplan to be selected automatically instead.
18:32:23 *** A D A B A S Statistics Facility *** 2008-01-25 USERID - ASF Utilities and Services Menu - MUM00001 +----------< Define e-Mail Profile for user STANDARD >--------- + ! ! ! Critical reports are written in SMTP format to Workfile 1 ! ! (if output medium 'PC-File' is marked with 'E'). ! ! ! ! Sending Domain Name: ! ! From : ! ! To(1): ! ! To(2): ! ! To(3): ! ! Only if the critical report contains fields: ! ! Standard text in the mail: ! ! ! ! ! ! ! En ! ! +---------------------------------------------------------------+ Direct command ==> ______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help More Term User eMail CONNE Menu |
Figure 4-13: Menu for Define e-Mail Profile
The e-Mail Profile is reached by pressing PF7 in the General User Profile or in the Con-nect Profile.
When you run a Critical Report with the input field "PC-File" marked with an "E", ASF writes the output in SMTP format into the Workfile 1. Beside the report itself, the receiver(s) and sender address and a standard text as specified in the e-Mail Profile are supplied. The e-mail addresses are used by SMTP to mail the report. For more details, see the section Sending a Critical Report as e-Mail.
This specifies the domain name of the SMTP server. It must be the same as given in the "DEST" field in the SMTP job. Ask your system administrator for the SMTP domain name used in your environment.
This e-mail address is used in the mail as sender address. Error messages from the e-mail system (delivery failed etc.), are returned to this address as well.
You can specify up to three receiver addresses. How to specify the "@" (at) sign, depends on your local codepage. Ask your system administrator for the character corresponding to the at-sign in your environment.
If you mark this field, the output of a Critical Report is sent as e-mail only if at least one critical field is reported in the Critical Report.
When a Critical Report is sent as e-mail, the text specified for this field is sent as an accompanying note.
18:32:23 *** A D A B A S Statistics Facility *** 2008-01-25 USERID - ASF Utilities and Services Menu - MUM00001 +----------< Define CONNECT Profile for user STANDARD >------- + ! ! ! Critical reports are to be sent as memos to the following ! ! CONNECT cabinets (if output medium 'Printer' is marked) ! ! ! ! Cabinets........: ________ ________ ________ ! ! Only if the critical report contains fields: _ ! ! ! ! Standard text in the memos: ! ! ! ! _____________________________________________________________ ! ! _____________________________________________________________ ! ! _____________________________________________________________ ! ! _____________________________________________________________ ! ! ! En +---------------------------------------------------------------+ +---------------------------------------------------------------+ Direct command ==> ______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help More Term User eMail CONNE Menu |
Figure 4-14: Menu for Define Con-nect Profile
The Con-nect Profile is reached by pressing PF8 in the General User Profile or in the e-Mail Profile.
When you run a Critical Report with the input field "printer" marked (see the section Sending a Critical Report to Con-nect Cabinets) ASF sends the output as a memo into the Con-nect cabinets which you specify here in addition to printing the output on the specified output device. A copy of the memo can be found in the out-basket of the cabinet "SYSASF".
You can specify up to three Con-nect cabinets. If a cabinet does not exist, the memo is still sent to the other cabinets.
Note:
When the Critical Report is sent to a Con-nect cabinet, it is
created firstly as a temporary document in SYSASF and sent from there as a memo
to the Con-nect cabinet. The temporary document in SYSASF is subsequently
deleted.
If you mark this field, the output of a Critical Report is sent to the named Con-nect cabinets only if at least one critical field is reported in the Critical Report.
When a Critical Report is sent as a memo to a Con-nect cabinet, the text specified for this field is sent as an accompanying note with the memo.
The User Exit maintenance is described in the section User Exit Maintenance Menu.
18:27:12 *** A D A B A S Statistics Facility *** 2008-01-24 USERID - API test interface - MAT00001 Enter code : __ (00=INIT,01=TDF,02=DFT) Store type : __ Store profile name/id : ________________ _____ Time interval : __________ , 00:00 to __________ , 23:59 DB/File : _____ _____ Origin : ___ Date format code : _ Display format (optional) : Dec.sign: _ Th.sign: _ Kilotrans: _ Megatrans: _ No. of records : _12 Field names/units : ________________ __ ________________ __ ________________ __ ________________ __ Direct command ==> _______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help More Term Menu |
Figure 4-15: Menu for testing the API
This menu allows you to try out some features of the Application Program Interface (API). It is in no way intended to demonstrate the full capability of the API.
The selection criteria that you enter are passed internally to a test program which calls the API subroutine ASFGET01 to retrieve records from the ASF database.
The test program displays a key consisting of fields returned by ASFGET01 for each retrieved record, namely: the database ID, the file ID, the creation date and time of the record, the Store Profile ID and the Store Type.
If more records are retrieved than can be displayed on one screen, you can use the ENTER key to page forwards to the end of the list. Each time you press ENTER, a new call of ASFGET01 is issued.
Refer to the section Application Programming Interface for details of writing applications using the API.
This menu is reached by selecting the service code "I" in the ASF Utilities Menu.
The valid values for this field are 00, 01 and 02. If you are using the API Test Interface for the first time for a given set of selection criteria, you must specify the value 00 for this field. This causes the test program to perform the ASFGET01 initialization which is always required when using new selection criteria.
If you specify the value 01 for this field, the key which is displayed for each retrieved record is shown in the format: time, database ID and file ID.
If you specify the value 02 for this field, the key which is displayed for each retrieved record is shown in the format: database ID, file ID and time.
The Store Type used by the Store Program while the data was being collected. Type "*" to get an active help list.
The name and/or the ID of the Store Profile which was used by the Store Program while the data was being collected. You must supply at least one of these fields. If you supply both of these fields, the Store Profile name is ignored. Type "*" to get an active help list.
The starting date/time and the end date/time of the time frame to be used.
You can specify the date in either absolute or relative format. For further details, refer to the section Absolute and Relative Date Format in the Menu System.
The database ID and file ID of the records to be retrieved.
The origin of the records to be retrieved.
The choices are: NU (nucleus data only), TR (trend data only) and ALL (both nucleus and trend data). Type "*" to get an active help list.
The format to be used for the display of dates. Specify "1" for the format YYYY-MM-DD or "2" for the format DD.MM.YYYY.
The decimal separating character to be used in numerical output. Valid values are the period (".") and the comma (","). The decimal separating character must be different from the thousands separating character.
The thousands separating character to be used in numerical output. Valid values are the period (".") and the comma (","). The thousands separating character must be different from the decimal separating character.
If you mark this field, numerical values greater than 1000 are displayed in the K notation.
If you mark this field, numerical values greater than 1000K are displayed in the M notation.
The maximum number of records to be retrieved per call of ASFGET01 by the test program. Because of the limitations of the test program, this value cannot exceed 12.
The names of the ASF data fields and their units of measurement. The test program allows you to specify a maximum of 4 ASF data fields.
Type "*" to get an active help list.
This feature displays the output of the sample program PEXAMPL1. The following output is displayed:
*** A D A B A S STATISTICS FACILITY *** Space used for selected databases (Application Program Interface - Example 1) Date: 1993-03-15 DB DB-Name Asso (blocks) DB Data (blocks) Sum (blocks) ---------------------------------------------------------------------------- 16 DB016-ALSBA 7.384 34.523 41.907 17 DB017-ANWEN 96.653 367.584 464.237 19 A-BEHOERDE 197.888 265.792 463.680 26 SPL-MIRROR 63.189 195.942 259.131 27 DB027-ALSBA 48.552 146.454 195.006 36 DB036-ALSBA 93.039 197.004 290.043 37 ENTIRE-ALSB 203.762 238.106 441.868 ---------------------------------------------------------------------------- Total: 2.155.872 |
Figure 4-16: Output of Sample Program PEXAMPL1
The source code of the PEXAMPL1 program can be found on the SYSASF library.
The source code of PEXAMPL1 is as follows:
*************** ADABAS Statistics Facility (ASF) ********************** * Program ....: PEXAMPL1 * Description : DEMONSTRATION OF THE API (ASFGET01): * SPACE USED FOR SELECTED DATABASES *********************************************************************** * (C) COPYRIGHT 2007 by SOFTWARE AG, Darmstadt (Germany) *********************************************************************** DEFINE DATA LOCAL 1 #P-FKTCODE (A2) 1 #P-INPUT-PARAMETER 2 #P-SELECTION-CRITERIA (A67) 2 REDEFINE #P-SELECTION-CRITERIA 3 #P-FROM-DATE (A10) 3 #P-FROM-TIME (A5) 3 #P-TO-DATE (A10) 3 #P-TO-TIME (A5) 3 #P-DAT-FORMAT-CODE (A1) 3 #P-STORE-PROFILE (A16) 3 #P-STORE-PROFILE-ID (A5) 3 #P-STORE-TYPE (A2) 3 #P-ORIGIN (A3) 3 #P-DB (A5) 3 #P-FILE (A5) 2 #P-FORMAT (A4) 2 REDEFINE #P-FORMAT 3 #P-DECIMAL-SIGN (A1) 3 #P-THOUSAND-SIGN (A1) 3 #P-KILO-TRANSFORMATION (A1) 3 #P-MEGA-TRANSFORMATION (A1) 2 #P-NR-RECORDS (N3) 2 #P-FIELD-NAMES (A16/1:150) 2 #P-UNITS (A2/1:150) 2 #P-RESERVE (A30) 1 #P-OUTPUT-PARAMETER 2 #P-FIELD-DATA (A18/1:150) 2 #P-ADDITIONS1 (A250) 2 #P-ADDITIONS2 (A250) 1 #P-RETURN 2 #P-RETURNCODE (N2) 2 #P-ASF-MSG-NR (N4) 2 #P-ASF-MSG (A60) 2 #P-WRONG-VALUE (A32) 2 #P-PARAM-NO (N3) 1 #P-WORK (A114) 1 #P-TRACE (A5) * 1 #M-ASSO (N7/1:7) 1 #M-DATA (N7/1:7) 1 #M-DATE (A10) 1 #M-DB (A5/1:7) INIT <'16','17','19','26','27','36','37'> 1 #M-DBNAME (A16/1:7) 1 #M-SUM (N7/1:7) 1 #M-TOTAL-SUM (N7) 1 #M-TEXT (A75) * 1 #I-DB (P3) * END-DEFINE * * MOVE 'TRACE' TO #P-TRACE /* trace asfget01 if desired * FOR #I-DB 1 TO 7 * MOVE '00' TO #P-FKTCODE CALLNAT 'ASFGET01' #P-FKTCODE #P-INPUT-PARAMETER #P-OUTPUT-PARAMETER #P-RETURN #P-WORK #P-TRACE * MOVE '02' TO #P-FKTCODE MOVE '1993-03-15' TO #P-FROM-DATE /* SAG201097 MOVE '00:00' TO #P-FROM-TIME MOVE '1993-03-15' TO #P-TO-DATE /* SAG201097 MOVE '1' TO #P-DAT-FORMAT-CODE MOVE 'NEW-TEST-DB-ALL' TO #P-STORE-PROFILE MOVE 'DA' TO #P-STORE-TYPE MOVE 'NU' TO #P-ORIGIN MOVE #M-DB(#I-DB) TO #P-DB MOVE 1 TO #P-NR-RECORDS MOVE 'DB-NAME' TO #P-FIELD-NAMES(1) MOVE 'ASSO USED' TO #P-FIELD-NAMES(2) MOVE 'DATA USED' TO #P-FIELD-NAMES(3) MOVE 'BL' TO #P-UNITS(2) MOVE 'BL' TO #P-UNITS(3) * CALLNAT 'ASFGET01' #P-FKTCODE #P-INPUT-PARAMETER #P-OUTPUT-PARAMETER #P-RETURN #P-WORK #P-TRACE * IF #P-RETURNCODE = 1 IF #P-ASF-MSG <> ' ' COMPRESS 'ASF' #P-ASF-MSG-NR INTO #M-TEXT LEAVING NO COMPRESS #M-TEXT #P-ASF-MSG INTO #M-TEXT ELSE MOVE 'Please change sample program PEXAMPL1 according '- 'to your collected ASF data.' TO #M-TEXT END-IF ESCAPE BOTTOM END-IF * MOVE #P-FIELD-DATA(2) TO #M-DBNAME(#I-DB) COMPUTE #M-ASSO(#I-DB) = VAL(#P-FIELD-DATA(3)) COMPUTE #M-DATA(#I-DB) = VAL(#P-FIELD-DATA(4)) COMPUTE #M-SUM(#I-DB) = VAL(#P-FIELD-DATA(3)) + VAL(#P-FIELD-DATA(4)) ADD #M-SUM(#I-DB) TO #M-TOTAL-SUM * END-FOR * MOVE #P-FROM-DATE TO #M-DATE INPUT USING MAP 'MEXAMPL1' * END
*** A D A B A S STATISTICS FACILITY *** Overview of disk space and IO for a six month period (Application Program Interface - Example 2) Asso/Data(blocks) IOs on A/D/W -------------------------------------------------- 1992 Sep 2.186.840 1.689.672 Oct 2.305.699 1.586.855 Nov 2.414.520 1.928.323 Dec 2.305.854 1.041.419 1993 Jan 2.300.059 1.777.810 Feb 2.177.879 1.388.148 -------------------------------------------------- 13.690.851 9.412.227 |
Figure 4-17: Output of Sample Program PEXAMPL2
The source code of the PEXAMPL2 program can be found in the SYSASF library.
The source code of PEXAMPL2 is as follows:
*************** ADABAS Statistics Facility (ASF) ********************** * Program ....: PEXAMPL2 * Description : DEMONSTRATION OF THE API (ASFGET01): * OVERVIEW OF DISK SPACE AND IO FOR * A SIX MONTH PERIOD *********************************************************************** * (C) COPYRIGHT 2007 by SOFTWARE AG, Darmstadt (Germany) *********************************************************************** DEFINE DATA LOCAL 1 #P-FKTCODE (A2) 1 #P-INPUT-PARAMETER 2 #P-SELECTION-CRITERIA (A67) 2 REDEFINE #P-SELECTION-CRITERIA 3 #P-FROM-DATE (A10) 3 #P-FROM-TIME (A5) 3 #P-TO-DATE (A10) 3 #P-TO-TIME (A5) 3 #P-DAT-FORMAT-CODE (A1) 3 #P-STORE-PROFILE (A16) 3 #P-STORE-PROFILE-ID (A5) 3 #P-STORE-TYPE (A2) 3 #P-ORIGIN (A3) 3 #P-DB (A5) 3 #P-FILE (A5) 2 #P-FORMAT (A4) 2 REDEFINE #P-FORMAT 3 #P-DECIMAL-SIGN (A1) 3 #P-THOUSAND-SIGN (A1) 3 #P-KILO-TRANSFORMATION (A1) 3 #P-MEGA-TRANSFORMATION (A1) 2 #P-NR-RECORDS (N3) 2 #P-FIELD-NAMES (A16/1:150) 2 #P-UNITS (A2/1:150) 2 #P-RESERVE (A30) 1 #P-OUTPUT-PARAMETER 2 #P-FIELD-DATA (A18/1:150) 2 #P-ADDITIONS1 (A250) 2 #P-ADDITIONS2 (A250) 1 #P-RETURN 2 #P-RETURNCODE (N2) 2 #P-ASF-MSG-NR (N4) 2 #P-ASF-MSG (A60) 2 #P-WRONG-VALUE (A32) 2 #P-PARAM-NO (N3) 1 #P-WORK (A114) * 1 #M-IO (N8/1:6) 1 #M-SPACE (N8/1:6) 1 #M-SUM-IO (N8) 1 #M-SUM-SPACE (N8) 1 #M-YEAR (A4/1:6) INIT <'1992',' ',' ',' ','1993',' '> 1 #M-MONTH (A3/1:6) INIT <'Sep','Oct','Nov','Dec','Jan','Feb'> 1 #M-TEXT (A75) * 1 #I-MONTH (P3) 1 #I-DB (P3) * 1 #W-DBS (A5/1:7) INIT <'16','17','19','26','27','36','37'> 1 #W-MONTHS (A2/1:6) INIT <'09','10','11','12','01','02'> 1 #W-YEAR (A4/1:6) INIT <'1992','1992','1992','1992','1993','1993'> * END-DEFINE * * F. FOR #I-MONTH 1 TO 6 * FOR #I-DB 1 TO 7 * MOVE '00' TO #P-FKTCODE CALLNAT 'ASFGET01' #P-FKTCODE #P-INPUT-PARAMETER #P-OUTPUT-PARAMETER #P-RETURN #P-WORK * MOVE '02' TO #P-FKTCODE COMPRESS #W-YEAR(#I-MONTH) '-' #W-MONTHS(#I-MONTH) '-01' INTO #P-FROM-DATE LEAVING NO MOVE '1' TO #P-DAT-FORMAT-CODE MOVE 'NEW-TEST-DB-ALL' TO #P-STORE-PROFILE MOVE '#M' TO #P-STORE-TYPE MOVE 'NU' TO #P-ORIGIN MOVE #W-DBS(#I-DB) TO #P-DB MOVE 1 TO #P-NR-RECORDS MOVE 'ASSO USED' TO #P-FIELD-NAMES(1) MOVE 'DATA USED' TO #P-FIELD-NAMES(2) MOVE 'READ ASSO' TO #P-FIELD-NAMES(3) MOVE 'READ DATA' TO #P-FIELD-NAMES(4) MOVE 'READ WORK' TO #P-FIELD-NAMES(5) MOVE 'WRITE ASSO' TO #P-FIELD-NAMES(6) MOVE 'WRITE DATA' TO #P-FIELD-NAMES(7) MOVE 'WRITE WORK' TO #P-FIELD-NAMES(8) MOVE 'BL' TO #P-UNITS(1) MOVE 'BL' TO #P-UNITS(2) * CALLNAT 'ASFGET01' #P-FKTCODE #P-INPUT-PARAMETER #P-OUTPUT-PARAMETER #P-RETURN #P-WORK * IF #P-RETURNCODE = 1 IF #P-ASF-MSG <> ' ' COMPRESS 'ASF' #P-ASF-MSG-NR INTO #M-TEXT LEAVING NO COMPRESS #M-TEXT #P-ASF-MSG INTO #M-TEXT ELSE MOVE 'Please change sample program PEXAMPL1 according '- 'to your collected ASF data.' TO #M-TEXT END-IF ESCAPE BOTTOM (F.) END-IF * COMPUTE #M-SPACE(#I-MONTH) = #M-SPACE(#I-MONTH) + VAL(#P-FIELD-DATA(2)) + VAL(#P-FIELD-DATA(3)) * COMPUTE #M-IO(#I-MONTH) = #M-IO(#I-MONTH) + VAL(#P-FIELD-DATA(4)) + VAL(#P-FIELD-DATA(5)) + VAL(#P-FIELD-DATA(6)) + VAL(#P-FIELD-DATA(7)) + VAL(#P-FIELD-DATA(8)) + VAL(#P-FIELD-DATA(9)) * END-FOR * ADD #M-SPACE(#I-MONTH) TO #M-SUM-SPACE ADD #M-IO(#I-MONTH) TO #M-SUM-IO * END-FOR * INPUT USING MAP 'MEXAMPL2' * END
The Natural Data Collection Utility SYSRDC supplies monitoring and accounting data for certain events within Natural. The SYSRDC utility is described in detail in the Natural Utilities Manual for Mainframes. Please refer to this manual for any question regarding the installation or activation of SYSRDC, or the meaning of the various event types and data fields collected by SYSRDC.
The SYSRDC trace buffer records the data in wrap-around mode. You will therefore find only the last events in the buffer. The number of events which fit in the buffer depends on the setting of the corresponding Natural parameter.
For the monitoring of ASF, there are some services available. The corresponding programs which are used as interface to SYSRDC are on the delivered SYSASF library.
When the SYSRDC buffer is allocated, the data collection is performed automatically at the start of Natural by default. ASF writes user records into the SYSRDC buffer when it starts, when a Natural error occurs and for each direct command entered. In case of a failure of ASF, you can provide Software AG support with information collected by SYSRDC, e.g., you can download the requested data and send it to your Software AG technical support representative.
Although the ASF SYSRDC Interface is primarily intended for debugging ASF failures, you may use it for other Natural applications as well.
18:35:26 ***** NATURAL SYSRDC UTILITY ***** 2008-01-25 User USERID - Main Menu - XRDCMAIM Trace started Code Function R Restart trace S Stop trace I Show record information L List trace records E Select trace events D Download trace records P Print trace records ? Help . Exit Code ......... _ From record .. 1_____ to record .. 999999 Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit Start Stop Flip Info List EvSel Down Print Canc |
Figure 4-18: The SYSRDC Main Menu
This screen is used to maintain the Natural SYSRDC utility. The current status of SYSRDC is displayed. SYSRDC can be started, stopped and the SYSRDC event types can be set. The SYSRDC buffer data can be listed on the screen, printed or downloaded to the PC.
This screen is reached
by selecting the service code "R" in the ASF Utilities and Services menu;
by typing the command "RDC" in the direct command line of any screen;
by starting the Natural program "RDC" in the SYSASF library.
Enter the code of the service you wish to activate. The codes available and their meaning are listed below.
Each record in the SYSRDC buffer has a sequence number, starting with "1" for the oldest record. The event selection does not affect the line numbers. You specify here the range of SYSRDC records to be downloaded or printed. If you list the SYSRDC records, the list will start with the "from record". Nevertheless you can view all records by paging up or down. When the SYSRDC debugging is stopped, the "to record" field contains the number of the last record in the buffer by default.
The SYSRDC Interface uses its own set of direct commands. Move the cursor into the "Command" field and press PF1, to receive the list of direct command supplied and their meaning.
Select this service to (re-)start the SYSRDC data collecting. Before the SYSRDC data collecting is started, the SYSRDC buffer is cleared automatically. You have to confirm this action in a pop-up window, so that you do not accidently clear the buffer. If only specific SYSRDC event types should be collected, select these types with the service "E" before restarting the trace.
Select this service to stop the SYSRDC data collecting. You have to confirm this action in a pop-up window, so that you do not accidently stop the data collecting.
This service displays detailed information on the record specified in the "From record" field. Before the record is displayed, the SYSRDC trace recording is stopped automatically. You have to confirm this action in a pop-up window, so that you do not accidently stop the recording.
Select this service to list the content of the SYSRDC buffer. Beside the General Information and the Time Information, there is one tab for the information concerning each event type. Before the SYSRDC buffer is listed, the SYSRDC trace recording is stopped automatically. You have to confirm this action in a pop-up window, so that you do not accidently stop the recording.
Select this service to select the SYSRDC events to be traced or listed.
Download the SYSRDC buffer to the PC. You have to confirm this action in a pop-up window, so that you do not accidently download data.
Print the SYSRDC buffer. You have to confirm this action in a pop-up window, so that you do not accidently print data. Additionally you must specify the printer environment. This is because the SYSRDC interface has no access to the SYSASF settings.
ASF provides an internal trace facility which offers up to 16 different types of debugging (not all are used so far). Various direct commands are available to perform trace functions like start a specific trace type or stop the tracing. These direct commands are described later in detail. The same trace functions can be performed from the ASF Trace Maintenance menu.
When the ASF internal trace is activated, it writes additional information on the screen. This information helps Software AG support to analyze failures of ASF.
18:34:53 *** A D A B A S Statistics Facility *** 2008-01-25 USERID - Trace Maintenance - MTRACE01 Mk Nr Description Mk Nr Description --- -- ------------------------------ --- -- ------------------------------ _ 1 Program trace _ 9 N/A _ 2 General trace information _ 10 N/A _ 3 Overflow and error situations _ 11 N/A _ 4 Formatted trace information _ 12 N/A _ 5 Special Debugging _ 13 N/A _ 6 Full store trace _ 14 N/A _ 7 User exit trace _ 15 N/A _ 8 N/A _ 16 N/A Program to be traced : ALL Program counter......: 0000000 Direct command ==> _______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help More Term Off On Selct Menu |
Figure 4-19: Menu for the ASF Trace Maintenance
This screen is used to maintain the ASF internal trace facility. Selected trace types can be started or stopped, the ASF program to be traced can be specified and the trace counter can be set.
This screen is reached
by selecting the service code "M" in the ASF Utilities and Services menu;
by typing the command "TRACE" in the direct command line of any screen;
by starting the Natural program "RDC" in the SYSASF library.
The ASF Trace Maintenance menu outlines the possible trace types of the ASF internal trace facility. You can activate a selected trace type by marking it with an "X". You can switch on all trace types by pressing PF5, or switch off all trace types by pressing PF4.
The following traces are available:
Program trace – ASF displays the name of each Natural object that it executes. Additionally the counter, the object type (e.g. “program”), and the level are displayed.
General trace information – ASF displays various information about the currently performed task. For example when reading the ASF Data file for an evaluation, the value searched and the value found are displayed.
Overflow and error situations – In some calculations where an overflow occurs (number too large), the overflow is caught by ASF and the highest possible number (depending on the format) is substituted. When trace level 3 is activated, ASF displays the real value together with the substitute.
Formatted trace information – Some specific trace data is displayed in a formatted output.
Special Debugging – Selected information is displayed only.
Full store trace – The value of most ASF fields is displayed when ASF performs the store function.
User exit trace – You can use this trace type to debug the user exit ASFUEX01. In the program, the parameter #P-TRACE is true when this trace type is set
The other trace levels are currently not used.
When the ASF trace has been activated, the trace information is written to the screen. Page through this information by pressing ENTER until you reach the next ASF screen.
When you have marked the desired trace types, press PF6 for the selection before pressing PF3, otherwise ASF ignores your changes and returns to the calling screen.
The tracing remains active until you deactivate it in the ASF Trace Maintenance, with the direct command "TRACE OFF", or until the end of the Natural session. Other ASF users are not affected, when you activate or deactivate the trace facility.
The tracing can be restricted to a specific ASF program by specifying the program name in this field. If you specify "ALL", all ASF programs will be traced, which is the default.
If any ASF trace level is activated, the ASF internal trace counter is increased as soon as an ASF program is started. This counter is displayed with the Program Trace (type 1). You can set the counter to any value by overwriting this field.
There are several Direct Commands available for tracing ASF. Additionally there are some programs delivered in the SYSASF library to maintain the ASF trace facility from "outside", i.e. before you start ASF itself.
Direct Command | Program | Purpose |
---|---|---|
TRACE | Display the Trace Maintenance Menu. | |
TRACE ? | Display the current status of the trace mode. | |
TRACE COUNT | Reset the trace program counter. | |
TRACE NAME prog | Restrict the tracing to the program prog. If prog is omitted or set to ALL, all programs will be traced. | |
TRACE OFF | TRACEOFF | Stop the trace mode. All trace types (1 to 16) are deactivated. The trace counter is reset. |
TRACE ON | TRACE-ON | Start the trace mode. All trace types (1 to 16) are activated. |
TRACE PROG | TRACE-P | Start the "Program" trace level. ASF writes the name of each Natural program, subprogram, subroutine etc. that it executes. This is the same as "TRACE 1". |
TRACE n | TRACE-N | Start the trace type n, where n is the trace type number from 1 to 16 as described above. When you start the program TRACE-N, it will ask you which trace type (mode) should be started. |
TRACE OFF | Stop the trace. All trace types (1 to 16) are deactivated. The trace counter reset. |