Support & Maintenance


 
 

Maintenance to FileKit, SELCOPY and CBLVCAT, examples and answers to frequently asked questions (FAQs) may be found on this page. Users should refer to these pages prior to contacting CBL directly.

As well as answers to general questions, the FAQ lists may include solutions or work arounds for problems that are not attributable to an error in the repective program, or problems for which a fix has not yet been published.

If you cannot find the answer to your query on these web pages, then please contact the CBL query desk via the following:


CBL provides a 24 x 7 technical support service to all customers via telephone.

During normal office hours (09:00-17:00 GMT/BST), every endeavour is made to supply immediate technical support via the telephone. At all other times, including weekends and Bank Holidays, a recorded telephone message provides relevant telephone number(s) for technical emergencies only.


Maintained Releases


Maintenance support is available for the following releases of CBL software components:


SELCOPY
FileKit
CBLVCAT


Frequently Asked Questions (FAQs)



SELCOPY & CBLVCAT Examples


Listed below are a selection of practical examples of SELCOPY and CBLVCAT Batch syntax. Please select an example from the list.

For futher examples and help on other topics, please see the FAQ section above.



SELCOPY


Simple file copy

The simplest of functions you can perform with SELCOPY are file copies.

The following is a SELCOPY program which does this:


  READ  A
  WRITE B

The above represent the minimum elements required for a SELCOPY program. One selection (READ) must cause input, and one selection (WRITE) must cause output.

In this case, SELCOPY will READ one logical record from file A and then copy it to file B. The READ/WRITE cycle is repeated until all of the records from file A are exhausted (i.e. end of file is reached) at which point, by default, SELCOPY will automatically terminate.

In addition to the control cards shown, a link must be provided between the filenames mentioned to SELCOPY (Files A & B in the above example) and the physical datasets to which they refer. These are:

  • DD statements for MVS users,
  • FILEDEF statements for CMS users, and
  • TLBL, DLBL, EXTENT and ASSGN statements for VSE users.

Alternatively, SELCOPY will dynamically allocate files using a dataset name provided either as a literal or from a position in its work area. e.g.


  READ  A  DSN='SEQUENTIAL.INPUT.FILE'  VOL=SYSWK1
  WRITE B  DSN=44 AT 1001               CAT=UCAT1  VSAM

Select and Change

Almost as simple are SELCOPY's selection and modification capablities. For example:


  RD INFILE                    * Read a record
  IF POS 10 = 'CR'             * Select records with CR in col 10
    THEN PRINT STOPAFT=10      * and print only the first 10
    THEN WRITE CRFILE          * and write all of them to CRFILE
  IF POS ANY   = 'PICK ME'     * Scan whole rec for PICK ME
    THEN POS @ = 'PICKED '     * change it to PICKED
    THEN WRITE PKFILE          * and create a file of picked
    ELSE WRITE NOTPK           * plus file of not picked

Selection criteria can be as simple or as complex as required.

The above example illustrates use of IF/THEN/ELSE logic, but further conditions can be stipulated based on the result of a previous one with the use of THENIF/ELSEIF. Nesting can therefore easily be achieved in a structured and understandable manner.

Use of WORKAREA

For many applications, you will need more space than taken up by your file input record in order to store and manipulate data or counters, build new records etc...

For this purpose SELCOPY enables you to request a number of bytes which can be used as a sort of "scratch pad".


  RD INFILE      WORKLEN 300       * Read a record (say Lrecl=150) into POS 1
  IF POS 10  NE  POS 201  LEN 4    * Test for a change in Cost Centre.
    THEN MOVE  4 FR 10  TO 201     * Store in workarea for comparison.
    THEN PR      FR 201  L 4       * Print list of different Cost Centres.

In this example we read a file of records sorted by Cost Centre code, held in a 4 byte alpha-numeric field at position 10, and print out a list of each different code.

Variable to Fixed

Changing record formats is another example of the ease of coding SELCOPY control statements.

A Master file of customer records is kept on tape. Each record holds 40 bytes of fixed information for the customer in the first part of the record, and variable information at the end. The average record length is 600 bytes.

It is a requirement to produce a file containing only the fixed data, to reduce run times during small 'batch windows'. The abbreviated file is to be blocked to 32000 bytes.


  READ  TAPE    RECFM=V
  WRITE TAPE1   LRECL=40   BLKSIZE=32000   RECFM=F

Note that SELCOPY will automatically strip off the 4 bytes of control information when copying from variable to fixed length records.

Printing

Often, the information contained in files consists of data which is not readily printable - e.g. packed decimal, binary or hexadecimal fields.

SELCOPY will allow you to view parts of or whole records, areas of your work area, or indeed any of SELCOPY's special fields, in order to recognise non-character data. The normal printout produced by the PRINT commands in a SELCOPY program is basically geared to problem solving by programmers. You can however, easily produce reports for non-programming staff.

The SELCOPY reference manual contains several types of print format, three of which (Types MC,B & D), are illustrated below:-

Example: PRINT TYPE=MC (Mixed - predominantly char with hex)


    SELCOPY REL 9.8P AT CBL - Bridgend UK (Internal Only)                        (OS) VM/CMS=VM03      14.05 WED 09 DEC 1998    PAGE   1
  o -----------------------------------------------------                             --------------------------------------    -------- o


  o      1.  rd INDD                                                                                                                     o
         2.  print   type=mc    * Mixed - Char if printable, else Hex

  o                                                                                                                                      o
        INPUT   SEL SEL                                                                                                    1      RECORD
        RECNO   TOT ID.          1         2         3         4         5         6         7         8         9         0      LENGTH
  o     -----   --- --- ....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0      ------ o

            1     1   2 0Fred Bloggs,1Sunshine House,1Sunshine Street,0Sunny Village,0Sunny Valley,1Sunnington-on-Thames             96
  o                     D            0               1                F              E             5                                     o

            2     2   2 0Joe Bloggs,1Thunder Mountain,0Rain Town,0Snowy Creek,0Windy City,0Hail-on-Sea                               78
  o                     C           2                 B          D            C           C                                              o
                        ....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0

  o SUMMARY..                                                                                                                            o
     SEL-ID      SELTOT      FILE     BLKSIZE  LRECL           FSIZE   CI    DSN
     ------      ------      ----     -------  -----           -----   --    ---
  o     1             2 READ INDD         96    96 U               2       SBR.TEST.A1                                                   o
        2             2

  o                                                                                                                                      o
             ** ** ** ** ** ** ** SELCOPY IS LICENSED BY COMPUTE (BRIDGEND) LTD  +44 (1656) 652222 & 656466 ** ** ** ** ** ** **
                                                      ** EXPIRY DATE -- 12 JUN 2001 **



Example: PRINT TYPE=B (Both char and hex)


    SELCOPY REL 9.8P AT CBL - Bridgend UK (Internal Only)                        (OS) VM/CMS=VM03      14.05 WED 09 DEC 1998    PAGE   1
  o -----------------------------------------------------                             --------------------------------------    -------- o


  o      1.  rd INDD                                                                                                                     o
         2.  print   type=b     * Both Char & Hex, Line 1-Char, 2-Zone, 3-Numeric.

  o                                                                                                                                      o
        INPUT   SEL SEL                                                                                                    1      RECORD
        RECNO   TOT ID.          1         2         3         4         5         6         7         8         9         0      LENGTH
  o     -----   --- --- ....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0      ------ o

            1     1   2  Fred Bloggs, Sunshine House, Sunshine Street, Sunny Village, Sunny Valley, Sunnington-on-Thames             96
  o                     0C9884C9988A61EA9A88984C9AA861EA9A88984EA988A60EA99A4E89988860EA99A4E8998A61EA99898A996996E8898A                 o
                        D69540236772B024528955086425B1245289550239553BF2455805933175BE245580513358B524559573650650381452

  o         2     2   2  Joe Bloggs, Thunder Mountain, Rain Town, Snowy Creek, Windy City, Hail-on-Sea                               78  o
                        0D984C9988A61E8A98894D9A9A88960D8894E9A960E99AA4C988960E898A4C8AA60C8896996E88
                        C1650236772B23845459046453195BB919503665BD25668039552BC6954803938BC81930650251
  o                     ....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0             o

    SUMMARY..
  o  SEL-ID      SELTOT      FILE     BLKSIZE  LRECL           FSIZE   CI    DSN                                                         o
     ------      ------      ----     -------  -----           -----   --    ---
        1             2 READ INDD         96    96 U               2       SBR.TEST.A1
  o     2             2                                                                                                                  o


  o          ** ** ** ** ** ** ** SELCOPY IS LICENSED BY COMPUTE (BRIDGEND) LTD  +44 (1656) 652222 & 656466 ** ** ** ** ** ** **         o
                                                      ** EXPIRY DATE -- 12 JUN 2001 **



Example: PRINT TYPE=D (Dump format)


    SELCOPY REL 9.8P AT CBL - Bridgend UK (Internal Only)                        (OS) VM/CMS=VM03      14.05 WED 09 DEC 1998    PAGE   1
  o -----------------------------------------------------                             --------------------------------------    -------- o


  o      1.  rd INDD                                                                                                                     o
         2.  print   type=d

  o                                                                                                                                      o
        INPUT   SEL SEL
        RECNO   TOT ID.
  o     -----   --- ---                                                                                                                  o
            1     1   2            96
      0000  0DC69985 8440C293 968787A2 6B10E2A4   95A28889 958540C8 96A4A285 6B11E2A4     *.Fred Bloggs,.Sunshine House,.Su*
  o   0020  95A28889 958540E2 A3998585 A36B0FE2   A49595A8 40E58993 93818785 6B0EE2A4     *nshine Street,.Sunny Village,.Su*             o
      0040  9595A840 E5819393 85A86B15 E2A49595   899587A3 96956096 9560E388 819485A2     *nny Valley,.Sunnington-on-Thames*
            2     2   2            78
  o   0000  0CD19685 40C29396 8787A26B 12E388A4   95848599 40D496A4 95A38189 956B0BD9     *.Joe Bloggs,.Thunder Mountain,.R*             o
      0020  81899540 E396A695 6B0DE295 96A6A840   C3998585 926B0CE6 899584A8 40C389A3     *ain Town,.Snowy Creek,.Windy Cit*
      0040  A86B0CC8 81899360 969560E2 8581                                               *y,.Hail-on-Sea                  *
  o                                                                                                                                      o
    SUMMARY..
     SEL-ID      SELTOT      FILE     BLKSIZE  LRECL           FSIZE   CI    DSN
  o  ------      ------      ----     -------  -----           -----   --    ---                                                         o
        1             2 READ INDD         96    96 U               2       SBR.TEST.A1
        2             2
  o                                                                                                                                      o

             ** ** ** ** ** ** ** SELCOPY IS LICENSED BY COMPUTE (BRIDGEND) LTD  +44 (1656) 652222 & 656466 ** ** ** ** ** ** **
  o                                                   ** EXPIRY DATE -- 12 JUN 2001 **                                                   o

Use of GOTO

Where logic is required to bypass or repeat operations, the GOTO statement can be used.

The following example processes a tape file with a logical record length of 38, and block size of 3160. The file consists of two different types of records:

  • A header record, is always numeric in position 1 and 2.
  • A transaction record, always has 'Z' in position 1.

The file is in ascending sequence of header records, but many header records may have the same number in positions 1 and 2.

It is required to select only the header records containing '81' in position 1 and 2, together with their associated 'Z' records, writing them to tape with an output blksize of 380.

At the same time we require a print of all the '81' Header records that were selected.


  READ TAPE10   LRECL=38             * LRECL reqd for VSE only.
  IF POS 1 NE '81'
    THEN GOTO GET                    * Implicit label for 1st logical stmt.

  ==LOOP==                           ** Only '81' records drop through to here **
    WRITE TAPE11    BLKSIZE=380
    IF POS 1 NE 'Z'
      THEN PRINT    STOPAFT=222      * Limit printing
    READ TAPE10                      * No need to repeat LRECL.
    IF POS 1 GT '81'                 * 'Z' is < '8'
      THEN GOTO EOJ
    GOTO LOOP                        * Prevent automatic GOTO GET.
   =LOOPE=                           * Unref'd label. '=' for readability only

The THEN GOTO GET statement will cause looping around the first READ statement until we find a record with 81 in position 1. On finding it, control will drop through to LOOP, our main loop.

Because (for EBCDIC) "Z" is lower than numerics, checking position 1 for greater than "81" will never be satisfied by a transaction record. So we keep looping around until either we get End-of-file, or we find a record with 82 or more in position 1 and 2.

Compress / Expand

Storing data on disk is extremely inefficient when the data consists of many embedded blanks and other duplicated characters. To avoid this inefficiency, the COMPRESS/EXPAND facility has been introduced, allowing compression before writing, and expansion back to the full record size after reading a compressed record.


  READ BIGFILE    NORDW   WORKLEN=2222                * Ignore the 4-byte RDW.
  COMPRESS FR 1  TO 1001                              * Compress LRECL bytes.
  WR TAPEFIL     FR 1001  RECFM=VB   B=32000 L=4096   * Write Back-up.

