Record Layout Create an HTML Document |
This session explains how to generate documentation for a record layout (or record structure) based on the definitions in a COBOL copy file. This documentation may be used to determine the COBOL field name that relates to a position or location within a record.
| ||||||
Create and View HTML Documentation for Record Structures |
We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.
Copyright © 1987-2019
SimoTime Technologies and Services
All Rights Reserved
Each record in a non-relational data file (i.e. a sequential file or a Key-Sequenced-Data-Set (also referred to as KSDS)) usually has a unique data structure that is defined in a COBOL copy file. The problem is the COBOL copy file defines the field names as unique and independent entities. The relationship of the individual fields within a record must be manually calculated. The generated HTML documentation will define the individual fields (i.e. their logical and physical field lengths) and their relationship within the record (i.e. their position within the record).
To create HTML documentation will require a valid license for Micro Focus COBOL and SimoTime Technologies. The process to generate HTML documents from COBOL copy files requires the following two command files.
The following (ADMCPY2HTMLGENRALL.cmd) shows the content of the primary command file used to generate the HTML documentation for multiple record structures (or record layouts).
@echo OFF rem * ******************************************************************* rem * ADMCPY2HTMLGENRALL.cmd - a Windows Command File * rem * This program is provided by SimoTime Enterprises * rem * (C) Copyright 1987-2013 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * This procedure will create HTML documentation for record structures rem * (or record layouts) based on a COBOL copy file. rem * rem * The following commands use commands and programs that are provided rem * as part of the SimoTime Library (i.e. SIMOLIBR Folder). rem * rem * 1. Env1Base.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 rem * or log file. rem * 3. ZCPY2HTM.cmd - this will do the actual generation of the rem * HTML document. rem * ******************************************************************* call ..\Env1Base set CmdName=ADMCPY2HTMLGENRALL rem * call SimoNOTE "***********************************************%CmdName%.CMD" call SimoNOTE "Starting JobName %CmdName%.CMD" rem * rem * Set the environment variables. set AOK_Count=0 set NOK_Count=0 set SIMOGENS=PAUSE set SIMODROP=N rem * set SLIB=%BASELIB1%\CobCpy1 set TLIB=%BASELIB1%\DATA\STRS for /F "eol=; tokens=1,2* delims=." %%i in (SIMOTIME.SIMOSAM1.LRECLALL.lst) do call ZCPY2HTM %SLIB%\%%i.CPY %TLIB%\%%i.htm IBM HTML rem * set SLIB=c:\SIMOLIBR set TLIB=%BASELIB1%\DATA\STRS for /F "eol=; tokens=1,2* delims=." %%i in (SIMOTIME.SIMOLIBR.LRECLALL.lst) do call ZCPY2HTM %SLIB%\%%i.CPY %TLIB%\%%i.htm IBM HTML rem * call SimoNOTE "AOKcount Compile Count for AOK is %AOK_Count% " call SimoNOTE "NOKcount Compile Count for NOK is %NOK_Count% " if "%NOK_Count%" == "0" goto EOJAOK :EOJNOK call SimoNOTE "ABENDING JobName %CmdName%.CMD " pause goto END :EOJAOK call SimoNOTE "Finished JobName %CmdName%.CMD " goto END :END if not "%SimoGENS%" == "BATCH" pause
The following (ZCPY2HTM.cmd) shows the content of the secondary command file that is used to generate the HTML documentation for individual record structures.
@echo OFF set TaskName=ZCPY2HTM rem * ******************************************************************* rem * ZCPY2HTML.cmd - a Windows Command File * rem * This job script is provided by SimoTime Technologies * rem * (C) Copyright 1987-2018 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * This procedure will create HTML Documentation of a record layout rem * using a COBOL Copy File. rem * ******************************************************************* rem * rem * Set the environment variable to use the default directives file. call SimoNOTE "* -------------------------------------------------------- *%TaskName%" call SimoNOTE "* Starting %TaskName% Prepare..... Task=Set the Task Environment" set ConvertStatus=0000 set FNCASEBEHAVIOR=LL\ set CASELIST=%UTWRKLIB%\%4_CASELIST.txt echo %2>%CASELIST% run FNCASEC1 rem * The following statements will place the work files in a specific rem * directory. set REC1CBL2=%UTWRKLIB%\%4_REC1CBL2.txt set REC1IDX1=%UTWRKLIB%\%4_Rec1Idx1.DAT set REC1SEQ1=%UTWRKLIB%\%4_Rec1SEQ1.DAT set REC1TXT1=%UTWRKLIB%\%4_Rec1Txt1.TXT call SimoNOTE "* Continue %TaskName% Generate.... Task=Create HTML for Record Layout" set HTMHDRD1=%SimoLIBR%\rec1hdr1.htm set HTMFTRD1=%SimoLIBR%\rec1ftr1.htm set REC1COPY=%1 set Rec1HTML=%2 run SIMOREC1 %3 HTML rem * call REC1HTML %1 %2 IBM HTML if not "%ERRORLEVEL%" == "0" set ConvertStatus=0010 if not "%ConvertStatus%" == "0000" goto :ConvertEojNOK rem * rem * ******************************************************************* :ConvertEojAOK set /A AOK_Count=%AOK_Count% + 1 call SimoNOTE "* DATATAKE %REC1COPY%" call SimoNOTE "* DATAMAKE %REC1HTML%" call SimoNOTE "* Complete %TaskName% RC=%ConvertStatus%, REC1COPY=%1" goto :End rem * rem * ******************************************************************* :ConvertEojNOK set JobStatus=%ConvertStatus% set /A NOK_Count=%NOK_Count% + 1 call SimoNOTE "* ABENDING %TaskName% RC=%ConvertStatus%, REC1COPY=%1, !!!ABENDING!!!" goto :End rem * rem * ******************************************************************* :End
The following provides an example of a copy file and the HTML output. The information in the HTML document that is created based on the field definitions in a COBOL copy file will be very useful when trying to relate a position of failure within a record to an actual COBOL field name.
Start Windows Explorer perform the following steps.
| ||||||
Generate a Data File Compare Program |
Executing the preceding process should have generated multiple HTML documents. The documents should have been stored in the c:\DATAMIG1\DEVL\DATA\STRS directory. Return to the main session to continue.
The COBOL copy file (ITEMCB01.cpy) that defines the structure of a record layout is used to generate the HTML documentation. The following is an example of a COBOL copy file.
***************************************************************** * ITEMCB01.CPY - a COBOL Copy File * * An Item Master File used by the Demo programs. * * This is a VSAM Keyed-Sequential-Data-Set or Key-Indexed File. * * Copyright (C) 1987-2019 SimoTime Technologies * * All Rights Reserved * * Provided by SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** * 01 ITEM-RECORD. 05 ITEM-NUMBER PIC 9(12). COL-A 05 ITEM-DATA. 10 ITEM-DESCRIPTION PIC X(48). COL-B 10 ITEM-QTY-ONHAND PIC 9(7) COMP. COL-C 10 ITEM-QTY-ALLOCATED PIC 9(7) COMP. COL-D 10 ITEM-UNIT-OF-MEASURE PIC X(16). COL-E 10 ITEM-COST PIC S9(7)V9(2) COMP-3. COL-F 10 ITEM-PRICE PIC S9(7)V9(2) COMP-3. COL-G 10 ITEM-LADATE PIC X(8). COL-H 10 ITEM-LATIME PIC X(8). COL-I 10 ITEM-TOKEN PIC X(3). 10 ITEM-DISCOUNT OCCURS 3 TIMES. 15 ITEM-D-CODE PIC X. 15 ITEM-D-PERCENT PIC S9(3)V9(4). 10 FILLER PIC X(375). * *** ITEMCB01 - End-of-Copy File - - - - - - - - - - - ITEMCB01 * ***************************************************************** *
The following links will provide a sample HTML document that was created by the SimoTime Generation Utility Program.
Explore the Record Structure for the Item Master File by viewing a generated HTML document based on a User-Defined COBOL copyfile.
Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon.
The purpose of this document is to show how to generate HTML documentation for a record layout based on the definitions in a COBOL copy file. This document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem. This document and the links to other documents are intended to provide a choice of alternatives.
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material 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 Technologies.
SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies 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, documentation or training material.
This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.
Note: A SimoTime License is required for the items to be made available on a local system or server.
The following links may be to the current server or to the Internet.
Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon.
Explore The SIMOPATH Series starting at the home page to view information about training sessions and learning materials available from SimoTime Enterprises.
Explore An Enterprise System Model that describes and demonstrates how Applications that were running on a Mainframe System and non-relational data that was located on the Mainframe System were copied and deployed in a Microsoft Windows environment with Micro Focus Enterprise Server.
Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.
Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and/or QSAM files.
The following links will require an internet connect.
A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection
Explore The Micro Focus Web Site for more information about products and services available from Micro Focus. This link requires an Internet Connection.
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
1. | Send an e-mail to our helpdesk. |
1.1. | helpdesk@simotime.com. |
2. | Our telephone numbers are as follows. |
2.1. | 1 415 763-9430 office-helpdesk |
2.2. | 1 415 827-7045 mobile |
We appreciate hearing from you.
SimoTime Technologies was founded in 1987 and 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. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
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. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
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 |
Create an HTML Document of a Record Layout based upon a COBOL Copy File |
Copyright © 1987-2019 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |