Catalog File Info to CSV File
MFCATXPT - The COBOL Source Code
http://www.simotime.com
When technology complements business    Copyright © 1987-2010  SimoTime Enterprises  All Rights Reserved
  Table of Contents Version 10.03.20 
  Introduction
 
  What It Does
  How to Use
  Sample Output
  The COBOL Source Code
  Summary
 
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages
  Glossary of Terms
  Comments or Suggestions
  About SimoTime

Introduction
(Next) (Previous) (Table-of-Contents)

This document provides a listing of the COBOL source code for viewing. Additional information about this program may be obtained by sending an e-mail to: helpdesk@simotime.com

MFCATXPT, What It Does
(Next) (Previous) (Table-of-Contents)

This program provides presentation alternatives for reviewing or sharing the contents of the Micro Focus catalog. The MFCATXPT program will read a CATALOG.DAT file created by Micro Focus and produce a Comma Separated Values (or CSV) file with data file information. The information included in the CSV file may be easily imported into an Excel spreadsheet. This information includes the Data Set Name (DSN), Record Format (RECFM), Data Set Organization (DSORG), the minimum and maximum record length, the key position and key length and other information.

MFCATXPT, How To Use
(Next) (Previous) (Table-of-Contents)

The following command file (ezCATXPORT.CMD) describes how to use the MFCATXPT program.

@echo OFF
rem  *
rem  * ESA, Enterprise Server Administration
rem  *      Catalog Export Utility
rem  *
rem  * CATGET01 identifies the CATALOG.DAT file that will be used as input
rem  * CATTXT01 identifies the ASCII/Text file to be used as output
rem  *
     call ezSetEnv
     set CATGET01=%BaseLib1%\DataLibA\CATALOG.DAT
     set CATCSV01=%BaseLib1%\DataLibA\Wrk1\CATALOG_XPORT.CSV
rem  *
     echo *******************************************************ezCATXPORT
     echo Starting JobName ezCATXPORT, User is %USERNAME%
rem  *
     run MFCATXPT
     if not "%ERRORLEVEL%" == "0" goto EOJNOK
     echo The Catalog Export Info will be displayed in a separate window...
     START NotePad %CATCSV01%
rem  *
:EOJAOK
     echo Finished JobName ezCATXPORT, User is %USERNAME%
     goto END
rem  *
:EOJNOK
     echo ABENDING JobName ezCATXPORT, User is %USERNAME%
rem  *
:END

MFCATXPT, Sample Output
(Next) (Previous) (Table-of-Contents)

The following describes the format of the records within the CSV File

Field Number Description
1. This is the record identifier and should always be "01" for data files.
2. This is the Data Set Name (or DSN).
3. This is the DD name
4. This is the Data Set Organization (or DSORG)
5. This is the Record Format (or RECFM)
6. This is the minimum record length
7. This is the maximum record length
8. This is the key starting position within the record
9. This is the length of the key field

The following is an example of the output created by the Catalog Export Utility.

