Record Structure & Numbers HTML Generation Process |
The SimoTime Home Page |
Understanding the structure of a record within a file and having access to documentation can be quite useful for development and support personnel when reviewing the results of test cases or when an unexpected condition is encountered.
This document will focus on the task of generating documentation for a Record Structure (or Record Layout). The generation is based on the record and field structure as defined in a COBOL Copy File. The generated document will be an ASCII/Text File with an HTML content and may be viewed with a browser of choice. A second file containing a list of the numeric fields will be created. The generation phase will require a Windows system. The generated HTML document may be viewed with a browser of choice.
Note: For explanation purposes this document will reference a default setup and configuration environment that is used by SimoTime.
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-2025
SimoTime Technologies and Services
All Rights Reserved
This example illustrates the following functions.
1. | Create HTML Documentation for a Record Structure (or Record Layout). |
2. | Create a file containing a list of numeric field names as defined in a COBOL Copy File. |
3. | Describe and demonstrate the document generation process. |
4. | Describe and demonstrate the document review process. |
This suite of samples programs will run on the following platforms.
1. | Requires Microsoft Windows/7 (or later) or Windows/Server. |
2. | Requires Micro Focus Enterprise Developer with a configuration for Mainframe Sub-system Support. |
3. | Requires the SimoTime Library to be installed (C:\SIMOLIBR). |
4. | Requires a user environment to be configured (C:\SIMOUSER). |
For explanation purposes this document will assume a default setup and configuration of the SimoTime Technologies.
Explore the SIMOUSER directory structure. The SIMOUSER Library is a directory and sub-directory structure that provides an environment for analyst, technical administrators, testing groups and support individuals to generate and execute programs that will be used to convert, verify or review the content and properties of non-relational data structures.
The generation processing task is a "one-time" effort. Once it is completed the items (documents or programs) may be promoted (or deployed) to a shared environment and accessed based on user demand.
The documents that define the record structures are categorized as Data Validation programs. The working library for generating Data Validation documents is C:\SIMOUSER\DEVL\SIMOGENS\COGITATE.
Windows Explorer will be used to navigate between the folders and execute the generation programs within the SIMOUSER working environment. Use the Windows Start Button to open a Windows Explorer session
Note: The following assumes Windows Explorer is configured with the Navigation Pane displayed on the left side of the screen and the Preview Pane displayed on the right side of the screen.
1. | From the Navigation Pane expand the C:\SIMOUSER\DEVL\COBCPY1 folder |
1.1. | From the Preview Pane do a right-mouse button on CUSTCB01.pcf and open the member with a text editor of choice. |
1.1.1. | Review the content of the COBOL Copy File. |
1.1.2. | Close the file. |
2. | From the Navigation Pane expand the C:\SIMOUSER\DEVL\SIMOGENS\COGITATE folder |
2.1. | From the Preview Pane do a double-click on SIMOTIME.LISTONE.CPY2HTML.lst. |
2.1.1. | Review the content of the "List of Names" File. |
2.1.2. | Close the file. |
2.2. | From the Preview Pane do a double-click on ADM_GENRONE_CPY2HTML |
2.2.1. | Double-clicking should cause the Job Script (CMD file) to execute. |
2.2.2. | The generated HTML Document should be written to the HTML sub-directory. |
2.2.3. | Information about the Job Execution should be written to the C:\SIMOUSER\DEVL\LOGS directory. |
3. | From the Navigation Pane expand to the C:\SIMOUSER\DEVL\SIMOGENS\COGITATE\HTML |
3.1. | This is the folder where the HTML Documents are stores. |
3.2. | From the Preview Pane do a double-click on custcb01.htm |
3.2.1. | Double-clicking should execute the default browser and display the content of the "custcb01.htm" document. |
3.2.2. | Review the document and Close the file. |
3.3. | From the Preview Pane select the generated HTML documents and copy (or deploy) them to a folder of choice. |
This completes the "Generate, Review & Deploy" process.
The following diagram shows the logic flow for a batch job that describes and demonstrates how to generate documentation for a Record Structure and identify numeric fields and their properties.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Note-1: REC1COPY is mapped to the physical file name of a COBOL Copy File that defines a Record Structure. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Note-2: REC1HTML is mapped to the physical file name of the HTML Document for the Record Structure. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Note-3: SYSUT1 is mapped to the physical file name of the SimoTime Work File that contains a list of field names and properties. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Note-4: SYSUT2 is mapped to the physical file name of the file that will contain a list of field names. |
Validate Function, HTML Generation & Numeric Field Identification |
Color Associations: The
The following provides an example of a generated HTML document for a record structure that includes text strings, and numeric values that are stored in a Zoned-Decimal, Packed-Decimal or Binary format.
Explore an HTML document of the COBOL Copy File for NUMXDSB1. This document will provide additional information about each field in the record structure. The information provided will include field location (or position within record), the logical length of the field and the physical length of the field.
This section provides additional technical details about the modules that are included in the batch job example.
A COBOL Copy File (NUMXDSB1.cpy) is used to define a Record Structure.
***************************************************************** * NUMXDSB1.cpy - a COBOL Copy File * * A Variety of Numeric Formats * * 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 * ***************************************************************** * The USAGE clause specifies the format of a data item in * computer memory or in a record within a file. * * If a USAGE clause is missing the default format is DISPLAY. * * An abbreviated form of the USAGE clause may be used. For * example, USAGE IS COMPUTATIONAL-3 may be specified as * COMP-3 without the USAGE IS verbage. * * USAGE Numeric Type Notes * -------- --------------- -------------------------------- * DISPLAY Zoned-Decimal Sensitive to ASC/EBC Encoding, * Logical Size is User Defined, * Physical Size = Logical Size. * COMP-3 Packed-Decimal Exempt from ASC/EBC Encoding, * Logical Size is User Defined, * Physical Size is Calculated * during program compilation. * COMP Binary Exempt from ASC/EBC Encoding, * Logical Size is User Defined, * Physical Size is Calculated * during program compilation and * may be determined by the System * Architecture or Compiler * Directives. * * The notation in columns 73-80 is for documentation purposes * only and identifies the column that would be used for the * field content if a spreadsheet software package were used * to create test data. * * .1....:....2....:....3....:....4....:....5....:....6....:....7....:....8 * 01 NUMXDS-RECORD. 05 NUMXDS-FLD-TXT-ZDU-5-0 pic X(8). COL-A 05 NUMXDS-FLD-ZDU-5-0 pic 9(5) usage is DISPLAY. COL-B 05 NUMXDS-FLD-TXT-ZDS-5-0 pic X(8). COL-C 05 NUMXDS-FLD-ZDS-5-0 pic S9(5) usage is DISPLAY. COL-D 05 NUMXDS-FLD-TXT-PKU-5-0 pic X(8). COL-E 05 NUMXDS-FLD-PKU-5-0 pic 9(5) usage is COMP-3. COL-F 05 NUMXDS-FLD-TXT-PKS-5-0 pic X(8). COL-G 05 NUMXDS-FLD-PKS-5-0 pic S9(5) usage is COMP-3. COL-H 05 NUMXDS-FLD-TXT-BNU-5-0 pic X(8). COL-I 05 NUMXDS-FLD-BNU-5-0 pic 9(5) usage is COMP. COL-J 05 NUMXDS-FLD-TXT-BNS-5-0 pic X(8). COL-K 05 NUMXDS-FLD-BNS-5-0 pic S9(5) usage is COMP. COL-L 05 NUMXDS-FLD-TEXT pic X(6). COL-M 05 NUMXDS-FLD-FILLER pic X(946). * *** NUMXDSB1 - End-of-Copy File - - - - - - - - - - - NUMXDSB1 * ***************************************************************** *
The following items are referenced by this set of programs. Their creation and support are described in the linked documents.
A command file (ENV1BASE.cmd) is called from other command files to set commonly used environment variables. This provides a single point of definition. The following is a listing of the contents of the command file.
@echo OFF rem * ******************************************************************* rem * ENV1BASE.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2021 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Provide a single point to set common environment variables. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * Set the commonly used environment variables. This is used to provide rem * a single point for managing the commonly used environment variables. rem * set SimoLIBR=c:\SimoLIBR set BASELIB1=c:\SIMOSAM1\DEVL set BASELIB8=c:\SimoSAM8 set BaseWIP1=c:\SimoSAM1\WIP1 set DATAZERO=c:\SIMODATA\DEVL\DATA\ZERO set BASEAPP=%BaseLib1% set BASESYS=%BaseLib1%\SYS1 set BASECAT=%BaseLib1%\DATA set UMAPALIB=%BASECAT%\ASC1 set UMAPELIB=%BASECAT%\EBC1 set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.txt set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT set PostNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT set SIMONOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.txt set USERPOST=%BASEAPP%\LOGS\ASSIGNED_USER_POST_FILE.txt if [%1]==[] goto NO_POST set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%1.txt call SIMONOTE "+ ENV1BASE *" call SIMONOTE "+ ENV1BASE ********************************************************************%1" call SIMONOTE "+ ENV1BASE is preparing the System Environment..." call SIMONOTE "+ SIMOLIBR is %SIMOLIBR%" call SIMONOTE "+ MIFOSYS1 is %MIFOSYS1%" call SIMONOTE "+ BASELIB1 is %BASELIB1%" :NO_POST call SIMONOTE "+ SIMONOTE Job Log File is %SIMONOTE% " rem * set MQBASE=C:\Program Files\IBM\WebSphere MQ rem * rem * Set the location for the Apache-Tomcat Server... set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52 rem set CATALINA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112 rem * rem * Set the Environment for the Java Environment... rem set JAVABASE=C:\APACHETC\apache-tomcat-7.0.52 set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112 set JAVASDK="%JAVABASE%\bin" set JAVA_HOME=%JAVABASE% set JRE_HOME=%JAVABASE% set SIMOTCAT=%CATALINA_HOME%\webapps\simotcat set SIMPACKS=%CATALINA_HOME%\webapps\simotcat\WEB-INF\classes\simpacks rem * rem * Set the environment for the Micro Focus technology... set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL Build Tools set MIFOESTU=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0 set MIFOEMFE="C:\Program Files (x86)\Micro Focus\Mainframe Express" rem * rem * Large file support, performance tuning and record locking of the File Handler set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG rem * rem * For IMS Support set ES_IMSLIB=%BASEAPP%\IMSLIB set ES_ACBLIB=%BASEAPP%\IMSLIB rem * rem * EZASOKETS Check EZASOKETS Enabled box or set ES_EZASOKET_SUPPORT=YES set EZACONFG=BASESYS1\CONFIG\EZACONFG.dat rem * rem * Resource Allocation and Performance for SORT and non-Relational Data rem set MFJSENGINE=SYNCSORT set SORTSCHEME=1 set SORTSPACE=750000000 set TMP=C:\SORTWORK rem * set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg rem * For CORE_ON_ERROR function, ABEND Dump rem * set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg rem * rem * Consolidated Trace Facility (CTF) rem * set MFTRACE_CONFIG=%BASESYS%\CONFIG\ctf.cfg rem * set MFTRACE_LOGS=c:\ctflogs rem * rem * For Job Restart, ABEND Recovery set MF_UCC11=Y set ES_JES_RESTART=Y rem * rem * Set environment for MFBSI (Micro Focus Batch Scheduling Interface) set ES_EMP_EXIT_1=mfbsiemx set MFBSI_DIR=%BASESYS%\LOGS\%JESSERVERNAME% set MFBSIEOP_CMD=ENABLE set MFBSIEOP_CSV=ENABLE set MFBSIEOP_HTM=ENABLE set MFBSIEOP_XML=ENABLE rem * rem * Set Behavior and Trace Flags for GETJOBDD rem * Position=12345678/12345678 set JDDFLAGS=nnnWnnnn/YYnnnnnn rem * rem * If not already set then set the PATH for Micro Focus Directories if "%SIMOPATH%" == "Y" goto JUMPPATH if "%MIFOSYS1%" == "EDEV" goto JUMPEDEV if "%MIFOSYS1%" == "VCBL" goto JUMPVCBL if "%MIFOSYS1%" == "ESTU" goto JUMPESTU if "%MIFOSYS1%" == "EMFE" goto JUMPEMFE :JUMPEDEV set path=%BASESYS%\LOADLIB;%MIFOEDEV%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOEDEV%\CPYLIB set MIFOBASE=%MIFOEDEV% goto JUMPPATH :JUMPVCBL set path=%MIFOVCBL%\bin;%MIFOVCBL%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set MIFOBASE=%MIFOVCBL% goto JUMPPATH :JUMPESTU set MIFOBASE=%MIFOESTU%\Base set MIFOBIN=%MIFOBASE%\bin set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE goto JUMPPATH :JUMPEMFE set MIFOBASE=%MIFOEMFE%\Base set MIFOBIN=%MIFOBASE%\bin set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE goto JUMPPATH rem * :JUMPPATH set SIMOPATH=Y rem * set MAINFRAME_FLOATING_POINT=true set COBIDY=%BASEAPP%\COBIDY set COBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR% set LIBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR% set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE% set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR% rem * set USERCLASS=%BASELIB1%\LOADLIB set CLASSPATH=. set CLASSPATH=%CLASSPATH%;%JAVABASE% set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks rem * if "%MIFOSYS1%" == "ESTU" set CLASSPATH=%CLASSPATH%;%MIFOBIN% if "%MIFOSYS1%" == "EDEV" set CLASSPATH=%CLASSPATH%;%MIFOEDEV% if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL% if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%\bin\mfcobol.jar rem * set JobStatus=0000 call SIMONOTE "+ ENV1BASE is returning to caller"
The following (SIMONOTE.cmd) is a listing of the contents of the SIMONOTE.CMD command file. The command is used to provide a consistent process for logging and displaying messages.
@echo OFF rem * ******************************************************************* rem * SIMONOTE.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 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 Technologies rem * rem * This script may be called from other scripts and expects a single rem * parameter enclosed in double quotes. The double quotes will be rem * removed. Before writing to the log file a date and time stamp rem * 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
This document will focus on the task of generating COBOL programs that will read data files or VSAM Data Sets and accumulate summary totals. The generation phase will require a Windows system. The generated source code may be compiled and executed on a system of choice. This document may be used to assist as a tutorial for new assembler programmers or as a quick reference for experienced programmers. The samples focus on the coding techniques of the individual functions. As always, it is the programmer's responsibility to thoroughly test all programs.
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.
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.
Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.
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 that are used 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 (including Micro Focus COBOL) 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 |
Record Structure and Numeric Fields |
Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |