B97BSTAT: Generation select batch utility

Overview

The generation select utility B97BSTAT enables you to output information on selected generations of lists/reports.

You can also specify queries which will be executed for the list generations selected, in order to determine the number of hit pages and hit lines for this list and output them in a log.

Note on offline indexes

If the program B97BSTAT requires offline indexes to carry out a query, these indexes will be automatically reloaded to the index spool.

If you want to prevent the reloading of offline indexes, specify the parameter OBJ_RETRIEVAL_DEVICES=0 in the EXEC statement.

JCL

Tailored JCL for this batch utility can be found in member B97BSTAT in the BETA97.CNTL

+-----------------------------------------------------------------------+
|jobcard |
|//B97BSTAT EXEC PGM=BST01RFF,REGION=0M,PARM=('S=97', |
|// 'PGM=B97BSTAT', |
|// 'B01LST=xx', |
|// 'B97LST=xx', |
|// 'SIGNON=YES') |
|//* |
|//STEPLIB DD DISP=SHR,DSN=BETA97.LOAD |
|// DD DISP=SHR,DSN=BSA.LOAD |
|//* |
|//B97DEF DD DUMMY |
|//SFFPARM DD DISP=SHR,DSN=BETA.PARMLIB |
|//* |
|//SYSPRINT DD SYSOUT=* |
|//IRMLOG DD SYSOUT=* |
|//IRMPRINT DD SYSOUT=* |
|//* |
|//SFFFDUMP DD SYSOUT=* |
|//SYSABEND DD SYSOUT=* |
|//* |
|//SYSIN DD * |
|parameters |
|/* |
+-----------------------------------------------------------------------+

Return codes

0

The program terminated normally.

4

This return code can occur due to several reasons:

  • No data found for at least one selection
  • A warning was issued

12

Component error

16

Out of memory

20

This return code can occur due to several reasons:

  • DD statement missing (*)
  • Error when opening a log file (*)
  • Error when initializing the database access (*)
  • Database access error (*)
  • Syntax error

24

Communication error

32

BQL abend

36

BQL command error

Note: (*) indicates standard return codes that can be modified.

Syntax DD SYSIN

DD SYSIN contains:

  • One statement block specifying the sort order (SORTORDER), the amount of information to be printed (FULLLISTINFO) in the log and its page length (LINESPERPAGE); these specifications apply to the entire program run.
  • One or more selection blocks that are introduced by the following line:

    SELECT = GENERATION

    This line is followed by the statements that control the selection of lists/reports.

Each statement is coded on a separate line and is structured as follows:

keyword = value

The equal sign ( = ) is optional in all statements. To mark a line as comment line, enter an asterisk ( * ) in the first column of the line. If a value is blank (for example, EXTENSION), enter a blank enclosed in single quotation marks:

EXTENSION = ' '

Keywords for processing

Keyword

Parameter

Description

Option

Mask

Default

Length

SORTORDER

(val,sort,val,sort)

Sort order for output

Optional

No

 

 

 

Replace val with:

TIME
JOBNAME
JOBID
FORM
EXTENSION
REPORT
TITLE

 

Read-in date and time
Jobname
Job ID
Form name
Extension name
Report name
Title

 

 

 

 

 

Replace sort with

A
D

 

Ascending
Descending

 

 

 

 

FULLLISTINFO

 

Controls the amount of information

Optional

No

 

 

LINESPERPAGE

nn

Page length (number of lines) of the log

Optional

No

Value from option S.2

2

DATEMASK

date mask

Date format for date specification

Optional

No

System date mask (S.2)

10

FULLLISTINFO controls the amount of information logged for each list in DD IRMPRINT; if you do not code this keyword, only the most important information from the generation record is logged for each list.

Specify DATEMASK=datemask if your date specifications (SDATE/EDATE) are in a different format from the system date mask (option S.2).

Keywords for selection

A selection block begins with the instruction SELECT GENERATION (required), which is followed by the desired selection criteria. Instead of a date, you can also use the keywords TODAY, YESTERDAY, and MONDAY through SUNDAY.

Keyword

Format/Length

Description

Default

Required

Masks

SELECT

GENERATION

 

 

Yes

No

FORM

8 characters

 

 

Yes

Yes

EXTENSION

16 characters

 

*

No

Yes

FOLDER

32 characters

 

*

No

Yes

TITLE

16 characters

 

*

No

No

FTITLE

0-60

Start column in title

0

No

No

SDATE

The date must be coded in accordance with DATEMASK (default: system date mask from option S.2)

Start date

 

Yes

No

EDATE

See SDATE

End date

TODAY

No

No

STIME

hh:mm:ss

Start time

00:00:00

No

No

ETIME

hh:mm:ss

End time

23:59:59

No

No

JOBNAME

8 characters

Jobname

 

No

Yes

DISPLAY

ALL | LIST | REPORT

Select lists, reports or both

ALL

No

No

ONLINE

YES | NO

Online status

(blank)

No

No

ARCHIVE

YES | NO | PEND

Archive status

(blank)

No

No

DELETE

YES | NO

(Not) marked for deletion

(blank)

No

No

RELOAD

YES | NO

(Not) marked for reloading

(blank)

No

No

VIEWABLE

YES | NO | ALL

(Not) marked as viewable

YES

No

No

NOTES

YES | NO

With/without browser notes

(blank)

No

No

SELIDX

indexname

Index as selection criterion (you can use this keyword up to 5 times)

(blank)

No

Yes

INDEX

(indexname1 = value1,
indexname2 = value2,
...
indexnamen = valuen)

Index query

AND connection if index names and values are in the same INDEX statement; OR-connection if index names and values are in separate statements

 

No

Yes

Example

//SYSIN DD *
FULLLISTINFO
LINESPERPAGE 55
SORTORDER (FORM,A,EXTENSION,A)
SELECT GENERATION
FORM = REJ
EXTENSION = BALDESCOMPTES
SDATE = 04.08.2020
SELIDX = LOCATION
INDEX = (LOCATION = BORDEAUX)
/*

IRMPRINT

DD IRMPRINT contains the following information for each list selected:

  • Read-in date and time
  • Name of creating job
  • Online status
  • Archive status
  • Form and extension
  • Etoken and number of index blocks
  • Number of hit pages and hit lines

+-------------------------------------------------------------------------------------------------------------------------------+
|Date: 11.08.2020 Product: Beta 97 BATCH SELECT UTILITY Page: 1|
|Time: 09:17:31 Version: V7R2 |
| |
| |
|Date Time Jobname Onl Arc ItmP ItmD Form Extension Report Etoken Indexblocks |
|---------- -------- -------- --- --- ---- ---- -------- ---------------- ---------------- ---------------- ----------------- |
|04.08.2020 12:22:05 - REJ§IMP YES NO NO NO REJ BALDESCOMPTES D851C96629CD2611 000000003 |
| |
|Index Selection ( first 80 bytes of INDEX statement(s) ) PageHits ItemHits LineHits |
|---------------------------------------------------------------------------------- -------- -------- -------- |
|INDEX = (LOCATION = BORDEAUX) 17 not av. 17 |
| |
|Date Time Jobname Onl Arc ItmP ItmD Form Extension Report Etoken Indexblocks |
|---------- -------- -------- --- --- ---- ---- -------- ---------------- ---------------- ---------------- ----------------- |
|04.08.2020 12:35:07 - REJ§IMP YES NO NO NO REJ BALDESCOMPTES D851CC4F80D1F011 000000003 |
| |
|Index Selection ( first 80 bytes of INDEX statement(s) ) PageHits ItemHits LineHits |
|---------------------------------------------------------------------------------- -------- -------- -------- |
|INDEX = (LOCATION = BORDEAUX) 17 not av. 17 |
+-------------------------------------------------------------------------------------------------------------------------------+

If the keyword FULLLISTINFO is coded, additional information from the list generation record is printed for each list:

+-------------------------------------------------------------------------------------------------------------------------------+
|Date: 11.08.2020 Product: Beta 97 BATCH SELECT UTILITY Page: 1|
|Time: 09:18:02 Version: V7R2 |
| |
| |
|Date Time Jobname Onl Arc ItmP ItmD Form Extension Report Etoken Indexblocks |
|---------- -------- -------- --- --- ---- ---- -------- ---------------- ---------------- ---------------- ----------------- |
|04.08.2020 12:22:05 - REJ§IMP YES NO NO NO REJ BALDESCOMPTES D851C96629CD2611 000000003 |
| |
| Title |
| --------------------------------------------------------------------------------------- |
| BALANCE DES COMPTES |
| |
| Job-ID Stepname Procstep DD-Name Pages >32k Afp Trc Xerox Ascii Nci |
| -------- -------- -------- -------- ------- ---- --- --- ----- ----- --- -------------- |
| *IMPORT* IMPORT IMPORT SYS00129 65 NO NO NO NO NO NO |
| |
| Mview Mdel Marc Notes Layout Spoolpointer in HEX |
| ----- ---- ---- ----- ---------------- ------------------------------------------------ |
| YES NO 0013FFFF000021B00000000100000041 |
| |
|Index Selection ( first 80 bytes of INDEX statement(s) ) PageHits ItemHits LineHits |
|---------------------------------------------------------------------------------- -------- -------- -------- |
|INDEX = (LOCATION = BORDEAUX) 17 not av. 17 |
| |
|Date Time Jobname Onl Arc ItmP ItmD Form Extension Report Etoken Indexblocks |
|---------- -------- -------- --- --- ---- ---- -------- ---------------- ---------------- ---------------- ----------------- |
|04.08.2020 12:35:07 - REJ§IMP YES NO NO NO REJ BALDESCOMPTES D851CC4F80D1F011 000000003 |
| |
| Title |
| --------------------------------------------------------------------------------------- |
| BALANCE DES COMPTES |
| |
| Job-ID Stepname Procstep DD-Name Pages >32k Afp Trc Xerox Ascii Nci |
| -------- -------- -------- -------- ------- ---- --- --- ----- ----- --- -------------- |
| *IMPORT* IMPORT IMPORT SYS00164 65 NO NO NO NO NO NO |
| |
| Mview Mdel Marc Notes Layout Spoolpointer in HEX |
| ----- ---- ---- ----- ---------------- ------------------------------------------------ |
| YES NO 0013FFFF000022700000000100000041 |
| |
|Index Selection ( first 80 bytes of INDEX statement(s) ) PageHits ItemHits LineHits |
|---------------------------------------------------------------------------------- -------- -------- -------- |
|INDEX = (LOCATION = BORDEAUX) 17 not av. 17 |
+-------------------------------------------------------------------------------------------------------------------------------+

IRMLOG

A processing log is written to DD IRMLOG.

+-------------------------------------------------------------------------------------------------------------------+
|11.08.2020 09:17:31 IRM1561I PROGRAM: B97BSTAT VERSION: V7R2M00 PTFLVL: ptflvl COMPILED: date, time |
|11.08.2020 09:17:31 IRM2200I B97BSTAT BATCH SELECT UTILITY STARTED - DATE: 11.08.2020, TIME: 09:17:31 |
|11.08.2020 09:17:31 IRM2210I Date mask DD.MM.YYYY used from system record |
|11.08.2020 09:17:31 IRM2210I ************************************************************************************* |
|11.08.2020 09:17:31 IRM1901D DATEMASK = YYYY-MM-DD |
|11.08.2020 09:17:31 IRM2010I Date mask YYYY-MM-DD entered via SYSIN used for data processing |
|11.08.2020 09:17:31 IRM1901D SELECT GENERATION |
|11.08.2020 09:17:31 IRM1901D SDATE = 2020-08-04 |
|11.08.2020 09:17:31 IRM1901D EDATE = 2020-08-04 |
|11.08.2020 09:17:31 IRM1901D FORM = REJ |
|11.08.2020 09:17:31 IRM1901D EXTENSION = BALDESCOMPTES |
|11.08.2020 09:17:31 IRM1901D SELIDX = LOCATION |
|11.08.2020 09:17:31 IRM1901D INDEX = (LOCATION = BORDEAUX) |
|11.08.2020 09:17:31 IRM2210I ------------------------------------------------------------------------------------- |
|11.08.2020 09:17:31 IRM2210I SELECTION STARTED |
|11.08.2020 09:17:31 IRM2203I 09:17:31 SORT STARTED |
|11.08.2020 09:17:31 IRM2210I SELECTION ENDED |
|11.08.2020 09:17:31 IRM2204I 09:17:31 PRINT STARTED |
|11.08.2020 09:17:31 IRM2201I 0000000002 LIST(S) SELECTED |
|11.08.2020 09:17:31 IRM2202I 0000000000 REPORT(S) SELECTED |
|11.08.2020 09:17:31 IRM2210I ************************************************************************************* |
|11.08.2020 09:17:31 IRM2299I B97BSTAT BATCH SELECT UTILITY ENDED - DATE: 11.08.2020, TIME: 09:17:31, RC: 0000 |
+-------------------------------------------------------------------------------------------------------------------+