01,SIMOTIME.DATA.CARD0080,PS,F,00080,00080,,,
01,SIMOTIME.DATA.CASEGET1,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.CUSRE512,PS,FB,00512,00512,,,
01,SIMOTIME.DATA.CUST0080,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.CUSTMAST,VSAM,KS,00012,00512,00001,00012,
01,SIMOTIME.DATA.DATECARD,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.FNAMRSF1,PS,FB,00032,00032,,,
01,SIMOTIME.DATA.FNAMRSM1,PS,FB,00032,00032,,,
01,SIMOTIME.DATA.GDGROUP1,GDG,?,00000,00000,,,
01,SIMOTIME.DATA.GDMODEL1,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.ITEMMAST,VSAM,KS,00012,00512,00001,00012,
01,SIMOTIME.DATA.ITEMSQ01,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.JUSTGET1,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.LNAMRSEQ,PS,FB,00032,00032,,,
01,SIMOTIME.DATA.MAILSORT,PS,FB,00244,00244,,,
01,SIMOTIME.DATA.MAILTEMP,PS,FB,00244,00244,,,
01,SIMOTIME.DATA.MAILTEXT,PS,FB,00192,00192,,,
01,SIMOTIME.DATA.OBF1CUST,VSAM,KS,00012,00512,00001,00012,
01,SIMOTIME.DATA.OBFCTL80,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.POSTRSEQ,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.QSAM0080,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.RA12GET1,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.SADRRSEQ,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.TXTNGET1,PS,FB,00080,00080,,,
01,SIMOTIME.DATA.VKSD0080,VSAM,KS,00006,00080,00001,00006,
01,SIMOTIME.ESDS.ESD32KX1,VSAM,ES,00000,32760,,,
01,SIMOTIME.ESDS.ESDSC01K,VSAM,ES,00000,01024,,,
01,SIMOTIME.ESDS.ESDSC128,VSAM,ES,00128,00128,,,
01,SIMOTIME.PDS.JCL,PO,LSEQ,00080,00080,,,
01,SIMOTIME.PDS.PARMLIB1,PO,LSEQ,00080,00080,,,
01,SIMOTIME.PDS.PROCLIB1,PO,LSEQ,00080,00080,,,
01,SIMOTIME.UTIL.APMASTER,VSAM,KS,00018,01024,00001,00018,
01,SIMOTIME.UTIL.FPMASTER,VSAM,KS,00056,00512,00003,00054,
01,SIMOTIME.UTIL.FPRCSVD1,PS,FB,00512,00512,,,
01,SIMOTIME.UTIL.FPRFFLD1,PS,FB,00512,00512,,,
01,SIMOTIME.UTIL.MSGXFILE,PS,FB,00080,00080,,,
01,SIMOTIME.UTIL.MSGXKSDS,VSAM,KS,00004,00080,00001,00004,
01,SIMOTIME.UTIL.SUBTRACE,PS,FB,00080,00080,,,

The COBOL Source Code
(Next) (Previous) (Table-of-Contents)