Input file concatenation

The CAT statement:

Concatenation of input files is beneficial to MVS, VSE and CMS users, as any type of file may be concatenated. e.g. a sequential disk file, a VSAM file, a Card reader file, a Library Directory file, and even a VTOC file. No restrictions on record format, record length or blocksize.


CAT Example:


  READ SEQDISK
    CAT DBAAAA00  DL1 SEG=DBAAAA01    * A DL1 data base.
    CAT CARD
    CAT LIB2DD  DIR                   * A PDS directory.
    CAT TAPE10                        * A magnetic tape.
    CAT ABCFILE KSDS
  WRITE BIGFIL                        * Your reqd RECFM etc.



CAT Example for VSE:

An example for VSE users is to read a standard MVS labelled tape containing 2 logical data sets, processing everything (all 6 physical data sets) as data by reading the tape as unlabelled using NL, No Label. An MVS data set on tape consists of 3 sections, each one terminated by a Tape Mark which denotes physical EOF (End-of-File) for a VSE unlabelled tape.

  • The 1st section contains two 80-byte Header records for the data set, and on the 1st data set on the tape volume this section will also contain one 80-byte Volume label preceding the HDR records.
  • The 2nd section contains the data records for the data set which may be of any length up to 32760 bytes.
  • The 3rd section contains two 80-byte Trailer records for the data set.

Thus the 2 data sets constitute 6 unlabelled VSE files, which we will read as one file using the CAT statement. Note that TLBL cards are not required for unlabelled tapes.


  // ASSGN SYS010,X'280'
  // ASSGN SYS011 etc up to SYS015, all to the same drive.
  // EXEC SELCOPY

    READ TAPE10   NL                CLOSE=NORWD  B=80     RECFM U
     CAT TAPE11   NL   OPEN=NORWD   CLOSE=NORWD  B=32760  RECFM U
     CAT TAPE12   NL   OPEN=NORWD   CLOSE=NORWD  B=80     RECFM U
     CAT TAPE13   NL   OPEN=NORWD   CLOSE=NORWD  B=80     RECFM U
     CAT TAPE14   NL   OPEN=NORWD   CLOSE=NORWD  B=32760  RECFM U
     CAT TAPE15   NL   OPEN=NORWD                B=80     RECFM U

    IF LRECL = 80                                          * Check length of current record.
      THEN IF P 2 = 'VOL'  !OR P 2 = 'HDR' !OR P 2 = 'TRL'
        THEN PRINT   TYPE M                                * Statistics info.
        THEN GG                                            * GOTO GET if reqd.
    WRITE BIGFIL  RECFM U  LRECL 32760                     * Make a Disk copy.
  /*



CAT Example for MVS:

An example for MVS users is to concatenate several associated files of different types. e.g. A RECFM=FB unlabelled tape file, a RECFM=VB file and a VSAM ESDS on different disk types. This mixture of files cannot be concatenated using JCL.

Assuming DD statements for TAPE1, DISK1, DISK2, SYSPRINT and SYSIN:


  READ TAPE1   RECFM=FB   L=46   INTO 11   WORKLEN 222
   CAT DISK1                             * Recfm, Blksize & Lrecl known to system.
   CAT DISK2   ESDS                      * Must identify as VSAM ESDS
  IF IN 1 !THEN MOVE 8 FR FNAME   TO 1   * Current filename.

  IF POS 11 = 'CUST'                     * Test pos 1 of inp rec.
    THEN LRECL = L+10                    * Allow for filename
    THEN PRINT                           * Print Customers only.

Directory and Data

CMS and VSE users may access directory and data records for generic groups of files and MVS users may access all members of single or concatenated PDSs, using the DIRDATA input facility.

CMS and MVS users may also Update-in-place, but for VSE an update file must be written out and used subsequently as input to a LIBR step.

For Data records SELCOPY's INCOUNT value is reset to 1 on reading the first data record from each library member or CMS file. For Directory records the INCOUNT value is simply increased by 1 to reflect the count of library members or CMS files. Directory and Data records are distinguishable using the IF DIR/IF DATA syntax.



MVS Summary of PDS Members:

A PDS contains a large number of CLISTs and REXX procedures which conventionally contain within the 1st 10 records a timestamp, level number and a short description of their purpose and call parameters. We will create a compendium of the descriptive text, spacing 2 lines between each member.


  NOPRINT                         * Suppress print of ctl cards etc.
  READ INPDS    DIRDATA           * Read all PDS members.

  IF DIR                          * If it's a Dir record.
    THEN SPACE 2                  * Print 2 blank lines.
    THEN PR   TYPE=M              * Use Mixed print for binary recstats.
    THEN GOTO GET                 * Means go to 1st logical statement.

  IF INCOUNT <= 10                * Select 1st 10 DATA recs
    THEN PRINT                    * Use default TYPE=N
    ELSE FLAG EOMEMB              * Force to read next member.



CMS Generic Update:

An EXEC procedure becomes outdated and is replaced by another with a different name. All other EXEC's which call this need therefore to be updated to call the new name.


  READ '* EXEC *'    DIRDATA      * Read all EXEC files.

  IF DIR                          * If it's a Dir record.
  AND POS 77 NE 'R/W'             * Can't update if disk is read-only.
    THEN FLAG EODISK              * Indicate End of Disk
    THEN GOTO GET                 * Bypass rest of disk.

  IF POS ANY    = 'EXEC ABC'      * Name of old EXEC.
    THEN POS @  = 'EXEC XYZ'      * Change name
    THEN UPDATE '* EXEC *'        * and update the file.

The above could easily be improved so that it prints the name of each file modified, and the names of the read-only files left unchanged.



VSE Library Generic Backup

This example will backup all payroll associated PROCEDURE and PHASE members from a VSE Library to a single tape file.


  READ LIB1.SUB.PAY.*  DIRDATA    * Read all payroll files.

  IF DIR                          * If it's a Dir record.
   THENIF POS ANY = 'PHASE'       * Further selection.
   OR     POS ANY = 'PROC'
       THEN DUMMY                 * Do nothing.
       ELSE FLAG EOMEMB           * Indicate End of Member.
       THEN GOTO GET              * Will bypass data rec's.

  WR TAPEFIL    RECFM=VB LRECL=4096 BLKSIZE=32000  * Copy to tape.

Back-up VSAM

Problem:

Back-up 6 small VSAM files to a single tape volume without the usual multi-file volume difficulties and dangers.



Solution:

Use SELCOPY to prefix a one-byte file identifier to each record and write all files to the same tape file, one after the other. Write RECFM=V output, blocked to device capacity, 32760. The overhead of 5 bytes for each record (4 for RDW and 1 for File Id) is more than compensated by the large blocksize. Use of NORDW on the restore suppresses the RDW from the input area. Omitting JCL for defining files, the SELCOPY control cards are below.



Notes:

SELCOPY treats lower case as upper case unless in 'quotes', the Exclamation Mark is a Line End Character, and valid abbreviations used are:


  rd read    w worklen   fr from   l lrecl     b  blksize   t  then
  pr print   p pos       ty type   s stopaft   li elseif    ti thenif

VSAM is specified throughout for simplicity, but the same principle works for any file. RECFM, LRECL and BLKSIZE would be needed for VSE, but not for MVS and CMS as the operating system supplies this, as does VSAM.



Back-Up:

  equ LMAX   4000                        * Maximum record length.
  read F1  ksds   into 102   w=LMAX+110  * GS009 DOC *
   cat F2  esds                          * INTO effective on all CAT's.
   cat F3  ksds                          * 2nd char of filename used as identifier.
   cat F4  esds
   cat F5  rrds
   cat F6  vsam                          * More CAT statements can be added.

  move 1 fr fname+1 to 101               * Set File Identifier (2nd char of filename).
  lrecl = L+1                            * Add 1 to record length of current record.
  wr TAPE10  recfm=v  b=32760  fr=101
  do PRINTIT                             * Print sample of data backed up.
  goto get                               * GET is implicit label - 1st ctl stmt.


  ==PRINTIT== * Subrtn only coded for additional info on printer *
    if p 6  ne  p 101  len 1             * same File Id No?
      t p 1 = 'File x --- started.'  s 1
      t move 1 fr 101 to 6               * Save File Id No.
      t space 2  !t pr l 30              * Print file id msg.
    if p 101 = '1' !t pr fr 101 ty=b s=3 * Print 1st 3 recs, Both char+hex.
    li p 101 = '2' !t pr fr 101 ty=b s=3 * and the same for F2
    li p 101 = '3' !t pr fr 101 ty=b s=3 * and F3
    li p 101 = '4' !t pr fr 101 ty=b s=3 * etc.
    li p 101 = '5' !t pr fr 101 ty=b s=3
    li p 101 = '6' !t pr fr 101 ty=b s=3
   =ret=                                 * Return to statement following DO PRINTIT.



Restore All Files:

  rd TAPE10   recfm v    nordw    blksize=32760
  lrecl = L-1                            * Reduce record length.
  if p 1 = '1' !t wr F1   ksds   fr 2
  li p 1 = '2' !t wr F2   ksds   fr 2
  li p 1 = '3' !t wr F3   esds   fr 2
  li p 1 = '4' !t wr F4   esds   fr 2
  li p 1 = '5' !t wr F5   rrds   fr 2
  li p 1 = '6' !t wr F6   vsam   fr 2



Restore Just One File:

  rd TAPE10   recfm v    nordw    blksize=32760
  if p 1 lt '3' !t goto get    * GET is implicit label - 1st ctl stmt.
  if p 1 gt '3' !t eoj         * Force eoj when finished with file 3.
  lrecl = L-1
  write F3   esds   fr 2

Match the contents of 2 files

A file of JCL statements, OLDJCL, needs modification to numerous DSN fields, all of which are on the first line of the DD card. The file REPJCL contains just DD cards which are in any sequence, and any match of any DD name in OLDJCL must be substituted with the appropriate record from REPJCL. Other records are to remain unchanged, and the file NEWJCL is to be created.

SELCOPY treats lower case as upper case unless in 'quotes', the Exclamation Mark is a Line End Character, and the following abbreviations are used:


 w worklen     p pos     l lrecl     t then     fr from     wr write



  //SELC5BLD JOB (0414OSVBT00),CLASS=A,
  //               MSGCLASS=X,MSGLEVEL=(1,1)
  //ALTER   EXEC PGM=SELCOPY
  //SYSPRINT  DD SYSOUT=*
  //OLDJCL    DD DSN=SELC5.OS.JCL(P7077),DISP=SHR
  //REPJCL    DD DSN=SELC5.DSN.JCL3,DISP=SHR
  //NEWJCL    DD DSN=SELC5.OS.JCL(P7077A),DISP=SHR
  //SYSIN     DD *

   option         w=80000                  * Large workarea.
   equ ARRAY         4001                  * Store area for REPJCL recs.
   equ ARRAYEND     79900                  * End of array.

   @ = ARRAY                               * Set @ ptr to start of array.


  ==LOOP1==     * Once only * Read whole of Base Data Set into an array.
    read REPJCL   into @                  * Read into array elem.
    if eof REPJCL
      then @END = @                       * Save ptr to end of array.
      then goto LOOP1E                    * Go read 2nd file.

    @ = @+80                              * Add 80 to @ ptr.
    if @ > ARRAYEND                       * If array is full.
      then goto cancel
    goto LOOP1
   =LOOP1E=             * LOOP1 end *


  ==LOOP2==     *(Main Loop)*
    read OLDJCL                           * Read 2nd input file.
    if eof OLDJCL      !t eoj             * Go to successfull End-of-Job.

                   * Match this OLDJCL record against all REPJCL records
                   * using substitute record for output where appropriate.
    if p ARRAY+2,@END  =  8 at 3  step=80 * Scan for DDNAME match.
      then wr NEWJCL   fr @-2             * If same DD, use Substitute.
      else wr NEWJCL   fr 1               * Write out orig record.
    goto LOOP2                            * To read next record.
   =LOOP2E=             * LOOP2 end * (Unreferenced label.)

In the above SELCOPY control cards, use is made of both the standard @ pointer and a user @ pointer which for convenience we have chosen to call @END.

The @ ptr is invaluable in giving a fixed reference point to a previously undefined position in your work area. It can be set either explictly by the assignment @ = 20 for instance, or implicitly by a successful range test. e.g. IF P 20 30 = ABC STEP=1 where STEP indicates the increment over the range for each subsequent compare. (STEP=1 is actually the default and needn't be coded)

Offsets may be obtained by coding @+n or @-n, where n is the offset required.

VM / CMS Update

Problem:

A very large CMS library needs modification to the directory date to force reorganisation.

Record 1 of the file holds the Directory record number as a 2 byte binary field at position 38. In the Directory record, position 107 contains a date in YYMMDD format which must change to set the Day number to zero. The year is 95, so we can verify this before the update.

XEDIT says it's too large.
EXECIO says the lrecl is greater than 256.
COPY says insufficient disk space - and anyway it takes too long.


Solution:

SELCOPY will fix it!

Just key it in:


  l lib1 usrlib b ( alloc
  FILENAME FILETYPE FM FORMAT LRECL       RECS     BLOCKS
  LIB1     USRLIB   B1 F       8192       8200      16400
  R;
  SELC
  READ LIB1.USRLIB.B
  READ LIB1.USRLIB.B   REC 2 AT 38   TY B
  IF P 107 '95'

    THEN P 111 '00'
    THEN UPDATE   LIB1.USRLIB.B
    THEN LOG   FR 101   LEN 50   TYPE B
    THEN STOP
  ELSE GOTO CANCEL
     INPUT OUTPT SEL
     RECNO RECNO ID.            1         2         3         4         5
     ----- ----- ---   ....,....0....,....0....,....0....,....0....,....0
  0      2     1   5         950700  USRLIB      Q       w     48
                       000000FFFFFF00EDCDCC0E0100DE00040EA0B000FF05000022
                       00001095070001474392CF09018E005A3F63710048FF000009
  R;



Or write an EXEC:


  * NEWDAY EXEC * +++ LEVEL 002 +++ 94/04/21 17:07:32 +++
  * Alters library's directory date to force REORG.
  FILEDEF LIB DISK   LIB1 USRLIB B
  &BEGSTACK

    read LIB                         * Read 1st record.
    read LIB   rec 2 at 38 ty b      * Read specific record
    if  p 1 = '--- KEY/REC NOT FOUND ---'
      then log '+++ DIR POINTER INVALID +++'
      then goto cancel
    if  p 107 ones '000000'          * Date will be numeric.
    and p 107  ge '75'  le 2 at date * Check for valid Year.
    and p 109  ge '01'  le '12'      * Check for valid Month.
    and p 111  ge '01'  le '31'      * Check for valid Day.
      then p 111 = '00'              * All OK - Zeroise Day No
      then update lib                * Rewrite record to disk.
      then print type b              * Print whole record, both char and hex.
      then eoj

      else log '+++ EXISTING DATE INVALID +++'
      then goto cancel
  &END
  &STACK
  EXEC SELC
  &EXIT &RETCODE

DB2 Table Columns

SYSIBM.SYSCOLUMNS is the DB2 table which describes every column of every table within a DB2 SubSystem. For our example we'll list from it a few columns of interest for a specified table and use the CHAR option to return all information in displayable character format.


  read F1  tab=SYSIBM.SYSCOLUMNS  char                              \
           fmt='name,TBNAME,TBCREATOR,COLNO,COLTYPE,LENGTH,SCALE'   \
         where="TBNAME='TYPE_TEST'"                                 \
         order='colno'

  print                                     * Print the row.


The code for this SQL operation is quite long, so we have used the SELCOPY statement continuation feature. The continuation character is a backslash (\) as the last character of a control statement.

The following is output from the above control cards with a subroutine added which generates column headings by analysing the SQL Descriptor Area using the SELCOPY positional keyword SQLDA.


    SELCOPY REL 9.80 AT CBL-VMPS31 MVS 5.2.2                                          OS JOB=P390A     13.47 WED 14 MAY 1997    PAGE   1
  o ----------------------------------------                                          --------------------------------------    -------- o


  o          ** CBL.SSC.CTL(DB2SBR2) ***        L=101 +++ 97/05/14 13:47:19 (P390A)                                                      o

                           * Demonstrate Table Column listing.
  o                                                                                                                                      o
               equ hd 1001
               opt  w 2222
  o                                                                                                                                      o
               rd  f1   tab=sysibm.syscolumns  char                              \
                        fmt='name,TBNAME,TBCREATOR,COLNO,COLTYPE,LENGTH,SCALE'   \
  o                   where="TBNAME='TYPE_TEST'"                                 \                                                       o

         1.           order='colno'
  o                                                                                                                                      o
         2.    do heading   stopaft=1

  o      3.    print                                     * Print the row.                                                                o
         4.    goto get

  o                                                                                                                                      o

             ==heading==
  o            -------                                                                                                                   o
         5.    @n    = 2 at sqlda+14  type=b       * Number of cols in use.
         6.    @sqlv = sqlda+16                    * Point to 1st var.
  o      7.    pos uxatptr = 4 at @sqlv+4          * Sets @ -> 1st  col in workarea.                                                     o
         8.    @1stc = @                           * Keep as @1stc.

  o           =loop=                                                                                                                     o
               ----
         9.    pos uxatptr = 4 at @sqlv+4          * Sets @ -> this col in workarea.
  o     10.    pos hd+@-@1stc-1     = '|'                                                                                                o
        11.    pos hd+@-@1stc-1+100 = '|'
        12.    pos hd+@-@1stc   = 18 at @sqlv+14
  o                                                                                                                                      o

               if @n > 1
  o     13.                then @n=@n-1                                                                                                  o
        14.                                then @sqlv=@sqlv+44
        15.                                                      then goto loop
  o                                                                                                                                      o

        16.    pr fr hd
  o     17.                tran Lrecl at hd+100 ' '  '-'                                                                                 o
        18.                                                pr fr hd+100
        19.   =ret=
  o                                                                                                                                      o

        INPUT   SEL SEL                                                                                                    1      RECORD
  o     RECNO   TOT ID.          1         2         3         4         5         6         7         8         9         0      LENGTH o
        -----   --- --- ....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0      ------
            1     1  16 NAME              |TBNAME            |TBCREATO|COLNO |COLTYPE |LENGTH|SCALE                                  76
  o         1     1  18 ------------------|------------------|--------|------|--------|------|------                                 76  o
            1     1   3 TTINT             |TYPE_TEST         |P390    |     1|INTEGER |     4|     0                                 76
            2     2   3 TTSINT            |TYPE_TEST         |P390    |     2|SMALLINT|     2|     0                                 76
  o         3     3   3 TTDEC             |TYPE_TEST         |P390    |     3|DECIMAL |     7|     2                                 76  o
            4     4   3 TTCHAR            |TYPE_TEST         |P390    |     4|CHAR    |     8|     0                                 76
            5     5   3 TTVCHAR           |TYPE_TEST         |P390    |     5|VARCHAR |    30|     0                                 76
  o         6     6   3 TTFLOAT           |TYPE_TEST         |P390    |     6|FLOAT   |     8|     0                                 76  o
            7     7   3 TTREAL            |TYPE_TEST         |P390    |     7|FLOAT   |     4|     0                                 76
                        ....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0....,....0
  o                                                                                                                                      o
    SUMMARY..
     SEL-ID      SELTOT      FILE     BLKSIZE  LRECL           FSIZE   CI    DSN
  o  ------      ------      ----     -------  -----           -----   --    ---                                                         o
        1             7 READ F1                 76 U               7
        2             1
  o     3----4        7                                                                                                                  o
        5----8        1
        9---12        7
  o    13---15        6                                                                                                                  o
       16---19        1

  o                                                                                                                                      o
             ** ** ** ** ** ** ** SELCOPY IS LICENSED BY COMPUTE (BRIDGEND) LTD  +44 (1656) 652222 & 656466 ** ** ** ** ** ** **
                                                      ** EXPIRY DATE -- 12 JUN 2001 **


The following special arguments for the SELCOPY POS keyword are supported:

POS SQLCA Refers to the SQL Communication Area.
POS SQLDA Refers to the SQL Descriptor Area.
POS SQLMA Refers to the SQL Message Area.

IMS / DL1 Database

We will print a sample of a DL1/IMS Data Base, together with Segment names and Level numbers, restricting the print to the first 50 segments.

For clarity, we will space a line on the print every time we hit a Root Segment which is identified by a Level number of 01 in the PCB feedback area.

Fields in DL1's PCB may be referenced using SELCOPY's positional keywords:

Keyword Description Length Type
POS PCB Database Name 8 Char
POS PCB+8 Seg Level 2 ZonedDec
POS PCB+10 Status Code 2 Char
POS STATUS Synonym for PCB+10    
POS PCB+12 Processing Options 4 Char
POS PCB+16 Reserved 4  
POS PCB+20 Segment Name 8 Char
POS SEG Synonym for PCB+20    
POS PCB+28 Length of Key 4 Binary
POS PCB+32 No of Sensitive Segs 2 Binary
POS PCB +36 Key Feedback Area Var Char

We will use a work area (automatically initialised to blanks by SELCOPY) which is larger than the largest record, and read segments (records) into position 101.

But segments shorter than 100 bytes may have residual data still in the work area from the last segment. This must be cleared with blanks before printing.

POS LRECL in SELCOPY refers to the last byte of the current input record assuming it was read into position 1, but in our case, we read our record into a position 100 bytes further on, so LRECL+100 is the last byte of the current record. It is therefore position LRECL+101 which needs to be blanked. L+101 is a valid abbreviation.

After moving in the Segment Name and Level no to the front of the work area, we will print it, restricting the print length to 200 and spacing one line first if we have a root segment to print. In spite of the restriction of L=200 on the PRINT command, it is still the true segment length of each individual segment which is printed on the right hand side of the SELCOPY report.

The Status Code is not checked because EOF is handled automatically by SELCOPY as well as any major error conditions.


SELCOPY Control Cards


  read DBNAME   DL1   into 101   w 2222  * Work area length 2222.

  pos L+101,200 = ' '                    * Blank out residual data.
  move 2   fr pcb+8   to 1               * Segment Level No.
  move 8   fr seg     to 10              * Segment Name.

  if pos pcb+8 = '01'                    * Is it a Root Segment?
    t space 1                            * Extra blank line.
    t p 20 = '*=* ROOT SEGMENT OF DB xxxxxxxx *=*'
    t move 8   fr pcb   to 43            * Data Base name.
    else pos 20,80 = ' '

  print   L 200   s 50                   * First 50 segs, length 100.



Notes
  • SELCOPY treats lower case as upper case unless in 'quotes'. Some common abbreviations are:


  rd read    w worklen   fr from   l lrecl     b  blksize    t  then
  pr print   p pos       ty type   s stopaft   li elseif     ti thenif

Change "t space 1 " to " t line 1 " to force a new page. You could also display the Processing Options. Use POS PCB+12.

Usage under TSO

The following live example illustrates use from TSO's READY message, using the S CLIST (provided on the distribution tape) to invoke SELCOPY, taking its control cards from parameter 1.

Using the command 'S TERM', the CLIST allocates both SYSIN and SYSPRINT to the user's terminal. This type of invocation is ideal for one-off jobs to investigate, for instance, the layout of files, or for simple fixes as shown in the following example.

We wish to read all members of a PDS with the dataset name, 'userid.ABCD', which happens to contain JCL. Where the JCL calls the program IEWL, replace it with a call to the program XXXX. This, of course, is not a real program name but serves as an example.


   READY

   s      term
   /* TO END - ENTER SELCOPY CONTROL CARDS ...
   rd A dsn=abcd dirdata upd!if p any = 'IEWL'!t p @ = 'XXXX'!t upd A!t pr

   SELCOPY REL 9.8P AT CBL - Bridgend UK (Internal Only)
   -----------------------------------------------------

        1.  RD A DSN=ABCD DIRDATA UPD
                                      IF P ANY = 'IEWL'
        2.                                              T P @ = 'XXXX'
        3.                                                             T UPD A
        4.                                                                     T PR
   /*


       INPUT   SEL SEL
       RECNO   TOT ID.          1         2         3         4         5         6
       -----   --- --- ....,....0....,....0....,....0....,....0....,....0....,....0..
          77     1   4 //LNK      EXEC PGM=XXXX,REGION=500K,
          76     2   4 //LNK      EXEC PGM=XXXX,REGION=500K,
          35     3   4 //LNK      EXEC PGM=XXXX,REGION=500K,
          35     4   4 //LNK      EXEC PGM=XXXX,REGION=500K,
                       ....,....0....,....0....,....0....,....0....,....0....,....0..

   SUMMARY..
    SEL-ID      SELTOT      FILE     BLKSIZE  LRECL           FSIZE   CI    DSN
    ------      ------      ----     -------  -----           -----   --    ---
       1           320 READ A         23440    80 FB              4       P390B.ABCD
       2             4
       3             4 UPD  A         23440    80 FB              4       P390B.ABCD
       4             4

            ** ** ** ** ** ** ** SELCOPY IS LICENSED BY COMPUTE (BRIDGEND) LTD  +44 (
                                                    ** EXPIRY DATE -- 12 JUN 2001 **)
   READY

The above example is perfectly good for a controlled example, but has certain short-comings if we consider changing a more commonly used string.

  1. There is no check to ensure that we don't update directory records.
  2. Only the first occurence of the string within each record will be modified.

An easier and better (in that it eliminates the deficiencies above) way to achieve the same update would be to use a REXX exec called SCANPDS, which is also provided on the SELCOPY distribution tape.

It's syntax is: SCANPDS ddname string1 string2

ddname is the ALLOC for the input PDS
string1 is the string to scan for
string2 if provided is used to overwrite string1, wherever found, and update that PDS member record.

For our example we would key in: SCANPDS abcd IEWL XXXX

Dynamc Allocation

MVS, VSE and CMS datasets may be processed without a DD, DLBL or FILEDEF statement by providing the full dataset name on the SELCOPY I/O command, either as a literal or as a field in the workarea giving a variable data set name.

Dynamic allocation has a variety of uses in all environments. A simple application for MVS is shown below, which uses SELCOPY to copy selected members of a PDS to another new PDS. For this example, we will select members with '96' anywhere in the member name.


    read  PDSINP  dsn='CBL.PDS.SSPDSC'   dirdata   into 101  worklen 33333
                                  * Read directory record and data
                                  * records for each PDS member.

    if dir                        * If it's a PDS directory record
      then do  SELECTION          * then selectively open a new output memb.
      else write PDSOUT   fr 101  * Copy record to the output member.

    goto get



  ==SELECTION==        ** Process the PDS directory records **
    if pos 101,107 = '96'  * Select if '96' appears anywhere in the name.
      then pos   1,44  =  'CBL.PDS.SSPDSC.Y96'   stopaft 1 * Output DSN.
      then pos  45     =  '(12345678)'           stopaft 1 * Append the
      then pos  46     =    8 at 101                       * memb name.
      then open   PDSOUT      dsn = 44+10 at 1   * CLOSE is automatic.

      else flag eomemb   * Suppress the OPEN for this input member.

    return


Programming Notes

  1. SELCOPY tolerates blanks padding the variable DSN up to 44 bytes and blanks padding the member name up to 8 bytes.
  2. The SELCOPY feature, DIRDATA, is used to read all DIRectory and DATA records from the PDS, opening each member in turn, provided FLAG EOMEMB has not been set.

    DIRDATA input for MVS returns the directory record for each member, followed by its data records. (For VSE and CMS, the directory records are reformatted by SELCOPY.) PDS member selection may then be based on any combination of information held in the directory record. e.g. member name, userid, timestamps, record count/file size, authorisation code.

  3. Although not illustrated above, at the same time, using a few additional statements, the output member name could have been changed to rationalize it so that the '96' falls in a fixed position.

SELCOPY for Microsoft Windows

The following SELCOPY/WNT job will generate and dynamically execute File Transfer Program commands to SEND a generic group of files to your mainframe.

Although this example uses an MVS Partitioned Data Set to receive the PC files it could easily be modified for any environment and any FTP command.


Note:

Occurrences of %1, %2 and %3 in the control card syntax refer to the parameters passed to SELCOPY/WNT on the invoking command line.


    equ pdsname       1
    equ dirrec      101

    option      w 32760

    do init stopaft=1                 * Initialise once only.

    rd %1     dir     into dirrec     * Read a directory rec into pos 101.

    pos  dirrec-1+38    = ' '              * Blank out the '.'
    pos  @fn            = 9 at dirrec-1+30 * fn followed by a blank.
    if p @fn,@fn+9      = ' '              * Bound to get one.
      then pos @,@fn+10 = ")'"

    pos  dirrec-1+60-5  = 'send '
    if lrecl < 80
      then pos dirrec+lrecl,dirrec+80 = ' '
      then lrecl = 80                          * Keep it neat.
    pos  dirrec+lrecl   = pos 1,@fn+22

    log           fr dirrec-1+60-5,dirrec+lrecl-1+@fn+22-1
    system        fr dirrec-1+60-5,dirrec+lrecl-1+@fn+22-1
  * wr ssftp.cmd  fr dirrec-1+60-5,dirrec+lrecl-1+@fn+22-1 * To run in OS/2.
    gg

  ==init==              ** Initialisation sub-routine **
    pos  pdsname+3    = %2   !lower 1 at pdsname+3   * The emulator session.
    pos  pdsname+3+1  = ":'"                         * x:
    pos  pdsname+3+3  = %3                           * x:receive.pds.name
    if p pdsname+3,pdsname+99 = ' '                  * Scan for blank.
      then @fn   = @+1

    lower from pos pdsname+3,@fn                     * Lower case the dsn.
    pos @fn-1 = "(ABCDEFGH)'  ascii crlf"    * x:receive.pds.name(ABCD.. etc
   =ret=


Invocation

Assuming that the above control cards are stored in the file d:\cbl\SSFTP.ctl, then keying in at the DOS prompt


  selcopy <d:\cbl\SSFTP.ctl    c:\dos\*.BAS   C   CBL.FTPTEST

could generate and execute the following FTP commands:


  send c:\dos\GORILLA.BAS    c:'cbl.ftptest(GORILLA)'   ascii crlf
  send c:\dos\MONEY.BAS      c:'cbl.ftptest(MONEY)'     ascii crlf
  send c:\dos\NIBBLES.BAS    c:'cbl.ftptest(NIBBLES)'   ascii crlf
  send c:\dos\REMLINE.BAS    c:'cbl.ftptest(REMLINE)'   ascii crlf

The command line may seem a little long winded, in which case it would be worthwhile setting up a BAT file: e.g.


  :** h:\cg\SSFTP.BAT kkk             L=101 --- 97/06/19 11:24:32    (P22)

  : Format: ssftp      fileid_with_wildcard    emulator_session   mvs_pds_dsn
  :   e.g.  ssftp           C:\CBL\*.T*               B          CBL.SELC980.DM

  selcopy <d:\cbl\ssftp.ctl     %1                    %2              %3





CBLVCAT


Simple Reporting

Standard Report: Catalog

A readable replacement for IDCAMS LISTCAT with VSAM or ICF catalogs.

The CBLVCAT standard report provides a condensed report in a fraction of the time. The important data component information is contained on a single line. Other catalog information is available through the customised report feature.


    CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales                           (OS) VM/CMS=VM03      11.41 MON 05 JAN 2004    PAGE   1
  o --------------------------------------------------                                --------------------------------------    -------- o

       ** VMXVFULL CTL M ***            L=003 --- 2004/01/05 09:57:41      *id *
  o                                                                                                                                      o
          listvcat ddname=CBLV01

  o                                                                                                                                      o
    USERCAT CBLV01 (3350)  TYPE      NRECS   PCNT  ---- ALLOC TRACKS ----   FRSP   LMAX  KL,RKP  CISIZE BUFSP EXCPS     TIMESTMP
    ---------------------  ----      -----   ----    TOTAL   PRIME  SEC     CI CA  ---- /BLK/IMB ------ /IXL  -----     --------
  o                                                                                                                                      o
    CBL.VSAM.CATALOG       KSDS         57   35.2       12      12      3           505  44,0      512   3072  7172  2003/02/07 16.25.38
    ----------------         IX          3    3.6        3       3      3           505 --IMB--    512  IXL=2   460
  o CBL.TEST.ABCD.CATALOG  KSDS         13   27.1        2       2      0*          512  45,10    2048   6144   365  2003/02/17 19.06.12 o
                             IX          1   12.5        1       1      0*         2041           2048          335
    CBL.TEST.ABCD.CATALOG2 KSDS         13   27.1        2       2      0*          512  45,10    2048   6144     6  2003/02/23 23.57.58
  o                          IX          1   12.5        1       1      0*         2041           2048            6                      o
    CBL.TEST.VVDS          ESDS          7    6.3        2       2      0*          400V          2048   4096   283  2003/02/17 19.05.42
    CBL.TEST.VVDS2         ESDS          7    6.3        2       2      0*          400V          2048   4096     4  2003/02/23 23.42.38
  o EG.OF.LOW.BUFSP.HIGH.IXCISIZE                                                                                                        o
                           KSDS        401   33.5      C=2     C=1    C=1   25 20   800   4,0     4096  12288*  275  2003/11/09 00.55.09
                             IX          3   75.0        1       1      1          4089          +4096+ IXL=2   145
  o FILE.CREATED.BY.XYZ3   RRDS          2   20.0        1       1      1          1200           3072   6144     4  2003/11/08 21.29.49 o
    NO.SEC.ALLOC.1         KSDS          5    3.2       10      10      0*         1017   4,0     2048   6144     9  2003/11/09 01.09.34
                             IX          1   12.5        1       1      0*         2041           2048            5
  o PRIME.SPACE.TEST.FILE  ESDS         25 ** ALL**      1       1      1           300V          1024   2048     6  2003/11/02 16.57.20 o
    SQ2051.TEMP.TEST.FILE  ESDS          1    3.8        1       1      1          2000V           512 SPANNED    4  2003/12/12 17.07.24
    STUVE.TEST.FILE        ESDS         17    7.5        1       1      1           120V           512   1024    28  2002/02/22 09.36.06
  o STUVK.TEST.FILE        KSDS(R)       5    2.1        1       1      1           100V  7,8     1024   3072    82  2002/07/19 05.49.06 o
                             IX          1    6.7        1       1      1          1017           1024           32
    SPACE.TEST.FILE        RRDS         17 **85.0**      2       1      1          1200           3072   6144    37  2002/02/22 07.49.39
  o XYZ1.KSDS.FILE         KSDS(R)       1    0.1       10      10      0*           17   5,10    1024   3584    10  2003/11/08 21.41.01 o
                             IX          1    9.1        1       1      0*         1529           1536            7
    XYZ2.ENTRY.SEQ         ESDS          7    0.7       20      20      0*         2038V          2048   4096     8  2003/11/08 21.50.58
  o XYZ4.EXAMPLE.1         ESDS       2472   76.6       16       8      8           800V          4096   8192    31  2003/11/09 00.05.15 o
    XYZ4.FILE              KSDS          1    3.2        2       2      0*         1017   5,0     2048   6144     4  2003/11/09 01.03.37
                             IX          1   12.5        1       1      0*         2041           2048            4
  o XYZ8.KSDS.FILE         KSDS(R)       6    0.1       10      10      0*           17   5,10    1024   3584     7  2003/11/09 01.33.02 o
                             IX          1    9.1        1       1      0*         1529           1536            4
    XYZ9.KSDS.FILE         KSDS(R)       6    0.1       10      10      0*           17   5,10    1024   3584     8  2003/11/09 01.17.46
  o                          IX          1    9.1        1       1      0*         1529           1536            5                      o

                                                       ---     ---     --
  o                                                    177     138     52                                                                o
                                                       ---     ---     --

  o                                                                                                                                      o

                              ------ DEV CHARS ------     DATA  SPACE  DATA      --------- TRACKS ---------
  o          VOLUME    CRA   TYPE     MIN-CA    MAX-CA    SETS  CLASS SPACES    ALLOC    USED   PCNT    FREE    MAXF    TIMESTMP         o
             ------    ---   ----     ------    ------    ----  ----- ------    -----    ----   ----    ----    ----    --------
             CBLV01     NO   3350    13.5-18K  405-540K    28     0      1        240     177   73.8      63      56 2003/02/07 16.25.32
  o                                                                                                                                      o


  o                                                                                                                                      o
             ** ** ** ** ** ** ** CBLVCAT IS LICENSED BY COMPUTE (BRIDGEND) LTD +44 (1656) 652222 & 656466 ** ** ** ** ** ** **
                                                      ** EXPIRY DATE -- 12 JUN 2004 **

Notes:

In addition to displaying Catalog information, warning indications (*,+) are given when various, user controlled, threshold values are passed, thus problems are discovered before they become serious. Some of these indications are shown above and have the following meanings:-

  • EG.OF.LOW.BUFSP.HIGH.IXCISIZE - Will have a performace problem as the BUFSP is too small.
  • EG.OF.LOW.BUFSP.HIGH.IXCISIZE - Has an excessively large Index CISIZE which adds to data transfer time.
  • SPACE.TEST.FILE - File is nearly full.
  • NO.SEC.ALLOC.1 - Has no secondary allocation defined. This is highlighted because the file cannot be expanded.

Standard Report: VTOC

The VTOC standard report is used in place of IEHLIST/LVTOC, providing a readable and condensed report. The important VTOC information is contained on a single line. Other VTOC information is available through the customised report feature.


    CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales                           (OS) VM/CMS=VM03      16.11 MON 23 JUN 2003    PAGE   1
  o --------------------------------------------------                                --------------------------------------    -------- o

       ** VMXTFULL CTL M ***        L=101   2003/06/23 16:11:51      *id *
  o      listvtoc vol=CBLT93                                                                                                             o
                  freetab

  o                                                                                                                                      o
    VTOC OF CBLT03                  CISIZE   START  ALLOC   USED  TYPE   EXPIRES BLKSIZE LRECL  RECFM    CREATED   INFO
    --------------                  ------   -----  -----   ----  ----   ------- ------- -----  -----    -------   ----
  o                                                                                                                                      o
    VTOC                                    557256    286     13  FBA                 96    96                     OWNED BY VSAM CATALOG

  o TEST.SCRN.LIBRARY.4                512  155044   1244               PERMANENT                      2003/03/23  NOT LAST VOL          o
    TEST.SOURCE.LIBRARY.4              512  156288  36000               PERMANENT                      2003/03/23  NOT LAST VOL
    Z9999994.VSAMDSPC.T9A1BDD6.T8976140
  o                                    512  331824    744         VSAM  PERMANENT                                                        o
    Z9999992.VSAMDSPC.T9A1BDD9.T8014540
                                       512  332568 224688         VSAM  PERMANENT
  o MASTER SORT TABLE                 4608  661640    160               PERMANENT                      2002/11/26                        o
    WORK MASTER                       8192  661800   2304               PERMANENT                      2003/01/15
    ACCOUNTS-DATA                     2560  664104   4000                 *EXPD*                       2002/03/20  FILE SERIAL CBLT13
  o V.TSTDATA                         4096  669704   4672              2003/09/13                      2003/03/21                        o
    B.TSTDATA                         4096  674376   5760              2003/09/13                      2003/03/21
    RRR.SORTS                         2560  680136   3200               PERMANENT                      2003/03/04
  o PRODN.HIST.FILE                  10240  697128  15624               PERMANENT                      2003/03/24  ***INVALID EXTENT***  o

                                     ------------------------------------------------------------------
  o                                                                                                                                      o
    FREE SPACE ON CBLT03                         2 155042                                                          OLDEST     2002/03/20
                                            192288 139536                                                          LATEST     2003/03/24
  o                                         557542 104098                                                          VTOC RECS LIVE.....12 o
                                            664104   4000  EXPD                                                              EXPD......1
                                            668104   1600                                                                    FREE....271
  o                                         683336  13792                                                                   TOTAL....284 o
    TOTAL FREE BLOCKS                              418068 OUT OF 712512(  41%    USED)

  o          ** ** ** ** ** ** ** CBLVCAT IS LICENSED BY COMPUTE (BRIDGEND) LTD +44 (1656) 652222 & 656466 ** ** ** ** ** ** **          o
                                                      ** EXPIRY DATE -- 12 JUN 2004 **

Notes:

  • This example shows how FREESPACE can be reported as a table at the end of the report, via the run time option FREETAB. It is possible to make this the default option by modifying the supplied program CBLNAME.

  • Files shown as PERMANENT have an expiry date of 2099/366 (or 2099/365 if not defined as a retention period) - See RRR.SORTS for example.

  • Files with an expiry date less than or equal to today's date show as EXPIRED. - See ACCOUNTS-DATA.

  • The eye-catcher ***INVALID EXTENT*** on the file PRODN.HIST.FILE indicates that the extent is not totally within the disk extent limits held in the Format 4 label in the VTOC.

  • For the file ACCOUNTS-DATA the file serial number CBLT13 is displayed because it is different from the disk volume serial number. (Possibly caused by changing the VOLID after creation of the file).

  • NOT LAST VOL indicates that the file has more extents on another volume, or it has not been closed as a sequential file when created.

  • OWNED BY VSAM CATALOG shows that this volume is a prime or candidate volume of a VSAM catalog and thus not available for other VSAM catalogs.

VSE Standard Label Report

A concise and readable replacement for the LSERV label information area report. The LSERV equivalent of the listing shown below extended to 1174 lines, whereas LISTLABL consists of only 111 lines in total.


    CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales                                                   16.11 MON 23 JUN 2003  PAGE   1
  o --------------------------------------------------                                                   ---------------------  -------- o


  o       LISTLABL                 ***                                                                                                   o


  o PARTN FNAME    STD LABEL DSN                SYSNO   VOLUME CAT/TYP  DISP   EXPIRES BUFNI BUFND START/PRECS ALLOC/SRECS RECSZ INFO    o
    ----- -----    -------------                -----   ------ -------  ----   ------- ----- ----- ----------- ----------- ----- ----
    BG(T) CBLVSAM  CBL.VSAM.LABEL.BG            SYS001  SYSWK1 (V)      N,T,K       99                    2221        3000
  o BG(T) CBLTEMP  CBL.TEMP.LABEL.BG            SYS001  SYSWK1     (S)        2010/022                    5510        7851               o
    BG    CBLMULT  CBL.MULT.EXT.FILE.BG.VERY.LONG.DSN
                                                SYS001  SYSWK1     (S)               7                   32767       32767       EXT=000
  o                                             SYS002  SYSWK2                                           32768       32768       EXT=001 o
                                                SYS003  SYSWK3                                           65535       77566       EXT=002

  o                                                                                                                                      o
    PARTN FNAME    STD LABEL DSN                SYSNO   VOLUME CAT/TYP  DISP   EXPIRES BUFNI BUFND START/PRECS ALLOC/SRECS RECSZ INFO
    ----- -----    -------------                -----   ------ -------  ----   ------- ----- ----- ----------- ----------- ----- ----
  o F2(T) IJSYS01  %DOS.WORKFILE.SYS001.RECOVER                VSESPUC  N,K                                 30          50  4096         o
    F2(T) IJSYS02  %DOS.WORKFILE.SYS002.RECOVER                VSESPUC  N,K                                 30          50  4096

  o                                                                                                                                      o
    PARTN FNAME    STD LABEL DSN                SYSNO   VOLUME CAT/TYP  DISP   EXPIRES BUFNI BUFND START/PRECS ALLOC/SRECS RECSZ INFO
    ----- -----    -------------                -----   ------ -------  ----   ------- ----- ----- ----------- ----------- ----- ----
  o CL=D  LCLASSD  CBL.CLASS.D.LABEL            SYS001  SYSWK1     (S)               7                                                   o
    CL=S  LCLASSS  CBL.CLASS.S.LABEL            SYS001  SYSWK1     (S)               7
    CL=X  LCLASSX  CBL.CLASS.X.LABEL            SYS001  SYSWK1     (S)               7
  o                                                                                                                                      o

    PARTN FNAME    STD LABEL DSN                SYSNO   VOLUME CAT/TYP  DISP   EXPIRES BUFNI BUFND START/PRECS ALLOC/SRECS RECSZ INFO
  o ----- -----    -------------                -----   ------ -------  ----   ------- ----- ----- ----------- ----------- ----- ----    o
    STD   IJSYSRS  VSE.SYSRES.LIBRARY           SYSRES  DOSRES     (S)        2099/365                       2       59146
    STD   IJSYSR2  VSE.SYSRES.LIBRARY           SYSCAT  DOSRES     (S)        2099/365                       2       59146
  o STD   IJSYSR1  SYS.NEW.RES                          SYSWK1     (S)        2099/365                       2       59146               o
    STD   IJQFILE  VSE.POWER.QUEUE.FILE         SYS001  DOSRES   (DA)         2099/365                   59520         372
    STD   DFHJ01A  CICS.SYSTEM.LOG.A            SYS019  DOSRES     (S)                                  297538        3038
  o STD   DFHJ01B  CICS.SYSTEM.LOG.B            SYS019  DOSRES     (S)                                  300576        3038               o
    STD   DFHJ02A  CICS.USER.JOURNAL.A          SYS019  DOSRES     (S)                                  303614        3038
    STD   DFHJ02B  CICS.USER.JOURNAL.B          SYS019  DOSRES     (S)                                  306652        3038
  o STD   IJSYSHF  VSE.SYSTEM.HISTORY.FILE      SYSCAT  DOSRES     (S)        2099/365                  309690        5022               o
    STD   SYSDUMP  VSE.DUMP.LIBRARY                     SYSWK1     (S)        2099/365                  195858       37014
    STD   DTSFILE  ICCF.LIBRARY                 SYS010  SYSWK1   (DA)         2099/365                  305970       70060
  o STD   IJDFILE  VSE.POWER.DATA.FILE          SYS002  SYSWK1   (DA)         2099/365                  392956       72044               o
    STD   IJAFILE  VSE.POWER.ACCOUNT.FILE       SYS000  SYSWK1   (DA)         2099/365                  465000        2108
    STD   VSEJMGR  VSESP.JOB.MANAGER.FILE       SYSREC  SYSWK1     (S)        2099/365                  467108         186
  o STD   IJSYSCN  VSE.HARDCOPY.FILE            SYSREC  SYSWK1     (S)        2099/365                  467294        5022               o
    STD   IJSYSRC  VSE.RECORDER.FILE            SYSREC  SYSWK1     (S)        2099/365                  472316        1054
    STD   BLNDMF   INFO.ANALYSIS.DUMP.MGNT.FILE SYS016  SYSWK1     (S)                                  478392         248
  o STD   BLNXTRN  INFO.ANALYSIS.EXT.RTNS.FILE  SYS017  SYSWK1     (S)        2099/365                  478640         124               o
    STD   TRFILE   VTAM.TRACE.FILE              SYS001  SYSWK1     (S)        2099/365                  478764         496
    STD   NCPLOAD  CU37XX.LOAD.FILE             SYS005  SYSWK1     (S)        2099/365                  479260        3038
  o STD   MSGUSR   CICS.MSGUSR                  SYS018  SYSWK1     (S)                                  482298         434               o
    STD   IJSYSCT  VSAM.MASTER.CATALOG                         (V)            2099/365
    STD   IJSYSLN  %DOS.WORKFILE.SYSLNK                        VSESPUC                                     400         600   322
  o STD   IESCNTL  VSE.CONTROL.FILE                            VSESPUC               7                                                   o
    STD   IESTRFL  VSE.TEXT.REPSTORY.FILE                      VSESPUC               7
    STD   IESTRWF  VSE.TEXT.REPSTORY.WORKFILE                  VSESPUC               7
  o STD   IESMSGS  VSE.MESSAGES.ONLINE                         VSESPUC               7                                                   o
    STD   IESPRB   VSE.ONLINE.PROB.DET.FILE                    VSESPUC               7
    STD   IESROUT  VSE.MESSAGE.ROUTING.FILE                    VSESPUC               7
  o STD   DFHSTM   CICS.AUTO.STATS.A                           VSESPUC  N,K                                                              o
    STD   DFHSTN   CICS.AUTO.STATS.B                           VSESPUC  N,K
    STD   DFHNTRA  CICS.TD.INTRA                               VSESPUC
  o STD   DFHTEMP  DFHTEMP                                     VSESPUC                                                                   o

Notes:

The order of the report is:

  1. Partition standard labels (temporary and permanent).
  2. Class (Dynamic partition) standard labels.
  3. System standard labels.

Simple Customised Report

Customising the report can be very useful, for example:

  1. Reporting only the information you require.
  2. Reporting information not contained in the standard report.

The example below is for an ICF catalog, but it should be noted that the REPORT operation can also be used on VSAM catalogs and VTOCs.

If for instance you want to know which files contain the most records then searching through the full report can be tedious. Obtaining only the information you require is Quick and Easy with the Customised Report facility.


   ___________________________________________________________________________________
  |                                                                                  /
  |   CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales    2003/09/26  PAGE   1     \
  | o --------------------------------------------------    ----------  --------     /
  |                                                                                  \
  |         REPORT   VCAT               DSN   SORTD NRECS  TYPE                      /
  | o                                                                                \
  |         LISTCAT  REF=WXYZ.NRECS1   NOINDEX                                       /
  |                                                                                  \
  | o                                                                                /
  |   ICF CAT CBLI94 (3380)                            NRECS  TYPE                   \
  |   ---------------------                            -----  ----                   /
  | o                                                                                \
  |   LOTS.NRECS1                                      62828  KSDS                   /
  |   ABCD.NRECS1                                      61430  KSDS                   \
  | o WXYZ.NRECS1                                      57809  KSDS                   /
  |   LESS.NRECS1                                      57784  KSDS                   \
  |   ABCD.123.LESS.NRECS                               7500  RRDS                   /
  | o SMALLER.NRECS.123                                 2250  RRDS                   \
  |   LAST.SHOWN.NRECS.12                               1323  KSDS                   /
  |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\

Notes:

  • The REPORT command is used to define the format of the report, in this example the three fields requested are the Dataset name (DSN), the number of records for that file (NRECS) and the file type (TYPE).

  • The positional SORTD parameter invokes a descending sort of output based on the keywords that follow it, in this case NRECS and TYPE, giving a sort on the number of records and type.

  • The REF=WXYZ.NRECS1 parameter is used to identify the required catalog, instead of supplying a DD card for the catalog itself and using DDNAME. The DSN supplied may be the catalog dataset name, an alias or the name of any file contained within the catalog. Thus you need only know the name of one file within the catalog, CBLVCAT will do the rest.

  • The NOINDEX parameter causes the index lines to be suppressed for KSDS and AIX files.

  • The user can select from 59 Catalog and 15 VTOC items to build reports of varying complexity. See the Advanced Customised Reporting example below.

Selective Reporting

So far, LISTVCAT and LISTVTOC reports have been restricted to a single catalog or VTOC, but often the files you require are spread over more than one catalog or VTOC.

The example below is merging 2 VSAM catalogs, but it should be noted that the MERGE and SUBSET parameters can also be used on ICF catalogs and VTOCs.

Creating a report, on a subset of selected files, across multiple catalogs is easy.


   ___________________________________________________________________________________
  |                                                                                  /
  |   CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales             2003/09/26 10:02\
  | o --------------------------------------------------             ----------------/
  |                                                                                  \
  |        REPORT VCAT  DSN 30 SORTD  NRECS 14 CATALOG                               /
  | o                                                                                \
  |        LISTVCAT DD=CBLV03 MERGE         * Combine 2 reports                      /
  |              SUBSET                     * Select if : (opt parameter)            \
  | o               IGN=/CICS               *           'CICS' not in DSN            /
  |                 KEY=TEST                *           DSN starts 'TEST'            \
  |                 NRECS=1                 *           File is not empty            /
  | o               TYPE=EK                 *           ESDS or KSDS                 \
  |                 NOVOL NOASSOC NOINDEX   *           Limit report                 /
  |                                                                                  \
  | o       LISTVCAT DD=CBLV04              * Same parameters as above               /
  |             IGN=/CICS  KEY=TEST TYPE=EK NRECS=1  NOVOL NOASSOC NOINDEX           \
  |                                                                                  /
  | o                                                                                \
  |                                                                                  /
  |   DATASET NAME                      NRECS     CATALOG                            \
  | o ------------                      -----     -------                            /
  |                                                                                  \
  |   TEST3.TRANS.HISTORY.QUARTER     2557934     VSAM.R1.TEST.VOL04                 /
  | o TEST2W.WORK.HISTORY.WEEKLY        43555     VSAM.R1.TEST.VOL04                 \
  |   TEST2W.WORK.HISTORY.WEEKLY.SOR    30067     VSAM.R1.TEST.VOL04                 /
  |   TESTFLE                            1519     FBA.USER.CATALOG.A                 \
  | o TESTENT                              80     FBA.USER.CATALOG.A                 /
  |   TEST2.TRANS.HISTORY.WEEKLY            1     VSAM.R1.TEST.VOL04                 \
  |                                                                                  /
  | o                                                                                \
  |                                                                                  /
  |                                                                                  \
  | o                                                                                /
  |    ** ** ** CBLVCAT IS LICENSED BY COMPUTE (BRIDGEND) LTD 0656-652222, 0656-65646\
  |                                ** EXPIRY DATE -- 12 JUN 2004 **                  /
  |__________________________________________________________________________________\

Notes:

  • The MERGE parameter is used to combine multiple reports into one.

  • By supplying REPORT, MERGE and SUBSET the user is able to display exactly the information required.

  • The SUBSET parameter is optional because all its associated sub-parameters are unique, although you may prefer to include it to remind you of their function. To be selected, a file must satisfy all the subset parameters that are supplied. There is one exception to this. Multiple KEY and/or IGN parameters are supported. You can regard the KEY and IGN parameters as forming a combined name filter.

  • The above LISTVCAT example selects all non-empty (NRECS=1) ESDS and KSDS(TYPE=EK) files, which have filenames starting with "TEST", but not containing "CICS". The output from the two catalogs (CBLV03 and CBLV04) is merged into one convenient report, sorted in descending order by number of records (SORTD NRECS).



Catalog Management

Monitoring

Regular monitoring of VSAM or ICF files is essential for the smooth running of your VSAM jobs.

Selecting only the files in critical need of tuning is easy with the subset SEV=3.


    CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales                           (OS) VM/CMS=VM03      13.57 FRI 26 SEP 2003    PAGE   1
  o --------------------------------------------------                                --------------------------------------    -------- o

       ** VMXVMON1 CTL M ***        L=002  2003/09/26 13:34:59      *id *
  o      listcat  dd=CBL111                                                                                                              o
                  sev=3
                  linespace=4
  o                                                                                                                                      o

    USERCAT CBL111 (3380)  TYPE      NRECS   PCNT  ---- ALLOC TRACKS ----   FRSP   LMAX  KL,RKP  CISIZE BUFSP EXCPS     TIMESTMP
  o ---------------------  ----      -----   ----    TOTAL   PRIME  SEC     CI CA  ---- /BLK/IMB ------ /IXL  -----     --------         o


  o                                                                                                                                      o

    FILE1.IN.NEED.OF.TUNING
  o                        KSDS        611   32.4      C=7     C=7    C=2   15* 7  4112V 10,0     4608* 12800*  175K 2003/06/08 18.20.17 o
                                                   VOL1=CBL111
                                         CANDIDATE VOL2=CBL475
  o                          IX          4   36.4        1       1      1          3577           3584  IXL=2   126K                     o
                                                   VOL1=CBL111
                                         CANDIDATE VOL2=CBL475
  o                                                                                                                                      o
       *** SEV 3-03 ***  ACTUAL FRSP CI = 0 PC 
        ** SEV 2-04 **   BUFSP TOO SMALL FOR EFFICIENCY
  o     ** SEV 2-25 **   INEFFICIENT DATA CISIZE                                                                                         o
        ** SEV 2-31 **   AVLRECL: DEFINED=272     ESTIMATED=1954
         * SEV 1-15 *    4 CYLS CAN BE RECOVERED WHEN TUNED
  o                                                                                                                                      o


  o                                                                                                                                      o
    FILE2.IN.NEED.OF.TUNING
                           KSDS(R)    4625   57.4      C=8     C=8    C=1   20 20  4096V 21,0     4608  11264* 3470  2003/06/08 18.15.58
  o                                                VOL1=CBL111                                                                           o
                                         CANDIDATE VOL2=CBL475                                                        ** 001 CI SPLITS**
                             IX          8 **88.9**      1       1      1          2041 IMB+REP   2048  IXL=2  10.5K
  o                                                VOL1=CBL111                                                                           o
                                         CANDIDATE VOL2=CBL475

  o    *** SEV 3-12 ***  INDEX EXCPS DWARF DATA                                                                                          o
        ** SEV 2-04 **   BUFSP TOO SMALL FOR EFFICIENCY
        ** SEV 2-31 **   AVLRECL: DEFINED=1000    ESTIMATED=525
  o      * SEV 1-07 *    CI SPLITS EXIST                                                                                                 o


  o                                                    ---     ---     --                                                                o
                                                       227     227     47
                                                       ---     ---     --
  o      *** WARN  001 *** 12 = RETURN CODE FROM CBLVCAT                                                                                 o


  o          ** ** ** ** ** ** ** CBLVCAT IS LICENSED BY COMPUTE (BRIDGEND) LTD +44 (1656) 652222 & 656466 ** ** ** ** ** ** **          o
                                                      ** EXPIRY DATE -- 12 JUN 2004 **

Notes:

Severity Messages are reported at three SEV states which are controllable through the SEV parameter. They can be excluded from the report with the NOPSEV parameter.

  • SEV 3 messages are serious and require immediate attention.
  • SEV 2 messages indicate changes to be made when the file is next loaded.
  • SEV 1 messages are minor, but require investigation.

SEV 3-03 for FILE.1.IN.NEED.OF.TUNING indicates that the file has been defined with a non-zero FRSP CI value, but the control interval is not large enough to reserve any usable free space.

SEV 3-12 for FILE.2.IN.NEED.OF.TUNING indicates that the number of index EXCPS is at least twice the number of data EXCPS.

Fixing either of the above is easy using CBLVCAT's tuning recommendations. See the Tuning example which follows.

Tuning

Continuing from the previous example, when problem files have been identified, acting quickly to redefine them will maximise performance.

CBLVCAT will produce all the necessary advice for redefining problem files. See the later example if you also wish to have the IDCAMS DEFINE deck generated at the same time.

The output, for the purpose of this example, is deliberately restricted to 1 file only via the KEY=FILE.1.IN.NEED.OF.TUNING parameter.


    CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales                           (OS) VM/CMS=VM03      14.17 FRI 26 SEP 2003    PAGE   1
  o --------------------------------------------------                                --------------------------------------    -------- o

       ** VMXVTUN1 CTL M ***        L=002   2003/09/26 14:14:30      *id *
  o      listcat  dd=CBL111                                                                                                              o
                key=FILE1.IN.NEED.OF.TUNING
                tune
  o                                                                                                                                      o

    USERCAT CBL111 (3380)  TYPE      NRECS   PCNT  ---- ALLOC TRACKS ----   FRSP   LMAX  KL,RKP  CISIZE BUFSP EXCPS     TIMESTMP
  o ---------------------  ----      -----   ----    TOTAL   PRIME  SEC     CI CA  ---- /BLK/IMB ------ /IXL  -----     --------         o


  o FILE1.IN.NEED.OF.TUNING                                                                                                              o
                           KSDS        611   32.4      C=7     C=7    C=2   15* 7  4112V 10,0     4608* 12800*  175K 2003/06/08 18.20.17
                                                   VOL1=CBL111
  o                                      CANDIDATE VOL2=CBL475                                                                           o
                             IX          4   36.4        1       1      1          3577           3584  IXL=2   126K
                                                   VOL1=CBL111
  o                                      CANDIDATE VOL2=CBL475                                                                           o

       *** SEV 3-03 ***  ACTUAL FRSP CI = 0 PC
  o     ** SEV 2-04 **   BUFSP TOO SMALL FOR EFFICIENCY                                                                                  o
        ** SEV 2-25 **   INEFFICIENT DATA CISIZE
        ** SEV 2-31 **   AVLRECL: DEFINED=272     ESTIMATED=1954
  o      * SEV 1-15 *    4 CYLS CAN BE RECOVERED WHEN TUNED                                                                              o

         *** WARN  015 *** LARGE AVLRECL CHANGE
  o                                                                                                                                      o
         *** WARN  016 *** LARGE ALLOC CHANGE

  o                                                                                                                                      o
         CBL TUNED                                                                                                
         ---------                                                                                                
  o      DATA  (                           -                                                                                             o
             CISZ         (14336)          - * NEW PHYREC SIZE=14336, CURRENT=4608                                
             CYLINDERS    (3,1)            - * OPTIMISED FOR DEVICE GEOMETRY                                      
  o          RECORDSIZE   (1954,4112)      - * DEFINED AVLRECL=272                                                                       o
             FREESPACE    (18,6)           - * GIVES FREE REC=1/7, FREE CI=3/45                                   
             BUFFERSPACE  (32768)          ) * 32K MINIMUM FOR DIRECT PROCESSING                                  
  o      INDEX (                           -                                                                                             o
             CISZ         (1024)           ) *                                                                    
                                                                                                                  
  o                                          * USING AVLRECL=1954   --- FILE CAPACITIES (NRECS) ---                                      o
                                             *             ------ TUNED ------           --- ORIG (ESTD) ---      
                                             *             PCNT   PRIME    SEC           PCNT   PRIME    SEC      
  o                                          *             ----   -----    ---           ----   -----    ---                             o
                                             *  INIT LOAD   73      756    252            36      875    250      
                                             *       FREE   18      189     63            42     1015    290      
  o                                          *              --      ---    ---            --     ----    ---                             o
                                             *              91      945    315            78     1890    540      
                                             *              --      ---    ---            --     ----    ---      
  o                                                                                                                                      o
                                OPTIONAL JCL OVERRIDE FOR SEQ I/O                                                 
                                ---------------------------------                                                 
  o                             BUFND=5      * (70K)  FAST                                                                               o
                                BUFND=8      * (112K) URGENT                                                      
                                BUFND=25     * (350K) **TURBO**  (BUT WILL IMPACT OTHER WORK)                     
  o                                                                                                                                      o
                                                                                                                  
         *** WARN  001 *** 12 = RETURN CODE FROM CBLVCAT
  o                                                                                                                                      o

             ** ** ** ** ** ** ** CBLVCAT IS LICENSED BY COMPUTE (BRIDGEND) LTD +44 (1656) 652222 & 656466 ** ** ** ** ** ** **
  o                                                   ** EXPIRY DATE -- 12 JUN 2004 **                                                   o

Notes:

The TUNING RECOMMENDATIONS shown indicate the following:-

  • Data Control Interval Size: Increase from 4.5K to 14K bytes.
  • Space Allocation: Modify (7 2) to (3 1) cylinders.
  • Average Record Size: Increase from 272 to 1954 bytes.
  • Freespace: Increase from (15 7) to (18 6) CI & CA percentages.
  • Buffer Space: Changes from 12K to 32K bytes.
  • Index Control Interval Size: Reduce from 3.5K to 1K bytes.

The FILE CAPACITY details illustrate the benefits that will be realised by redefining the file with the CBL TUNED recommendations. These can be excluded from the report with the NOPCAP parameter.

The JCL OVERRIDES are shown for improved sequential processing. These can be excluded from the report with the NOPJCL parameter.

A tuned IDCAMS DEFINE deck could also be produced. See Modelling For Migration example.

Modelling for Migration

Often, planning for new operating systems and/or new disks is necessary long before the appropriate documentaion is available, this is made easy with CBLVCAT's modelling facility.

The output, for the purpose of this example, is deliberately restricted to 1 file only via the KEY=FILE.TO.MODEL parameter.


    CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales                           (OS) VM/CMS=VM03      14.21 FRI 26 SEP 2003    PAGE   1
  o --------------------------------------------------                                --------------------------------------    -------- o

       ** VMXVTUN2 CTL M ***        L=002   2003/09/26 14:13:00      *id *
  o      listcat  dd=CBL111                                                                                                              o
                key=FILE.TO.MODEL
                tune=MVS  dev=3390
  o                                                                                                                                      o

    USERCAT CBL111 (3380)  TYPE      NRECS   PCNT  ---- ALLOC TRACKS ----   FRSP   LMAX  KL,RKP  CISIZE BUFSP EXCPS     TIMESTMP
  o ---------------------  ----      -----   ----    TOTAL   PRIME  SEC     CI CA  ---- /BLK/IMB ------ /IXL  -----     --------         o


  o FILE.TO.MODEL          KSDS     448275 **93.7**  C=140   C=120   C=10    0  1   617V 26,0    14336  32768  58.3K 2003/06/09 21.19.23 o
                                                   VOL1=CBL111
                                         CANDIDATE VOL2=CIS475                                                        ** 318 CI SPLITS**
  o                                                                                                                   ** 054 CA SPLITS** o
                             IX        138 **89.1**      5       4      1          1017           1024  IXL=3  26.1K
                                                   VOL1=CBL111
  o                                      CANDIDATE VOL2=CIS475                                                                           o

        ** SEV 2-05 **   CA SPLITS EXIST
  o     ** SEV 2-08 **   CI SPLITS TOO HIGH (2 PC OF INSERTS)                                                                            o
        ** SEV 2-15 **   34 CYLS CAN BE RECOVERED WHEN TUNED
        ** SEV 2-25 **   INEFFICIENT DATA CISIZE
  o     ** SEV 2-28 **   TUNING FOR DEVICE CHANGE REQUEST                                                                                o
        ** SEV 2-31 **   AVLRECL: DEFINED=617     ESTIMATED=188
         * SEV 1-09 *    FILE GETTING/IS FULL
  o      * SEV 1-18 *    SEC EXTENTS EXIST                                                                                               o

         *** WARN  015 *** LARGE AVLRECL CHANGE
  o                                                                                                                                      o

         CBL TUNED FOR DEV 3390                                                                                  
  o      ----------------------                                                                                                          o
         DATA  (                           -                                                                     
             CISZ         (18432)          - * NEW PHYREC SIZE=18432, CURRENT=7168  (DEV CHANGE)                 
  o          CYLINDERS    (106,14)         - * OPTIMISED FOR DEVICE GEOMETRY                                                             o
             RECORDSIZE   (188,617)        - * DEFINED AVLRECL=617                                               
             BUFFERSPACE  (40960)          ) * 40K MINIMUM FOR DIRECT PROCESSING                                 
  o                                                                                                                                      o
                                             * USING AVLRECL=188    --- FILE CAPACITIES (NRECS) ---              
                                             *             ------ TUNED ------           --- ORIG (ESTD) ---     
  o                                          *             PCNT   PRIME    SEC           PCNT   PRIME    SEC                             o
                                             *             ----   -----    ---           ----   -----    ---     
                                             *  INIT LOAD  100      452K  59.8K           93      401K  33.4K    
  o                                          *       FREE    2     10.3K  1358             2     9120    760                             o
                                             *             ---      ----  -----           --      ----  -----    
                                             *             103      463K  61.1K           95      410K  34.2K    
  o                                          *             ---      ----  -----           --      ----  -----                            o
                                                                                                                 
                                OPTIONAL JCL OVERRIDE FOR SEQ I/O                                                
  o                             ---------------------------------                                                                        o
                                BUFND=5      * (90K)  FAST                                                       
                                BUFND=8      * (144K) URGENT                                                     
  o                             BUFND=23     * (414K) **TURBO**  (BUT WILL IMPACT OTHER WORK)                                            o


  o      *** WARN  001 *** 10 = RETURN CODE FROM CBLVCAT                                                                                 o


  o          ** ** ** ** ** ** ** CBLVCAT IS LICENSED BY COMPUTE (BRIDGEND) LTD +44 (1656) 652222 & 656466 ** ** ** ** ** ** **          o
                                                      ** EXPIRY DATE -- 12 JUN 2004 **

Notes:

  • Tuning is requested for MVS via the TUNE=MVS parameter, the change from 3380 to 3390 disks is indicated via the DEV parameter.

  • The user is able to plan the new operating system and DASD requirements even before a decision to convert is made.

  • The Data CISIZE increases from 14336 to a more efficient 18432, which causes a change in physical record size from 7k to 18k.

  • In addition to tuning for increased track capacity (3390=55k, 3380=46k) the file is tuned to improve performance. The new Allocation of CYL(106 14), ensures that the primary allocation is large enough to accommodate all of the records currently in the file.

  • Tuning for a 3380 would have given the larger value of CYL(127 16). Thus tuning for the new disk device ensures the user does not waste disk space when changing DASD.

IDCAMS DEFINE Output

Continuing from the previous example, your IDCAMS DEFINE decks and job control can be ready and waiting before the new system arrives, simply by adding the DEFINE parameter.

Equally simple is the addition of a 2nd extra parameter (to set CBLVCSW6) which will generate Backup and Restore JCL, using SELCOPY (CBL's main product), around the IDCAMS define deck.

The CBLVCAT output file below shows MVS job control. Equivalent VSE job control is produced when TUNE=VSE is used.


  //CBLDEF01 JOB
  //JOBCAT  DD DSN=CBL111.USER.PROD.CATALOG,DISP=SHR
  //STEP2 EXEC PGM=IDCAMS
  //SYSPRINT DD SYSOUT=*
  //SYSIN DD *
       *** WARN  015 *** LARGE AVLRECL CHANGE
       *** WARN  019 *** SKELETON DECK ONLY - ATTENTION REQUIRED

   /* DEL       FILE.TO.MODEL                                    -    */
   /*  CLUSTER                                                   -    */
   /*  PURGE                                                     -    */
   /*  CATALOG (CBL111.USER.PROD.CATALOG)                             */


   DEF CLUSTER  (NAME (FILE.TO.MODEL)                               /**/ -
           INDEXED                                            /* KSDS */ -
           BUFFERSPACE  (   40960)                                       -
   /*      BUFFERSPACE  (   32768)                                    */ -
           RECORDSIZE   (  188,  617)                                    -
   /*      RECORDSIZE   (  617,  617)                                 */ -
           SPEED                                                         -
           TO           (  99366)                                        -
           NOWRITECHECK                                                  -
           NONSPANNED                                                    -
           FREESPACE    (  0,  1)                                        -
           KEYS         ( 26,   0)                                       -
           NOIMBED                                                       -
           NOREPLICATE                                                   -
           SHAREOPTIONS (2,3)                                            -
           NOERASE                                                       -
           UNORDERED                                                     -
           NOREUSE                                                       -
           USECLASS     (0 P)                                            -
           SUBALLOCATION                                                 -
           NODESTAGEWAIT                                                 -
           STAGE                                                         -
                )                                                        -
       DATA     (NAME (FILE.TO.MODEL.DATA)                               -
           VOLUMES      ('CBL111'                                        -
                         'CBL475'                                        -
                        )                                                -
           CISZ         (18432)                                          -
   /*      CISZ         (14336)                                       */ -
           CYLINDERS    (    106,    14)                                 -
   /*      CYLINDERS    (    120,    10)                              */ -
                )                                                        -
       INDEX    (NAME (FILE.TO.MODEL.INDEX)                              -
           VOLUMES      ('CBL111'                                        -
                         'CBL475'                                        -
                        )                                                -
           CISZ         ( 1024)                                          -
                )                                                        -
       CATALOG (CBL111.USER.PROD.CATALOG)


  /*

Notes:

  • This SYSPUNCH/IJSYSPH output is obtained by the addition of the parameter DEFINE to the control cards for the previous example and contains the IDCAMS DEFINE deck necessary to implement the Modelling recommendations made.

  • The original values are shown in comment form, allowing the user to easily identify any changes that have been made.

  • The DEFINE parameter, used without the TUNEparameter, allows the user to retrieve up to date definitions directly from the catalog, eliminating the possibilty of re-introducing back level attributes.

  • For brevity, the Alternate Index has been excluded from this example (by coding TYPE=K to restrict output to KSDS).

Free space in all VTOCs

Searching for the 'best-fit' extent to locate a dataset or data space can be a time consuming business, but one single report is all you need with CBLVCAT.


   ___________________________________________________________________________________
  |                                                                                  /
  |   CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales    2003/09/26  PAGE   1     \
  | o --------------------------------------------------    ----------  --------     /
  |                                                                                  \
  |        REPORT VTOC    VOLUME  SORTD ALLOC  START  * Sort on ALLOC                /
  | o                                                                                \
  |        LISTVTOC DEV=ALL MERGE            * Freespace over all volume             /
  |                 SUMMARY FREETAB                                                  \
  | o               STOPAFT 100              * 100 largest freespace are             /
  |                                                                                  \
  |                                                                                  /
  | o VOLUME   ALLOC    START                                                        \
  |   ------   -----    -----                                                        /
  |                                                                                  \
  | o CBLT03  154786        2                                                        /
  |   CBLT03  139536   192288                                                        \
  |   CBLT01  118064   213760                                                        /
  | o CBLT03  104098   557542                                                        \
  |   CBLT01   71258   563500                                                        /
  |   CBLT01   20544   691968                                                        \
  | o CBLT01   15650    47138                                                        /
  |   CBLT03   13792   683336                                                        \
  |   CBLT01   12725   634758                                                        /
  |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\

Notes:

  • For MVS systems the DEV=ALL parameter will produce a VTOC report for each DASD device belonging to the esoteric group SYSALLDA.

  • For VSE systems the DEV=ALL parameter will produce a VTOC report for every disk drive that has a current programmer logical unit assignment.

  • The MERGE parameter instructs CBLVCAT to produce a single report, containing the information from all VTOCs.

  • The SORTD ALLOC parameters of the REPORT command request that the output be sorted in descending order of allocation size.

  • The SUMMARY parameter causes only freespace information to be displayed.

  • The STOPAFT parameter ensures that only the 100 largest freespace areas are included in the report.



Advanced Reporting

Totals

Often, reporting on the individual files is not required. Suppressing the reporting of individual files is easy with CBLVCAT.

The example below displays the total allocation for a generic name mask, on a customised LISTVTOC report. However, it should be noted that this feature can be used on standard or customised reports, for Catalogs or VTOCs.


   __________________________________________________________________________________
  |   SPACE ALLOCATED TO TEST FILES ON CBLV03 AND CBLV04    2004/01/23  PAGE   1     \
  | o --------------------------------------------------    ----------  --------     /
  |                                                                                  \
  |        report    vcat   alloct allocp allocs cisize                              /
  | o                                                                                \
  |        listvcat  dd=cblv03   key=TEST   totals merge                             /
  |                  head='SPACE ALLOCATED TO TEST FILES ON CBLV03 AND CBLV04'       \
  | o                                                                                /
  |        listvcat  dd=cblv04   key=TEST   totals                                   \
  |                                                                                  /
  | o                                                                                \
  |                                                                                  /
  |      ALLOC    ALLOC   ALLOC     CISIZE                                           \
  | o    TOTAL    PRIME     SEC     ------                                           /
  |                                                                                  \
  |     130244    73619    2638                                                      /
  | o                                                                                \
  |   CBLVCAT IS LICENSED BY COMPUTE (BRIDGEND) LTD +44 (1656) 652222 & 656466       /
  |                       ** EXPIRY DATE -- 12 JUN 2004 **                           \
  |__________________________________________________________________________________/

Notes:

  • With the MERGE parameter the user is able to obtain totals across multiple catalogs without reporting on the individual VTOCs.

  • The HEAD='string' parameter enables the user to give this type of report a descriptive heading.

  • Only sensible totals are displayed i.e. ALLOCT, ALLOCP, ALLOCS, ALLOCU, SPLITCA, SPLITCI and ALLOC. The CATALOG name can also be displayed. All other specified report items are left blank, but their column headings are printed, see CISIZE above.

Advanced Customised Reporting

By selecting various fields from the wide choice available, it is possible to construct reports that concentrate on one particular area of interest.

An Advanced customised report can be an invaluable tool to the more experienced users, who prefer to apply their local knowledge to the information available from the catalog statistics.

The control cards below demonstrate some of the additional parameters available for customised reporting, which are not displayed on the standard report.


  REPORT VCAT  DSN 25  EXCPS RECSTATS 28   IXL CISIZE BUFSP 12    NSEC
  LISTCAT  DDNAME=CBLV93
           TYPE=K               * Select:  KSDS only
           KEY=A.DEMO           *          DSN's starting 'A.DEMO' only.




   ______________________________________________________________________________________________
  |                                                                                             /
  |   USERCAT CBLV93 (3390)    EXCPS   -- RECORD STATISTICS --     IXL  CISIZE  BUFSP      NSEC \
  | o ---------------------    -----     DEL   INS   UPD   INP     ---  ------  -----      ---- /
  |                                                                                             \
  |                                                                                             /
  | o A.DEMO.HIGH.EXCPS.INP     17.2K      1  9760        9779           2048   16000        39 \
  |                             6253                                 3    512                   /
  |                                                                                             \
  | o A.DEMO.ORDINARY.1          159       3     1     2   197K          1536    4096           /
  |                              165                                 1    512                   \
  |                                                                                             /
  | o A.DEMO.ORDINARY.2           60                   2    39           1536    4096           \
  |                               46                                 1    512                   /
  |                                                                                             \
  | o A.DEMO.ORDINARY.3         2075       9     5  1424  18.7K          1536    4096           /
  |                              649                                 1    512                   \
  |                                                                                             /
  | o A.DEMO.ORDINARY.4         2674       1  4415           1           2048   16000        11 \
  |                              939                                 2    512                   /
  |                                                                                             \
  | o A.DEMO.ORDINARY.5         1646       9     4  1047  8738           1536    4096           /
  |                              591                                 1    512                   \
  |                                                                                             /
  | o A.DEMO.MORE.IX.EXCPS      2475K     18   448   563K 1806K          3072   14336         5 \
  |                             6830K                                2   1536                   /
  |                                                                                             \
  | o A.DEMO.XYZ.1                12K     21     3  10.9K 67.8K          1536    4096           /
  |                              579                                 1    512                   \
  |                                                                                             /
  | o A.DEMO.XYZ.2               225             5     2   287           1536    4096           \
  |                              231                                 1    512                   /
  |                                                                                             \
  | o A.DEMO.XYZ.3               440       9     7    64  2028           1536    4096           /
  |                              187                                 1    512                   \
  |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\_/

Notes:

  • The user can select from 59 Catalog and 15 VTOC items to build reports of salient information.
  • The maximium report width is 250 characters.
  • This report shows catalog information that relates to online response or batch processing times.
  • Running with the SUBSET SEV=3 would have selected some of these files as having potential problems. See the Monitoring example above.

Orphaned Entries

There is not always a match between the BCS and VVDS entries, as Catalogs can be removed without the appropriate entry in the VVDS being deleted. Mis-matches can also occur as a result of a failure.

If the VVDS contains entries not reflected in the BCS, then these orphaned entries should be deleleted as part of a manual housekeeping operation in order to reduce overheads. Such housekeeping, of course, should be conducted by experienced personnel only.


   ___________________________________________________________________________________
  |                                                                                  /
  |   CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales    2003/09/26  PAGE   1     \
  | o --------------------------------------------------    ----------  --------     /
  |                                                                                  \
  |        REPORT VCAT   SORT CATALOG 30  COMPONENT 30                               /
  | o                                                                                \
  |        LISTVCAT VVDS=CB9043                                                      /
  |                                                                                  \
  | o                                                                                /
  |   CATALOG                       COMPONENT                                        \
  |   -------                       ---------                                        /
  | o                                                                                \
  |                                 SYS1.VVDS.VCB9043                                /
  |   CATALOG.MASTER01              CNM.CBL1.DSIKPNL.INDEX                           \
  | o CATALOG.MASTER01              CNM.CBL1.DSILOGP.DATA                            /
  |   CATALOG.MASTER01              CNM.CBL1.DSILOGP.INDEX                           \
  |   CATALOG.MASTER01              CNM.CBL1.DSILOGS.DATA                            /
  | o CATALOG.MASTER01              CNM.CBL1.DSILOGS.INDEX                           \
  |   CATALOG.MASTER01              CNM.CBL1.DSISVRT.DATA                            /
  |   CATALOG.MASTER01              CNM.CBL1.DSISVRT.INDEX                           \
  | o CATALOG.MASTER01              CNM.CBL1.DSITRCP.DATA                            /
  |   CATALOG.MASTER01              CNM.CBL1.DSITRCP.INDEX                           \
  |   CATALOG.MASTER01              CNM.CBL1.DSITRCS.DATA                            /
  | o CATALOG.MASTER01              CNM.CBL1.DSITRCS.INDEX                           \
  |   SYS1.ICFCAT.OLDCAT            NOT.NEEDED01.DATA                                /
  |   SYS1.ICFCAT.OLDCAT            NOT.NEEDED01.INDEX                               \
  | o SYS1.ICFCAT.OLDCAT            NOT.NEEDED02.DATA                                /
  |   SYS1.ICFCAT.OLDCAT            NOT.NEEDED03.DATA                                \
  |   SYS1.ICFCAT.OLDCAT            NOT.NEEDED04.DATA                                /
  | o SYS1.ICFCAT.OLDCAT            NOT.NEEDED05.DATA                                \
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.COPY.DFHNTRA.DATA                   /
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.COPY.DFHTEMP.DATA                   \
  | o SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.COPY.RSD.DATA                       /
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.COPY.RSD.INDEX                      \
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.DFHCSD.DATA                         /
  | o SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.DFHCSD.INDEX                        \
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.DFHNTRA.DATA                        /
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.DFHTEMP.DATA                        \
  | o SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.RSD.DATA                            /
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.RSD.INDEX                           \
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.TMON.ALERTA.DATA                    /
  | o SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.TMON.ALERTB.DATA                    \
  \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Notes:

  • The example above illustrates the use of CBLVCAT to obtain a list of the component names and catalogs referenced by the VVDS. If any of the catalogs referenced (e.g. SYS1.ICFCAT.OLDCAT) no longer exist then orphaned entries exist in the VVDS.

  • Reporting on the VVDS helps the user to detect orphaned entries, provided he knows which catalogs have been removed. The IDCAMS command DELETE VVR can then be used to delete VVR (VSAM Volume Record) entries from the VVDS and the VTOC.

Multiple displays, Subset & Sort

There is not always a match between the BCS and VVDS entries, as Catalogs can be removed without the appropriate entry in the VVDS being deleted. Mis-matches can also occur as a result of a failure.

If the VVDS contains entries not reflected in the BCS, then these orphaned entries should be deleleted as part of a manual housekeeping operation in order to reduce overheads. Such housekeeping, of course, should be conducted by experienced personnel only.


   ___________________________________________________________________________________
  |                                                                                  /
  |   CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales    2003/09/26  PAGE   1     \
  | o --------------------------------------------------    ----------  --------     /
  |                                                                                  \
  |        REPORT VCAT   SORT CATALOG 30  COMPONENT 30                               /
  | o                                                                                \
  |        LISTVCAT VVDS=CB9043                                                      /
  |                                                                                  \
  | o                                                                                /
  |   CATALOG                       COMPONENT                                        \
  |   -------                       ---------                                        /
  | o                                                                                \
  |                                 SYS1.VVDS.VCB9043                                /
  |   CATALOG.MASTER01              CNM.CBL1.DSIKPNL.INDEX                           \
  | o CATALOG.MASTER01              CNM.CBL1.DSILOGP.DATA                            /
  |   CATALOG.MASTER01              CNM.CBL1.DSILOGP.INDEX                           \
  |   CATALOG.MASTER01              CNM.CBL1.DSILOGS.DATA                            /
  | o CATALOG.MASTER01              CNM.CBL1.DSILOGS.INDEX                           \
  |   CATALOG.MASTER01              CNM.CBL1.DSISVRT.DATA                            /
  |   CATALOG.MASTER01              CNM.CBL1.DSISVRT.INDEX                           \
  | o CATALOG.MASTER01              CNM.CBL1.DSITRCP.DATA                            /
  |   CATALOG.MASTER01              CNM.CBL1.DSITRCP.INDEX                           \
  |   CATALOG.MASTER01              CNM.CBL1.DSITRCS.DATA                            /
  | o CATALOG.MASTER01              CNM.CBL1.DSITRCS.INDEX                           \
  |   SYS1.ICFCAT.OLDCAT            NOT.NEEDED01.DATA                                /
  |   SYS1.ICFCAT.OLDCAT            NOT.NEEDED01.INDEX                               \
  | o SYS1.ICFCAT.OLDCAT            NOT.NEEDED02.DATA                                /
  |   SYS1.ICFCAT.OLDCAT            NOT.NEEDED03.DATA                                \
  |   SYS1.ICFCAT.OLDCAT            NOT.NEEDED04.DATA                                /
  | o SYS1.ICFCAT.OLDCAT            NOT.NEEDED05.DATA                                \
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.COPY.DFHNTRA.DATA                   /
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.COPY.DFHTEMP.DATA                   \
  | o SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.COPY.RSD.DATA                       /
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.COPY.RSD.INDEX                      \
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.DFHCSD.DATA                         /
  | o SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.DFHCSD.INDEX                        \
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.DFHNTRA.DATA                        /
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.DFHTEMP.DATA                        \
  | o SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.RSD.DATA                            /
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.RSD.INDEX                           \
  |   SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.TMON.ALERTA.DATA                    /
  | o SYS1.ICFCAT.LIVECAT           CICSPV.PRISM.TMON.ALERTB.DATA                    \
  \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Notes:

  • The example above illustrates the use of CBLVCAT to obtain a list of the component names and catalogs referenced by the VVDS. If any of the catalogs referenced (e.g. SYS1.ICFCAT.OLDCAT) no longer exist then orphaned entries exist in the VVDS.

  • Reporting on the VVDS helps the user to detect orphaned entries, provided they know which catalogs have been removed. The IDCAMS command DELETE VVR can then be used to delete VVR (VSAM Volume Record) entries from the VVDS and the VTOC.

Combined Multiple VTOCs & Catalogs

The final example illustrates the flexibility of CBLVCAT, by combining output from all catalogs and all VTOCs in the system, and using a subset to select only files you require.

We will produce a single report, over the whole system, on all DSN's which contain the string 'TEST' anywhere in its name. This type of report could be part of a housekeeping operation, for instance.

This example uses the REF=ALL parameter which is only available to MVS ICF users. VSAM users should specify each catalog separately.


   ___________________________________________________________________________________
  |                                                                                  /
  |   CBLVCAT REL 2.10 AT COMPUTE (Bridgend) Ltd - Wales         2003/09/26 15:03  PA\
  | o --------------------------------------------------         ----------------  --/
  |                                                                                  \
  |        REPORT VTOC       DSN 30  VOLUME 10                                       /
  | o                                                                                \
  |        REPORT VCAT  SORT DSN 30  VOLUME 10  CATALOG  * Sort by DSN.              /
  |                                                                                  \
  | o      LISTVTOC DEV=ALL    MERGE  * 1st MERGE to combine all VTOC REPORTS.       /
  |                 KEY=/TEST  MERGE  * 2nd MERGE to combine with next command.      \
  |                                                                                  /
  | o      LISTVCAT REF=ALL MERGE  KEY=/TEST                                         \
  |                                                                                  /
  |                                                                                  \
  | o DATASET NAME                  VOLUME    CATALOG                                /
  |   ------------                  ------    -------                                \
  |                                                                                  /
  | o BUZZ.TESTHARN.LINEAR          CBLI04    ICFCAT.CBLI04                          \
  |   GD.TEST.PRC0                  CBLI02    CAT.ICF.MASTCAT.CBLI02                 /
  |   GD.TEST.TBL0                  CBLI02    CAT.ICF.MASTCAT.CBLI02                 \
  | o INPUT.KKK.TEST2 F5            CBLT02                                           /
  |   MASTERFIL TEST2F5             CBLT02                                           \
  |   PAGE.VCBLI02.TEST01           CBLI02    CAT.ICF.MASTCAT.CBLI02                 /
  | o PRODN TEST C                  CBLT01                                           \
  |   PRODN TEST T                  CBLT01                                           /
  |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\

Notes:

  • For MVS systems the DEV=ALL parameter will produce a VTOC report for each DASD device belonging to the esoteric group SYSALLDA.

  • For VSE systems the DEV=ALL parameter will produce a VTOC report for every disk drive that has a current programmer logical unit assignment.

  • The REF=ALL parameter produces a report for all catalogs. Non ICF users must specify each catalog with separate LISTVCAT commands.

  • Use of the three MERGE parameters causes one single combined report to be created.

  • The user should note that if the files required are not system wide but contained in few known catalogs and VTOCS, then merging separate LISTVCAT and LISTVTOC commands is more efficient than scanning all catalogs and VTOCS.

  • VTOC output of course will have no catalog name.