                           A S K V T O C


      This routine can be recalled in a Cobol or Assembler program in MVS
environment; with a physical file name in input and corresponding DASD volume,
returns some file characteristics, as are found in VTOC.

      To recall this routine in COBOL:

      CALL 'ASKVTOC' USING RC DSNAME VOL AREAOUT

      In ASSEMBLER:

      CALL ASKVTOC,(RC,DSNAME,VOL,AREAOUT),VL

      Variables mean this:
      RC:      return code.
      DSNAME:  physical file name (vsam or pds too), in input 
      VOL:     volume name in which there is the file, in input 
      AREAOUT: 80 bytes con with data in output

      Cobol variables definition are:

          RC         PIC    S9(7)   COMP.
          DSNAME     PIC     X(44).
          VOL        PIC     X(6).
          AREAOUT.
              TRACKPRI   PIC     X(6).
                 ZTRKPRI  REDEFINES TRACKPRI    PIC    9(6).
              TRACKSEC   PIC     X(6).
                 ZTRKSEC  REDEFINES TRACKSEC    PIC    9(6).
              DSORG      PIC     X(4).
              RECFM      PIC     X(4).
              NUMEXTENT  PIC     X(4).
                 ZNUMEXT  REDEFINES NUMEXTENT   PIC    9(4).
              LRECL      PIC     X(6).
                 ZLRECL   REDEFINES LRECL       PIC    9(6).
              BLKSIZE    PIC     X(6).
                 ZBLKSIZE REDEFINES BLKSIZE     PIC    9(6).
              SMSFLAG    PIC     X(4).
              OCCUPAZ    PIC     X(4).
                 ZOCCUPAZ REDEFINES OCCUPAZ     PIC    9(4).
              DATACRE    PIC     X(8).
              DATAEXP    PIC     X(8).
              DATAACC    PIC     X(8).
              FILLER     PIC     X(12).

      REDEFINES of some variables are useful if ZONED values are
      required instead of numbers in edited form.

      Assembler variables definition are:

              RC       DS  F
              DSNAME   DS  CL44
              VOLSER   DS  CL6

              AREAOUT  DS 0CL80
              ZTRKPRI  DS 0ZL6
              TRACKPRI DS  CL6
              ZTRKSEC  DS 0ZL6
              TRACKSEC DS  CL6
              DSORG    DS  CL4
              RECFM    DS  CL4
              ZNUMEXT  DS 0ZL4
              NUMEXT   DS  CL4
              ZLRECL   DS 0ZL6
              LRECL    DS  CL6
              ZBLKSIZE DS 0ZL6
              BLKSIZE  DS  CL6
              SMSFLAG  DS  CL4
              ZOCCUPAZ DS 0ZL4
              OCCUPAZ  DS  CL4
              DATACRE  DS  CL8
              DATAEXP  DS  CL8
              DATAACC  DS  CL8
                       DS  CL12

      This is the mean of the output variables:

TRACKPRI - Track numbers of primary extent (is supposed that there are
           15 tracks / cylinder, i.e. DASD is a 3380 or a 3390)
TRACKSEC - Track numbers of secondary extent, if present
DSORG    - Organization of the file: PS for sequential files
                                     PO for partitioned libraries
                                     VS for VSAM files
                                     IS for ISAM files
RECFM    - Record Format; for example: FB, U, FBA etc.
NUMEXT   - Number of extents, that is primary extent plus secondary 
           extents
LRECL    - Record length
BLKSIZE  - Block size
SMSFLAG  - Flag if file is SMS managed
OCCUPAZ  - Percentual of filling
DATACRE  - Creation Date (in form  YY.DDD)
DATAEXP  - Expire Date (in form YY.DDD, is 00.000 if not expire)
DATAACC  - Last access Date.


      Numeric values are in edited form for default, that is are integer
numbers right aligned preceded by blanks; if you want this number in
zoned format you must fill RC variable with -1 value before recall
ASKVTOC.

      If there is a error (for example file or volume not present)
Return Code is different from 0 and variable AREAOUT contains a short
explanation of error.

      Is not possible to use this routine in a CICS program.