The following (MFCATXPT.CBL) is the COBOL Source Code.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    MFCATXPT.
       AUTHOR.        SIMOTIME ENTERPRISES.
      *****************************************************************
      * Copyright (C) 1994-2010 SimoTime Enterprises, LLC.            *
      *                                                               *
      * All rights reserved.  Unpublished, all rights reserved under  *
      * copyright law and international treaty.  Use of a copyright   *
      * notice is precautionary only does not imply publication or    *
      * disclosure.  This software contains confidential information  *
      * and trade secrets of SimoTime Enterprises, LLC. No part of    *
      * this program or publication may be reproduced, transmitted,   *
      * transcribed, stored in a retrieval system, or translated into *
      * any language or computer language, in any form or by any      *
      * means, electronic, mechanical, magnetic, optical, chemical,   *
      * manual or otherwise, without the prior written permission of: *
      *                                                               *
      * SimoTime Enterprises                                          *
      * 15 Carnoustie Drive                                           *
      * Novato, CA 94949-5849                                         *
      * 415.883.6565                                                  *
      *                                                               *
      * RESTRICTED RIGHTS LEGEND                                      *
      * Use, duplication, or disclosure by the Government is subject  *
      * to restrictions as set forth in subparagraph (c)(1)(ii) of    *
      * the Rights in Technical Data and Computer Software clause at  *
      * DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of          *
      * Commercial  Computer Software - Restricted Rights  at 48      *
      * CFR 52.227-19, as applicable.  Contact SimoTime Enterprises,  *
      * 15 Carnoustie Drive, Novato, CA 94949-5849.                   *
      *                                                               *
      *****************************************************************
      *      This program is provided by SimoTime Enterprises         *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *                                                               *
      *****************************************************************
      *
      * MAINTENANCE
      * -----------
      * 1989/02/27 Simmons, Created program.
      *
      *****************************************************************
      * Source Member: MFCATXPT.CBL
      * Copy Files:    None
      * Calls to:      None
      *****************************************************************
      * This program will read the Micro Focus CATALOG.DAT File and
      * write file information to a CSV File.
      *
      *                                   Record    Record     Key
      *  Function  Name     Organization  Format    Max-Min  Pos-Len
      *  INPUT     CATGET01 INDEXED       VARIABLE   10476    00001
      *                                              00476    00052
      *  OUTPUT    CATCSV01 ASCII/CRLF    VARIABLE   01024
      *
      *****************************************************************
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT CATGET01-FILE  ASSIGN TO       CATGET01
                  ORGANIZATION  IS INDEXED
                  ACCESS MODE   IS SEQUENTIAL
                  RECORD KEY    IS CATGET01-KEY-01
                  ALTERNATE KEY is CATGET01-ALT-01 with duplicates
                  FILE STATUS   IS CATGET01-STATUS.
           SELECT CATCSV01-FILE  ASSIGN TO       CATCSV01
                  ORGANIZATION  IS LINE SEQUENTIAL
                  ACCESS MODE   IS SEQUENTIAL
                  FILE STATUS   IS CATCSV01-STATUS.

      *****************************************************************
       DATA DIVISION.
       FILE SECTION.
       FD  CATGET01-FILE
           DATA RECORD    IS CATGET01-REC
           RECORDING MODE IS V
           RECORD VARYING FROM 00476 TO 10476
           DEPENDING ON CATGET01-LRECL
           .

       01  CATGET01-REC.
           05  CATGET01-KEY-01  PIC X(00052).
           05  CATGET01-ALT-01  PIC X(00260).
           05  CATGET01-DATA-01 PIC X(10164).

       FD  CATCSV01-FILE
           DATA RECORD    IS CATCSV01-REC
           .
       01  CATCSV01-REC.
           05  CATCSV01-DATA-01 PIC X(01024).

      *****************************************************************
       WORKING-STORAGE SECTION.
       01  SIM-TITLE.
           05  T1 pic X(11) value '* MFCATXPT '.
           05  T2 pic X(34) value 'Export File Properties to CSV File'.
           05  T3 pic X(10) value ' v06.01.01'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* MFCATXPT '.
           05  C2 pic X(20) value 'Copyright 1987-2010 '.
           05  C3 pic X(28) value '  SimoTime Enterprises, LLC '.
           05  C4 pic X(20) value ' All Rights Reserved'.

       01  CATGET01-STATUS.
           05  CATGET01-STATUS-L     pic X.
           05  CATGET01-STATUS-R     pic X.
       01  CATGET01-EOF              pic X       value 'N'.
       01  CATGET01-OPEN-FLAG        pic X       value 'C'.

       01  CATCSV01-STATUS.
           05  CATCSV01-STATUS-L     pic X.
           05  CATCSV01-STATUS-R     pic X.
       01  CATCSV01-EOF              pic X       value 'N'.
       01  CATCSV01-OPEN-FLAG        pic X       value 'C'.

       01  CATGET01-LRECL    pic 9(5)    value 10476.
       01  CATCSV01-LRECL    pic 9(5)    value 01024.

      *****************************************************************
      * The following buffers are used to create a four-byte status   *
      * code that may be displayed.                                   *
      *****************************************************************
       01  IO-STATUS.
           05  IO-STAT1            pic X.
           05  IO-STAT2            pic X.
       01  IO-STATUS-04.
           05  IO-STATUS-0401      pic 9     value 0.
           05  IO-STATUS-0403      pic 999   value 0.
       01  TWO-BYTES-BINARY        pic 9(4)  BINARY.
       01  TWO-BYTES-ALPHA         redefines TWO-BYTES-BINARY.
           05  TWO-BYTES-LEFT      pic X.
           05  TWO-BYTES-RIGHT     pic X.

      *****************************************************************
      * Message Buffer used by the Z-DISPLAY-MESSAGE-TEXT routine.    *
      *****************************************************************
       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER      pic X(11)   value '* MFCATXPT '.
           05  MESSAGE-TEXT.
               10  MESSAGE-TEXT-1  pic X(68)   value SPACES.
               10  MESSAGE-TEXT-2  pic X(188)  value SPACES.

      *****************************************************************
       01  PROGRAM-NAME            pic X(8)    value 'MFCATXPT'.

       01  APPL-RESULT             pic S9(9)   comp.
           88  APPL-AOK            value 0.
           88  APPL-EOF            value 16.

       01  IX-P1                pic 9(9)       value 0.
       01  IX-L1                pic 9(9)       value 0.
       01  DELIMITER-BYTE       pic X          value ','.
       01  O-FLAG               pic X(3)       value 'CSV'.
       01  SELECT-FLAG          pic X          value 'N'.

       01  NUM-05-ALPHA.
           05  NUM-05-VALUE    pic 9(5)        value 0.

       01  CATGET01-TOTAL.
           05  CATGET01-RDR  pic 9(9)  value 0.
           05  filler        pic X(3)  value ' - '.
           05  filler        pic X(23) value 'Line count for CATGET01'.
       01  CATCSV01-TOTAL.
           05  CATCSV01-ADD  pic 9(9)  value 0.
           05  filler        pic X(3)  value ' - '.
           05  filler        pic X(23) value 'Line count for CATCSV01'.

       COPY MVSCAT02.

      *****************************************************************
       PROCEDURE DIVISION.
           perform Z-POST-COPYRIGHT
           perform CATGET01-OPEN
           perform CATCSV01-OPEN

           perform until CATGET01-STATUS not = '00'
               perform CATGET01-READ
               if  CATGET01-STATUS = '00'
                   add 1 to CATGET01-RDR
                   move CATGET01-REC to CATLG-RECORD-01
                   perform POSSIBLE-SELECT
                   if  SELECT-FLAG = 'Y'
                       perform BUILD-OUTPUT-RECORD
                       perform CATCSV01-WRITE
                       if  CATCSV01-STATUS = '00'
                           add 1 to CATCSV01-ADD
                       end-if
                   end-if
               end-if
           end-perform

           move CATGET01-TOTAL to MESSAGE-TEXT
           perform Z-DISPLAY-MESSAGE-TEXT

           move CATCSV01-TOTAL to MESSAGE-TEXT
           perform Z-DISPLAY-MESSAGE-TEXT

           if  APPL-EOF
               move 'is Complete...' to MESSAGE-TEXT
           else
               move 'is ABENDING...' to MESSAGE-TEXT
           end-if
           perform Z-DISPLAY-MESSAGE-TEXT

           perform CATCSV01-CLOSE
           perform CATGET01-CLOSE
           GOBACK.

      *****************************************************************
       BUILD-OUTPUT-RECORD.
      *>   Extract CALL process...
           add 1 to ZERO giving IX-P1
           move all SPACES to CATCSV01-REC
      *    String Move...
           add 2 to ZERO giving IX-L1
           move '01' to CATCSV01-REC(IX-P1:IX-L1)
           perform CALCULATE-NEXT-POSITION
      *    String Move...
           add 00052 to ZERO giving IX-L1
           move CATLG-DSN to CATCSV01-REC(IX-P1:IX-L1)
           perform CALCULATE-NEXT-POSITION
      *    String Move...
           add length of CATLG-DSORG to ZERO giving IX-L1
           move CATLG-DSORG to CATCSV01-REC(IX-P1:IX-L1)
           perform CALCULATE-NEXT-POSITION
      *    String Move...
           add length of CATLG-RECFM to ZERO giving IX-L1
           move CATLG-RECFM to CATCSV01-REC(IX-P1:IX-L1)
           perform CALCULATE-NEXT-POSITION
      *    String Move...
           add 5 to ZERO giving IX-L1
           add CATLG-LRECL-MIN to ZERO giving NUM-05-VALUE
           move NUM-05-ALPHA to CATCSV01-REC(IX-P1:IX-L1)
           perform CALCULATE-NEXT-POSITION
      *    String Move...
           add 5 to ZERO giving IX-L1
           add CATLG-LRECL-MAX to ZERO giving NUM-05-VALUE
           move NUM-05-ALPHA to CATCSV01-REC(IX-P1:IX-L1)
           perform CALCULATE-NEXT-POSITION
      *    String Move...
           add 5 to ZERO giving IX-L1
           if  CATLG-RECFM = 'KS'
               add CATLG-VSAM-KEY-OFFSET to 1 giving NUM-05-VALUE
               move NUM-05-ALPHA to CATCSV01-REC(IX-P1:IX-L1)
           else
               move SPACES to CATCSV01-REC(IX-P1:IX-L1)
           end-if
           perform CALCULATE-NEXT-POSITION
      *    String Move...
           add 5 to ZERO giving IX-L1
           if  CATLG-RECFM = 'KS'
               add CATLG-VSAM-KEY-LENGTH to ZERO giving NUM-05-VALUE
               move NUM-05-ALPHA to CATCSV01-REC(IX-P1:IX-L1)
           else
               move SPACES to CATCSV01-REC(IX-P1:IX-L1)
           end-if
           perform CALCULATE-NEXT-POSITION
           exit.
      *
      *****************************************************************
       CALCULATE-NEXT-POSITION.
           if  O-FLAG = 'CSV'
               add IX-L1 to IX-P1
               if  IX-P1 > 1
                   perform until CATCSV01-REC(IX-P1 - 1:1) not = SPACE
                              or IX-P1 < 1
                     subtract 1 from IX-P1
                   end-perform
               end-if
               move DELIMITER-BYTE to CATCSV01-REC(IX-P1:1)
               add 1 to IX-P1
           else
               add IX-L1 to IX-P1
           end-if
           exit.
           add 01024 to ZERO giving CATCSV01-LRECL
           exit.
      *
      *****************************************************************
       POSSIBLE-SELECT.
           move 'N' to SELECT-FLAG
      *    Eliminate Spool FIle ENtryies
           if  CATLG-CATALOGED not = 'S'
               if  CATLG-DSORG = 'PDSM'
               or                'PO  '
               or                'PS  '
               or                'GDG '
               or                'IS  '
                   move 'Y' to SELECT-FLAG
               end-if
               if  CATLG-DSORG = 'VSAM'
               and CATLG-EXTENDED-TYPE = 'C'
                   move 'Y' to SELECT-FLAG
               end-if
           end-if
           exit.

      *****************************************************************
      * I/O Routines for the INPUT File...                            *
      *****************************************************************
       CATGET01-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close CATGET01-FILE
           if  CATGET01-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'CLOSE Failure with CATGET01' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move CATGET01-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       CATGET01-READ.
           read CATGET01-FILE
           if  CATGET01-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               if  CATGET01-STATUS = '10'
                   add 16 to ZERO giving APPL-RESULT
               else
                   add 12 to ZERO giving APPL-RESULT
               end-if
           end-if
           if  APPL-AOK
               CONTINUE
           else
               if  APPL-EOF
                   move 'Y' to CATGET01-EOF
               else
                   move 'READ Failure with CATGET01' to MESSAGE-TEXT
                   perform Z-DISPLAY-MESSAGE-TEXT
                   move CATGET01-STATUS to IO-STATUS
                   perform Z-DISPLAY-IO-STATUS
                   perform Z-ABEND-PROGRAM
               end-if
           end-if
           exit.
      *---------------------------------------------------------------*
       CATGET01-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open input CATGET01-FILE
           if  CATGET01-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to CATGET01-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with CATGET01' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move CATGET01-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.

      *****************************************************************
      * I/O Routines for the OUTPUT File...                           *
      *****************************************************************
       CATCSV01-WRITE.
           if  CATCSV01-OPEN-FLAG = 'C'
               perform CATCSV01-OPEN
           end-if
           write CATCSV01-REC
           if  CATCSV01-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               if  CATCSV01-STATUS = '10'
                   add 16 to ZERO giving APPL-RESULT
               else
                   add 12 to ZERO giving APPL-RESULT
               end-if
           end-if.
           if  APPL-AOK
               CONTINUE
           else
               move 'WRITE Failure with CATCSV01' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move CATCSV01-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       CATCSV01-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open OUTPUT CATCSV01-FILE
           if  CATCSV01-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to CATCSV01-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with CATCSV01' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move CATCSV01-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       CATCSV01-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close CATCSV01-FILE
           if  CATCSV01-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'C' to CATCSV01-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'CLOSE Failure with CATCSV01' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move CATCSV01-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.

      *****************************************************************
      * The following Z-ROUTINES provide administrative functions     *
      * for this program.                                             *
      *****************************************************************
      * ABEND the program, post a message to the console and issue    *
      * a STOP RUN.                                                   *
      *****************************************************************
       Z-ABEND-PROGRAM.
           if  MESSAGE-TEXT not = SPACES
               perform Z-DISPLAY-MESSAGE-TEXT
           end-if
           move 'PROGRAM-IS-ABENDING...'  to MESSAGE-TEXT
           perform Z-DISPLAY-MESSAGE-TEXT
           add 12 to ZERO giving RETURN-CODE
           STOP RUN.
      *    exit.

      *****************************************************************
      * Display CONSOLE messages...                                   *
      *****************************************************************
       Z-DISPLAY-MESSAGE-TEXT.
           if MESSAGE-TEXT-2 = SPACES
               display MESSAGE-BUFFER(1:79)
           else
               display MESSAGE-BUFFER
           end-if
           move all SPACES to MESSAGE-TEXT
           exit.

      *****************************************************************
      * Display the file status bytes. This routine will display as   *
      * four digits. If the full two byte file status is numeric it   *
      * will display as 00nn. If the 1st byte is a numeric nine (9)   *
      * the second byte will be treated as a binary number and will   *
      * display as 9nnn.                                              *
      *****************************************************************
       Z-DISPLAY-IO-STATUS.
           if  IO-STATUS not NUMERIC
           or  IO-STAT1 = '9'
               move IO-STAT1 to IO-STATUS-04(1:1)
               subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY
               move IO-STAT2 to TWO-BYTES-RIGHT
               add TWO-BYTES-BINARY to ZERO giving IO-STATUS-0403
               move 'File Status is: nnnn' to MESSAGE-TEXT
               move IO-STATUS-04 to MESSAGE-TEXT(17:4)
               perform Z-DISPLAY-MESSAGE-TEXT
           else
               move '0000' to IO-STATUS-04
               move IO-STATUS to IO-STATUS-04(3:2)
               move 'File Status is: nnnn' to MESSAGE-TEXT
               move IO-STATUS-04 to MESSAGE-TEXT(17:4)
               perform Z-DISPLAY-MESSAGE-TEXT
           end-if
           exit.

      *****************************************************************
       Z-POST-COPYRIGHT.
           display SIM-TITLE
           display SIM-COPYRIGHT
           exit.
      *****************************************************************
      *           This program was generated by SimoZAPS              *
      *             A product of SimoTime Enterprises                 *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************

Summary
(Next) (Previous) (Table-of-Contents)

The purpose of this document is to provide a COBOL Source member for viewing.

Software Agreement and Disclaimer
(Next) (Previous) (Table-of-Contents)

Permission to use, copy, modify and distribute this software for any commercial purpose requires a fee to be paid to Simotime Enterprises. Once the fee is received by SimoTime the latest version of the software will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.

Permission to use, copy, modify and distribute this software for a non-commercial purpose and without fee is hereby granted, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.

SimoTime Enterprises makes no warranty or representations about the suitability of the software for any purpose. It is provided "AS IS" without any express or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software.

Downloads and Links to Similar Pages
(Next) (Previous) (Table-of-Contents)

You may view the complete list of SimoTime callable Modules or Driver Programs at http://www.simotime.com/simomods.htm.

You may download this example at http://www.simotime.com/sim4dzip.htm#zPACKmfcatxpt or view the complete list of SimoTime Examples at http://www.simotime.com/sim4dzip.htm.

This item will provide a link to  an ASCII or EBCDIC translation table. A column for decimal, hexadecimal and binary is also included.

This document provides a quick summary of the  File Status Key  for VSAM data sets and QSAM files.

To review all the information available on this site start at  The SimoTime Home Page .

Glossary of Terms
(Next) (Previous) (Table-of-Contents)

Check out  The SimoTime Glossary  for a list of terms and definitions used in the documents provided by SimoTime.

Comments or Suggestions
(Next) (Previous) (Table-of-Contents)

If you have any questions, suggestions or comments please call or send an e-mail to: helpdesk@simotime.com

We appreciate your comments and feedback.

About SimoTime Enterprises
(Next) (Previous) (Table-of-Contents)

Founded in 1987, SimoTime Enterprises is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com


Return-to-Top
Copyright © 1987-2010 SimoTime Enterprises  All Rights Reserved
When technology complements business
http://www.simotime.com