|
|
File
Properties Definitions, Retention and Management Information http://www.simotime.com |
| When technology complements business | Copyright © 1987-2010 SimoTime Enterprises All Rights Reserved |
This suite of programs will provide the capability of creating and managing a repository of file properties (FPMASTER) for Data Files, Partitioned Data Sets (PDS) and GDG Base definitions used by a mainframe application or group of applications. This capability and the information it provides is quite useful when supporting applications or migrating an application (source code, control information and data) from a Mainframe System to a Linux, UNIX or Windows (LUW) System using Micro Focus technologies.
The FPMASTER (or File Properties Repository) is a Micro Focus Key-Sequenced-Data Set. Two Programs are provided that provide the capability of importing or extracting information between the FPMASTER and a Microsoft Excel spreadsheet. A comma-separated-values (CSV) file is used as the exchange format between FPMASTER and Excel.
A batch interface to load or update the File Properties Repository is provided. This batch interface uses a record sequential file as input. The record structure is a Fixed Field Length (FFL) format. A COBOL copy file is provided for the record layout.
The scripts, programs, data sets and documentation for the File Properties Repository Management are provided in a single zipped file called FPMAST01.ZIP. This zipped file may be downloaded from the SimoTime Web site. This example illustrates the following functions.
| Script | Description |
| FPDDEFE1.CMD | Delete/Define a VSAM cluster (or Micro Focus Key-Sequenced-File) that will be used as the File Properties Repository. |
| FPMIMPE1.CMD | Demonstrate how to populate the File Properties Repository (or VSAM, KSDS) with information from an Excel spreadsheet that has been saved as a Comma-Separated-Values (or CSV) file. |
| FPMEXPE1.CMD | Demonstrate how to access the File Properties repository (or VSAM, KSDS) and write information to a CSV file that may be easily exported into an Excel spreadsheet. |
| FPLOADE1.CMD | Describe how to use the "Batch Interface" load program to do the initial load of a File Properties Repository. |
| FPMUPDE1.CMD | Describe how to use the "Batch Interface" update program to add or update records in the File Properties Repository. |
This suite of programs will work in a complementary manner with the following technologies available from Simotime.
| Link | Description |
| JCSCAN01.HTM | Provides the utility programs to scan JCL members and extract information from DD statements and IDCAMS control specifications. |
| DATRAK01.HTM | Describes various methods for collecting file information to build a File Properties repository. |
| CATPOP01.HTM | Provides the utility programs to use the information stored in the File Properties repository to create the catalog entries to be used by Micro Focus Mainframe Express, Studio Enterprise Edition or Server Enterprise Edition. |
This section describes the process for creating and populating a File Properties Repository using the information from an Excel spread sheet as input to the process.
Refer to the Additional Function and the Format of the Excel Spreadsheet for details of how to use an Excel spreadsheet to capture information about the files used by an application. Once the information is captured save the spreadsheet as a Comma Separated Values (or CSV) file. The location and name of the CSV file used in the example is as follows.
C:\SimoSAM1\DataLibA\Txt1\SIMOTIME.UTIL.FPLCSVD1.CSV
Run the following command to create a new File Properties Repository (FPMASTER.DAT).
C:\SimoSam1\ProdLibA>FPDDEFE1
Run the following command to populate the File Properties Repository (FPMASTER.DAT).
C:\SimoSam1\ProdLibA>FPMIMPE1
The following COBOL copy file (FPMASTB1.CPY) shows the record layout for the file inventory data base.
*****************************************************************
* Copyright (C) 1987-2010 SimoTime Enterprises *
* All Rights Reserved *
*****************************************************************
* Provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
* Copy File for a FPMASTER, the File Properties Repository.
01 FPMASTER-REC.
05 FPMASTER-DATA-01.
10 FPMASTER-BASE-INFO.
15 FPMASTER-LEVEL-NBR PIC 9(2).
15 FPMASTER-DSN-NAME PIC X(54).
15 FPMASTER-DD-NAME PIC X(17).
10 FPMASTER-FILE-PROPERTIES.
15 FPMASTER-DCB-DSORG PIC X(4).
15 FPMASTER-DCB-RECFM PIC X(4).
15 FPMASTER-MIN-LRECL PIC 9(5).
15 FPMASTER-MAX-LRECL PIC 9(5).
15 FPMASTER-KEY-POS PIC 9(5).
15 FPMASTER-KEY-LEN PIC 9(5).
15 FPMASTER-VSAM-DAT PIC X(44).
15 FPMASTER-VSAM-IDX PIC X(44).
10 FPMASTER-USER-INFO.
15 FPMASTER-JCL-OVR1 PIC X(8).
15 FPMASTER-JCL-USR1 PIC X(8).
15 FPMASTER-JCL-USR2 PIC X(8).
15 FPMASTER-CATEGORY-1 PIC 9(2).
15 FPMASTER-CATEGORY-2 PIC 9(3).
10 FPMASTER-JOB-INFO.
15 FPMASTER-JCL-MEMBER PIC X(12).
15 FPMASTER-JOB-NAME PIC X(17).
15 FPMASTER-STEP-NAME PIC X(17).
15 FPMASTER-EXEC-TYPE PIC X(4).
15 FPMASTER-EXEC-NAME PIC X(8).
10 FPMASTER-CONVERT-INFO.
15 FPMASTER-CPY-NAME PIC X(8).
15 FPMASTER-IOP-NAME PIC X(8).
15 FPMASTER-CVT-NAME PIC X(8).
15 FPMASTER-HTM-NAME PIC X(8).
10 FILLER PIC X(204).
10 FILLER PIC X(512).
* FPMASTB1 - End-of-Copy File...
This section provides technical detail about the supporting scripts and programs used or called by the primary jobs.
A command file (ezSetEnv.CMD located in the sub-directory named ProdLibA) is called from other command files to set commonly used environment variables. This command file will most likely require changes for the target environment. This provides a single point of definition. The following is a listing of the contents of the command file.
rem * *******************************************************************
rem * Set the commonly used environment variables. This is used to
rem * provide a single point for managing the commonly used environment
rem * variables.
rem *
set BaseLib1=c:\SimoSAM1
rem *
rem * The following two (2) statements are required when Hyperlinking from
rem * an Excel Spreadsheet.
c:
cd %BaseLib1%\ProdLibA
rem *
set SYSOUT=%BaseLib1%\LOGS\SYSOUT_USER.TXT
set SYSLOG=%BaseLib1%\LOGS\SYSLOG_USER.DAT
set SimoNOTE=%BaseLib1%\LOGS\SIMONOTE_USER.TXT
set DataLib1=%BaseLib1%\DataLibA
call SimoNOTE "*"
if "%1" == "" goto :NoHeader
call SimoNOTE "* ezSetEnv for %1"
:NoHeader
rem *
set LRSTOKEN=%DataLib1%\Txt1\LRSTOKEN.TXT
set CobCpy=%BaseLib1%\CobCpy1;c:\SimoLIBR
rem *
rem set MAINFRAME_FLOATING_POINT=true
rem *
rem * set MFTRACE_CONFIG=%BaseLib1%\LOGS\TRACE001\ctfrtsfs.cfg
rem * set MFTRACE_LOGS=%BaseLib1%\LOGS\TRACE001
rem *
rem * The following SORTSPACE of 1 gigabyte is used when sorting very
rem * large files. The value is the digit one (1) followed by nine (9)
rem * zeroes. To allocate this amount of memory for sorting requires a
rem * minimum of two (2) gigabytes of RAM.
rem set SORTSPACE=1000000000
rem *
rem * For large file support and record locking control of File Handler
set EXTFH=%BaseLib1%\SysLibA1\EXTFHBIG.CFG
rem * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
set ES_EMP_EXIT_1=mfbsiemx
set MFBSI_DIR=%BaseLib1%\BSIA\%ezServerName%
set MFBSIEOP_CMD=ENABLE
set MFBSIEOP_CSV=ENABLE
set MFBSIEOP_HTM=ENABLE
set MFBSIEOP_XML=ENABLE
rem *
rem * The following is used to map the location of files that are to be
rem * allocated using JCL with ES/MTO.
set ES_ALLOC_OVERRIDE=%BaseLib1%\SysLibA1\CatMapA1.cfg
rem *
rem * Set the environment for Core Dump on System error, CBLCORE file
rem set COBCONFIG_=%BaseLib1%\SysLibA1\Diagnose.CFG
set COBCONFIG_=
rem *
rem * The following may need to be adjusted based on individual systems
rem * and the various versions of the Operating System, Sub-Systems and
rem * other software.
if "%ezSetEnv%" == "Y" goto :NOPATH
set iexplore=C:\Program Files\Internet Explorer
set path="C:\Program Files\Micro Focus\Net Express 5.1\Base\";"C:\Program Files\Micro Focus\Net Express 5.1\Base\bin";%BaseLib1%\ProdLibA;%BaseLib1%\ProdLibA\UTIL;%PATH%;
rem set path="C:\Program Files\Micro Focus\Server 5.0\Base\";"C:\Program Files\Micro Focus\Server 5.0\Base\bin";%PATH%;
:NOPATH
set cobpath=%BaseLib1%\ProdLibA;%BaseLib1%\ProdLibA\UTIL;c:\SimoLIBR
set JobStatus=0000
set StepStatus=0000
set ezSetEnv=Y
call SimoNOTE "* BaseLib1 is %BaseLib1%"
The following (SimoNOTE.CMD) is a listing of the contents of the SimoNOTE.CMD command file.
@echo OFF rem * ******************************************************************* rem * This program is provided by: * rem * SimoTime Enterprises, LLC * rem * (C) Copyright 1987-2010 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Display message on screen and write to a log file. rem * Author - SimoTime Enterprises rem * rem * This script may be called from other scripts and expects a rem * single parameter enclosed in double quotes. The double quotes rem * will be removed. Before writing to the log file a date and time rem * stamp will be inserted in front of the message text. rem * rem * Note: The tilde (~) removes leading/trailing double-quotes. rem * if "%SimoNOTE%" == "" set SimoNOTE=c:\SimoLIBR\LOGS\SimoTime.LOG echo %date% %time% %~1>> %SimoNOTE% echo %~1
A directives file(MiFoAscIBMcomp.DIR) containing the following directives was used to compile and test the programs used in this suite of programs. The file contains the following directives (or compiler options).
DIALECT"MF" CHARSET"ASCII" ASSIGN"EXTERNAL" IBMCOMP NOTRUNC RTNCODE-SIZE"2" ANIM NOOPTIONAL-FILE outdd"SYSOUT 120 L" SHARE-OUTDD DATAMAP settings list() noform
This section provides a technical overview of the programs used to manage the FIle Properties Repository and a description of the programs and procedures that provide additional functionality.
The following is the column structure for an Excel spreadsheet to be used as a startting point to populate the catalog.
| Column | Column Header | Description |
| A | Level Number | This should be a "1" for the primary file definition information. |
| B | DSN | This is a forty-four (44) byte text string that is the fully-qualified MVS Data Set Name (DSN) or VSAM Cluster Name |
| C | DD Name | This is the eight (8) character DD Name. |
| D | DSORG | This is the Data Set Organization. |
| E | RECFM | This is the Record Format. |
| F | lrecl-MIN | This is a five (5) digit field for the minimum or average record length. |
| G | lrecl-MAX | This is a five (5) digit field for the maximum record length. |
| H | KeyPos | This is a five (5) digit field for the key starting position. The first position in a record is 1 |
| I | KeyLen | This is a five (5) digit field for the length of the key. |
| J | VSAM Data Name | This is a forty-four (44) byte text string that is the VSAM Data Name for KSDS and ESDS |
| K | VSAM Index Name | This is a forty-four (44) byte text string that is the VSAM Index Name for KSDS |
| L | Override Job | This is an eight (8) byte JCL Member name that will be used to override the generated JCL that is used to create the catalog entry. |
| M | User Job 1 | This is an eight (8) byte JCL Member name for a job that will be submitted to the internal reader after the catalog creation process is complete. |
| N | User Job 2 | This is an eight (8) byte JCL Member name for a job that will be submitted to the internal reader after the previous steps are completed. |
This section will focus on the Windows environment and the Command files (or scripts) that are used to create and manage the File Properties Repository.
This script (FPDDELE1.CMD) will create (or Delete/Define) a new Micro Focus Keyed-Indexed file that will be used as the File Properties Repository.
@echo OFF
rem * ************************************************************************
rem * This procedure provides a batch function to create a new FPMASTER.DAT
rem * file that will be used as the File Properties Repository. This process
rem * performs the same function as an IDCAMS, Delete/Define.
rem *
rem * This procedure calls the following Windows Command Files.
rem * 1. ezSetEnv.CMD - this provides a single point for setting commonly
rem * used environment variables.
rem * 2. SimoNOTE.CMD - this provides a consistent process for displaying
rem * messages to the screen and writing to a journal or
rem * log file.
rem * ************************************************************************
setlocal
call ezSetEnv
set CmdName=FPDDEFE1
rem *
call SimoNOTE "*******************************************************************%CmdName%.CMD"
call SimoNOTE "Starting JobName %CmdName%.CMD"
rem *
rem * Step 1 of 2, Prepare the Environment
rem * UPDFLAG-01 Update complete record
rem * UPDFLAG-02 Update the Base Fields (Key and File Names)
rem * UPDFLAG-03 Update the File Properties
rem * UPDFLAG-04 Update the JCL Scan Fields
rem * UPDFLAG-05 Update the User defined Fields
rem *
set UPDFLAGS=NYYYN
set FPRFFLD1=%DataLib1%\DYN1\SIMOTIME.UTIL.FPNULLD1.DAT
set FPMASTER=%DataLib1%\DYN1\SIMOTIME.UTIL.FPMASTER.DAT
rem *
rem * The following will create a null sequnetial file for input. This will
rem * be used to force an end of file and create an empty FPMASTER.DAT file
rem * to be used as the File Properties Repository.
rem *
if not exist %FPRFFLD1% copy nul %FPRFFLD1%
rem *
rem * Step 2 of 2, Update or Add records to the Data FIle Data Base
rem *
rem * Read the Listing file, set the environment and append/update the
rem * records in the File Properties Repository. Since the input file
rem * is an empty file this will perform a Delete/Define for a new,
rem * File Properties Repository (or FPMASTER.DAT).
rem *
run FPLOADC1
if not "%ERRORLEVEL%" == "0" (call SimoNOTE "Error Level = %ERRORLEVEL% "
set JobStatus=0010)
if not "%JobStatus%" == "0000" goto :EojNOK
:EojAOK
call SimoNOTE "DataMake %FPMASTER%"
call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus% "
goto :End
:EojNOK
call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
goto :End
:End
call SimoNOTE "FileInfo SYSOUT=%SYSOUT%"
call SimoNOTE "Finished JobName %CmdName%.CMD"
if not "%SimoGENS%" == "BATCH" pause
endlocal
This script (FPMIMPE1.CMD) will read an ASCII/Text file and use the information in the individual records to update the File Properties Repository. The ASCII/Text file is created by saving an Excel Spreadsheet as a Comma Separated Values (or CSV) file.
@echo OFF
rem * ************************************************************************
rem * This procedure will read an ASCII/Text file and use the information in
rem * the individual records to update the File Properties Repository. The
rem * ASCII/Text file is created by saving an Excel Spreadsheet as a Comma
rem * Separated Values (or CSV) file.
rem *
rem * This procedure calls the following Windows Command Files.
rem * 1. ezSetEnv.CMD - this provides a single point for setting commonly
rem * used environment variables.
rem * 2. SimoNOTE.CMD - this provides a consistent process for displaying
rem * messages to the screen and writing to a journal or
rem * log file.
rem * ************************************************************************
setlocal
call ezSetEnv
set CmdName=FPMIMPE1
rem *
call SimoNOTE "*******************************************************************%CmdName%.CMD"
call SimoNOTE "Starting JobName %CmdName%.CMD"
rem *
rem * Read the CSV File, update the FPMASTER File (File Properties Repository).
set FPASCCSV=%BaseLib1%\DataLibA\TXT1\SIMOTIME.UTIL.FPLCSVD1.CSV
set FPMASTER=%BaseLib1%\DataLibA\Dyn1\SIMOTIME.UTIL.FPMASTER.DAT
run FPMIMPC1
if not "%ERRORLEVEL%" == "0" (call SimoNOTE "Error Level = %ERRORLEVEL% "
set JobStatus=0010)
if not "%JobStatus%" == "0000" goto :EojNOK
:EojAOK
call SimoNOTE "DataTake %FPASCCSV%"
call SimoNOTE "DataMake %FPMASTER%"
call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus% "
goto :End
:EojNOK
call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
goto :End
:End
call SimoNOTE "FileInfo SYSOUT=%SYSOUT%"
call SimoNOTE "Finished JobName %CmdName%.CMD"
if not "%SimoGENS%" == "BATCH" pause
endlocal
This section describes the COBOL programs used to support the creation, management and use of the File Properties Repository.
This program (FPLOADC1.CBL) will read an ASCII/Text file and use the information in the individual records to populate the File Properties Repository. This program is intended to be used to do the initial load of the File Properties Repository.
The ASCII/Text file (or input file) is created by saving an Excel Spreadsheet as a Comma Separated Values (or CSV) file. Since this program opens the File Properties Repository file as output and if the input file is a nul file (i.e. empty file) this program will simply create (i.e. Delete/Define) a new File Properties Repository (FPMASTER.DAT).
This set of programs (FPMIMPC1.CBL and FPMIMPR1.CBL) will read an ASCII/Text file (with records in a Comma Separated Values format) and use the information in the individual records to populate the File Properties Repository (with records in a Fixed Field Length format). This set of programs is intended to be used to import data from an Excel spreadsheet into the File Properties Repository. The first program performs the file I/O and calls the second program to do the actual record format conversion.
The purpose of this suite of programs is to provide an example of how to create, manage and use a File Properties Repository. This capability and the information it provides is quite useful when supporting applications or migrating an application (source code, control information and data) from a Mainframe System to a Linux, UNIX or Windows System using Micro Focus technologies.
Permission to use, copy, modify and distribute this software for any 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.
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.
You may download this example at
http://www.simotime.com/sim4dzip.htm#zPackfpmast01
or view the complete list of SimoTime Examples at
http://www.simotime.com/sim4dzip.htm.
Take a look at The JCL Scanner to gather file information from DD statements and DELETE/DEFINE statements used by IDCAMS.
Check out The JCL Connection for more mainframe JCL examples.
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 .
Check out The CICS Connection for more examples of mainframe CICS coding techniques and sample code.
Check out The SimoTime Glossary for a list of terms and definitions used in the documents provided by SimoTime.
If you have any questions, suggestions or comments please call or send an e-mail to: helpdesk@simotime.com
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 |