Create Generic Test Data Generate a Customer Master File |
![]() |
The SimoTime Home Page |
This document is an introduction or overview for a suite of programs that will create a file with obfuscated or generated names and addresses that may be used as a Customer Master File. The people names (both first and last) are obtained from a suite of files that have been arranged so they are not in alphabetic sequence. The street names are obtained from a file and the street numbers are randomly generated by the program. The City, State and Postal Codes are obtained from a file that is randomly arranged but keeps the valid Postal Codes mapped to the City and State information. There are four (4) Windows Command Files and six (6) Data Files used in this suite of programs when creating a new (or updating an existing) Customer Master File.
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-2016
SimoTime Technologies
All Rights Reserved
This example has the following purposes and illustrates the following functions.
| ||||||||||||||||
List of Objectives for Creating a Customer Master File with Generic Data |
A New Customer Master File may be created or an existing Customer Master File may be updated. Only the Name, Address, City, State and Zip information (or fields in the record) will be updated. In this example the Customer Master File is a VSAM, Key-Sequenced-Data-Set (KSDS) of 512 byte records with a key of twelve (12) bytes starting in position one (1).
| ||||||||||||||
List of the Input Files used when Generating a Customer Master File for Testing |
This suite of samples programs will run on the following platforms
| ||||||
Supported Platforms for Executing the Programs |
This program reads a control file (OBFCTL80) to determine the number of records to add or update to the customer master file.
The program then accesses the "names" and "Postal Codes" files and uses this information to update the names and postal code fields in the customer master file.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a Customer Master File with Generic Data |
Color Associations: The
Note: The light-green boxes offer platform flexibility and will execute on a Mainframe System using ZOS or a Linux, UNIX or Windows system using Micro Focus.
This suite of sample programs comes with three (3) primary command files. The first command file shows how to create the control file. The second command file will show how to do the initial load of the customer file. The third command file will show how to update record in an existing customer file or add new records to the existing file. The following sections provide additional detail about the primary command files.
This procedure is a four step process and creates three new control files to be used in various execution environments.
| ||||||||
Process for creating the Control File |
The following is the source listing for the Command File (OBFCTLE1.cmd) that creates the control files for the application that generates a customer master file.
@echo OFF rem * ******************************************************************* rem * OBFCTLE1.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2016 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Create various sequential files with 80-byte records. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * This procedure uses the Microsoft "ECHO" command to pipe instream rem * data to an ASCII/Text file. The following terms are used. rem * rem * LSEQ - a Line Sequential File or ASCII/Text File rem * RSEQ - a Record Sequential File. This example uses a file of rem * 80-byte records that may be ASCII or EBCDIC encoded. rem * rem * Once the LSEQ file is created it is used as input to create an rem * RSEQ file of 80-byte, ASCII-encoded records. rem * rem * Next, the LSEQ file is read a second time. The record content is rem * converted from ASCII to EBCDIC. A new RSEQ file is created with rem * the EBCDIC-encoded records. rem * rem * ******************************************************************* rem * Step 1, Delete any previously created file... rem * set CmdName=OBFCTLE1 call ..\Env1BASE set RecordCount=250 rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting JobName %CmdName%" :DeleteLSEQ call SimoNOTE "Identify JobStep DeleteLSEQ" set LSEQ0080=%BASECAT%\Txt1\SIMOTIME.TEXT.OBFCTL80.TXT if exist %LSEQ0080% del %LSEQ0080% rem * rem * ******************************************************************* rem * Step 2, Create a new output file. Use the "echo" command provided rem * with Microsoft Windows to pipe instream data to a new rem * ASCII/Text file. rem * :ExecuteCreateLSEQ call SimoNOTE "Identify JobStep ExecuteCreateLSEQ" rem ....:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8 echo * A comment is identified by an asterisk (*) in position one (1)>%LSEQ0080% echo * ..:....1....:....2....:....3....:....4....:....5....:....6....>>%LSEQ0080% echo /CTL FLAGS=FFFF0100 >>%LSEQ0080% echo /CTL RECORDS=%RecordCount% >>%LSEQ0080% rem * if not exist %LSEQ0080% set JobStatus=0002 if not "%JobStatus%" == "0000" goto EojNok call SimoNOTE "Produced DataSet %LSEQ0080%" rem * :ConvertLSEQtoRSEQasc rem * rem * ******************************************************************* rem * Step 3, Read the previously created Line Sequential File (LSEQ) rem * and write a Record Sequential File (RSEQ) with 80-byte, rem * ASCII-encoded records. rem * call SimoNOTE "Identify JobStep ConvertLSEQtoRSEQasc" set GETLS080=%LSEQ0080% set PUTRS080=%BASECAT%\Asc1\SIMOTIME.DATA.OBFCTL80.DAT if exist %PUTRS080% del %PUTRS080% echo %COBPATH% run CV80ALAR if not exist %PUTRS080% set JobStatus=0003 if not "%JobStatus%" == "0000" goto EojNok call SimoNOTE "Produced DataSet %PUTRS080%" rem * :ConvertLSEQtoRSEQebc rem * rem * ******************************************************************* rem * Step 4, Read the previously created Line Sequential File (LSEQ) rem * and write a Record Sequential File (RSEQ) with 80-byte, rem * EBCDIC-encoded records. rem * call SimoNOTE "Identify JobStep ConvertLSEQtoRSEQebc" set GETLS080=%LSEQ0080% set PUTRS080=%BASECAT%\Ebc1\SIMOTIME.DATA.OBFCTL80.DAT if exist %PUTRS080% del %PUTRS080% run CV80ALER if not exist %PUTRS080% set JobStatus=0004 if not "%JobStatus%" == "0000" goto EojNok call SimoNOTE "Produced DataSet %PUTRS080%" rem * rem * ******************************************************************* rem * :EojAok call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%" goto :End :EojNok call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%" :End call SimoNOTE "Conclude SysLog is %SYSLOG%" if not "%1" == "nopause" pause
This script (OBFADDE1.cmd) will build a new customer file. This program uses a Sequential ADD methodology. Therefore, the records being added to the file need to be in sequence by the record key. Since this does an OPEN for OUTPUT it is used to create a new file.
@echo OFF rem * ******************************************************************* rem * OBFADDE1.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2016 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Create a Customer Master File. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * The job will read various data files to get First and Last name rem * and City, State and Postal Code information. This information rem * is then used to create a Customer Master files. rem * rem * This program uses a Sequential ADD methodology. Therefore, rem * the records being added to the file need to be in sequence rem * by the record key. Since this does an OPEN for OUTPUT it is used rem * to create a new file. rem * rem * ******************************************************************* rem * Step 1, Set the Environment... rem * set CmdName=OBFADDE1 call ..\Env1BASE if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting JobName %CmdName%" set FNAMEM01=%BASECAT%\APPL\SIMOTIME.DATA.FNAMEM01.DAT set FNAMEF01=%BASECAT%\APPL\SIMOTIME.DATA.FNAMEF01.DAT set LASTNAME=%BASECAT%\APPL\SIMOTIME.DATA.LASTNAME.DAT set POSTCODE=%BASECAT%\APPL\SIMOTIME.DATA.POSTCODE.DAT set STREET01=%BASECAT%\APPL\SIMOTIME.DATA.STREET01.DAT set OBF1CUST=%BASECAT%\Wrk1\SIMOTIME.DATA.OBF1CUST.DAT set OBFCTL80=%BASECAT%\Asc1\SIMOTIME.DATA.OBFCTL80.DAT rem * call SimoNOTE "CntlFILE=%OBFCTL80%' call SimoNOTE "DataMAKE=%OBF1CUST%' rem * rem * ******************************************************************* rem * Step 2, Add new records to the customer master file. rem * This procedure is used to sequentially load an empty file. rem * run OBFDATC2 if not "%ERRORLEVEL%" == "0" set JobStatus=0010 if not %JobStatus% == 0000 goto :EojNok rem * if exist %OBF1CUST% goto :EojAok set JobStatus=0020 goto :EojNok rem * rem * ******************************************************************* rem * End of Job Processing... rem * :EojAok call SimoNOTE "Produced DataSet %OBF1CUST%" call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%" goto :End :EojNok call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%" :End call SimoNOTE "Conclude SysLog is %SYSLOG%" if not "%1" == "nopause" pause
This script (OBFUPDE1.cmd) will update records or add new records to an existing file. This program uses a Random, ADD/UPDATE methodology. Therefore, the records being added to the file do not need to be in sequence by the record key.
@echo OFF rem * ******************************************************************* rem * OBFUPDE1.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2016 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * rem * Text - Create a Customer Master File. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * The job will read various data files to get First and Last name rem * and City, State and Postal Code information. This information rem * is then used to create a Customer Master files. rem * rem * This program uses a Random, ADD/UPDATE methodology. Therefore, rem * the records being added to the file do not need to be in rem * sequence by the record key. rem * rem * ******************************************************************* rem * Step 1, Set the Environment... rem * set CmdName=OBFUPDE1 call ..\Env1BASE if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting JobName %CmdName%" :DeleteQSAM call SimoNOTE "Identify JobStep DeleteQSAM" set FNAMEM01=%BASECAT%\APPL\SIMOTIME.DATA.FNAMEM01.DAT set FNAMEF01=%BASECAT%\APPL\SIMOTIME.DATA.FNAMEF01.DAT set LASTNAME=%BASECAT%\APPL\SIMOTIME.DATA.LASTNAME.DAT set POSTCODE=%BASECAT%\APPL\SIMOTIME.DATA.POSTCODE.DAT set STREET01=%BASECAT%\APPL\SIMOTIME.DATA.STREET01.DAT set OBF1CUST=%BASECAT%\Wrk1\SIMOTIME.DATA.OBF1CUST.DAT set OBFCTL80=%BASECAT%\Asc1\SIMOTIME.DATA.OBFCTL80.DAT rem * call SimoNOTE "CntlFILE=%OBFCTL80%' call SimoNOTE "DataMAKE=%OBF1CUST%' rem * rem * ******************************************************************* rem * Step 2, Add new records or update existing records in the customer rem * master file. rem * run OBFDATC1 if not "%ERRORLEVEL%" == "0" set JobStatus=0010 if not %JobStatus% == 0000 goto :EojNok rem * if exist %OBF1CUST% goto :EojAok set JobStatus=0020 goto :EojNok rem * rem * ******************************************************************* rem * End of Job Processing... rem * :EojAok call SimoNOTE "Produced DataSet %OBF1CUST%" call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%" goto :End :EojNok call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%" :End call SimoNOTE "Conclude SysLog is %SYSLOG%" if not "%1" == "nopause" pause
The following are the JCL Members used in the suite of sample programs.
| ||||||||||||
List of the JCL Members provided with this Suite of Sample Programs |
The following is the mainframe JCL (OBFCTLJ1.jcl) required to create the control file. The control file created in the following example will cause 10,000 records to be added to a customer master file.
//OBFCTLJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2016 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Create a sequential file of eighty byte control records. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* ******************************************************************* //* Step 1 of 2 Delete any previously created file... //* //CLEANUP EXEC PGM=IEFBR14 //OBFCTL80 DD DSN=SIMOTIME.DATA.OBFCTL80,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2 Create and populate a new QSAM file... //* //CNTLCRT1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //* :....1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8 //SYSUT1 DD * * A comment is identified by an asterisk (*) in position one (1) * ..:....1....:....2....:....3....:....4....:....5....:....6.... /CTL FLAGS=FFFF0100 /CTL RECORDS=25000 /* //SYSUT2 DD DSN=SIMOTIME.DATA.OBFCTL80, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //
To generate a new customer master file requires that a new VSAM Cluster be defined (or Created). Once the VSAM Cluster has been defined it may be populated with data. The following two sections of this document describe this process.
The following is the mainframe JCL (OBFCRTJ1.jcl) required to define (or create) the VSAM Cluster for the Customer Master File.
//OBFCRTJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2016 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Create an empty VSAM, KSDS data set using IDCAMS. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* This job will create a VSAM, KSDS data set. The key is twelve //* characters starting at the first position in the record. //* The record length is 512 characters. //* //* This set of programs will run on a mainframe under MVS or on a //* Personal Computer with Windows and Micro Focus Mainframe Express. //* //* ******************************************************************* //* Step 1 This is a single step job. //* //CUCRTS01 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE CLUSTER (NAME(SIMOTIME.DATA.OBF1CUST) - TRACKS(45,15) - INDEXED) - DATA (NAME(SIMOTIME.DATA.OBF1CUST.DAT) - KEYS(12,0) - RECORDSIZE(512,512) - FREESPACE(10,15) - CISZ(8192)) - INDEX (NAME(SIMOTIME.DATA.OBF1CUST.IDX)) /* //*
The following is the mainframe JCL (OBFADDJ1.jcl) required to sequentially load (or add) records to a new Customer Master File.
//OBFADDJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2016 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Execute a COBOL program to populate a Customer File. //* Author - SimoTime Technologies //* Date - January 01, 1997 //* //* This COBOL program will read a control file and access the various //* name files to populate or update a customer master file. //* //* This program uses a Sequential ADD methodology. Therefore, //* the records being added to the file need to be in sequence //* by the record key. Since this does an OPEN for OUTPUT it is used //* to create a new file. //* //* ************ //* * OBFADDJ1 * //* ********jcl* //* * //* * //* ************ ************ ************ //* * OBFCTL80 *--*--* OBFDATC2 *-----* OBF1CUST * //* *******rseq* * ********cbl* *******ksds* //* * * //* ************ * * //* * LASTNAME *--* * //* *******rseq* * * //* * * //* ************ * * //* * FNAMEF01 *--* * //* *******rseq* * * //* * * //* ************ * * //* * FNAMEM01 *--* * //* *******rseq* * * //* * * //* ************ * * //* * POSTCODE *--* * //* *******rseq* * * //* * * //* ************ * * //* * STREET01 *--* * //* *******rseq* * //* * //* ************ //* * EOJ * //* ************ //* //* ******************************************************************* //* Step 1 This is a single step job. //* //CUADDS01 EXEC PGM=OBFDATC2 //STEPLIB DD DISP=OLD,DSN=MFI01.SIMOPROD.LOADLIB1 //OBFCTL80 DD DISP=OLD,DSN=SIMOTIME.DATA.OBFCTL80 //FNAMEF01 DD DISP=OLD,DSN=SIMOTIME.DATA.FNAMEF01 //FNAMEM01 DD DISP=OLD,DSN=SIMOTIME.DATA.FNAMEM01 //LASTNAME DD DISP=OLD,DSN=SIMOTIME.DATA.LASTNAME //POSTCODE DD DISP=OLD,DSN=SIMOTIME.DATA.POSTCODE //STREET01 DD DISP=OLD,DSN=SIMOTIME.DATA.STREET01 //OBF1CUST DD DISP=OLD,DSN=SIMOTIME.DATA.OBF1CUST //SYSOUT DD SYSOUT=* //*
The following is the mainframe JCL (OBFUPDJ1.jcl) required to add new records or update existing records for the Customer Master File.
//OBFUPDJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2016 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Execute a COBOL program to update a Customer File. //* Author - SimoTime Technologies //* Date - January 01, 1997 //* //* This COBOL program will read a control file and access the various //* name files to populate or update a customer master file. //* //* This program uses a Random, ADD/UPDATE methodology. Therefore, //* the records being added to the file do not need to be in //* sequence by the record key. //* //* ************ //* * OBFUPDJ1 * //* ********jcl* //* * //* * //* ************ ************ //* * OBFDATC1 *-----* OBF1CUST * //* ********cbl* *******ksds* //* * //* ************ ************ //* * OBFCTL80 *--*--* OBFCTLC1 * //* *******rseq* ********cbl* //* * //* ************ ************ //* * LASTNAME *--*--* OBFDATR1 * //* *******rseq* * ********cbl* //* * * //* ************ * * //* * FNAMEF01 *--* * //* *******rseq* * * //* * * //* ************ * * //* * FNAMEM01 *--* * //* *******rseq* * * //* * * //* ************ * * //* * POSTCODE *--* * //* *******rseq* * * //* * * //* ************ * * //* * STREET01 *--* * //* *******rseq* * //* * //* ************ //* * EOJ * //* ************ //* //* ******************************************************************* //* Step 1 This is a single step job. //* //CUUPDS01 EXEC PGM=OBFDATC1 //STEPLIB DD DISP=OLD,DSN=MFI01.SIMOPROD.LOADLIB1 //OBFCTL80 DD DISP=OLD,DSN=SIMOTIME.DATA.OBFCTL80 //FNAMEF01 DD DISP=OLD,DSN=SIMOTIME.DATA.FNAMEF01 //FNAMEM01 DD DISP=OLD,DSN=SIMOTIME.DATA.FNAMEM01 //LASTNAME DD DISP=OLD,DSN=SIMOTIME.DATA.LASTNAME //POSTCODE DD DISP=OLD,DSN=SIMOTIME.DATA.POSTCODE //STREET01 DD DISP=OLD,DSN=SIMOTIME.DATA.STREET01 //OBF1CUST DD DISP=OLD,DSN=SIMOTIME.DATA.OBF1CUST //SYSOUT DD SYSOUT=* //*
The following is the mainframe JCL (OBFDELJ1.jcl) required to delete the Customer Master File.
//OBFDELJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2016 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* Subject: JCL to delete a VSAM Data Set using the IDCAMS Utility * //* Author: SimoTime Technologies * //* Date: January 1, 1998 * //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * //* The following example is more than what is usually required to * //* delete a VSAM Data Set. However, the purpose is to illustrate the * //* functions of the IDCAMS utility. * //* PURGE: A VSAM Data Set may be date-protected. The DEFINE Cluster * //* has the option of specifying a retention date. If this * //* retention date has not expired then the PURGE option will * //* be required in order to delete the data set. * //* The default is NOPURGE. * //* ERASE: The standard operation by the VSAM DELETE is to delete * //* the catalog entry of the cluster and mark the space used * //* by the cluster as reclaimable. The data contents of the * //* cluster is no longer generally available but it is still * //* present until the area is reused. This introduces a * //* potential problem or security exposure for sensitive data.* //* The information could be retrieved using some special * //* class of DUMP/RESTORE utilities that are often used by * //* data center staff. The ERASE function will write over the * //* data area used by the cluster and the original data is * //* destroyed. The default is NOERASE. * //********************************************************************* //* // EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE SIMOTIME.DATA.OBF1CUST - FILE (OBF1CUST) - PURGE - ERASE - CLUSTER SET MAXCC = 0 /*
This section provides additional detail about Micro Focus Server usage and configuration.
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-2015 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 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 call SIMONOTE "* SIMONOTE Log File is %SIMONOTE% " rem * set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52 set JAVABASE=C:\Program Files (x86)\Java\jdk1.7.0_51 set JAVASDK="%JAVABASE%\bin" set JAVA_HOME=%JAVABASE% set JRE_HOME=%JAVABASE% rem * set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer\bin set MIFOBASE=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0\Base set MIFOBIN=%MIFOBASE%\bin set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL\bin rem * Large file support, performance tuning and record locking of the File Handler set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG rem * For IMS Support set ES_IMSLIB=%BASEAPP%\IMSLIB set ES_ACBLIB=%BASEAPP%\IMSLIB 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 * set MAINFRAME_FLOATING_POINT=true set COBIDY=%BASEAPP%\COBIDY set COBPATH=.;%BASEAPP%\LOADLIB;%BASESYS%\LOADLIB;%SimoLIBR% set LIBPATH=.;%BASEAPP%\LOADLIB;%BASESYS%\LOADLIB;%SimoLIBR% set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE% set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE rem * if "%SIMOPATH%" == "Y" goto JUMPPATH if "%MIFOSYS1%" == "ESTU" set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; if "%MIFOSYS1%" == "EDEV" set path=%BASESYS%\LOADLIB;%MIFOEDEV%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; if "%MIFOSYS1%" == "VCBL" set path=%MIFOVCBL%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%; :JUMPPATH set SIMOPATH=Y rem * set USERCLASS=%BASELIB1%\LOADLIB set APACHEST=C:\Program Files (x86)\Apache Group\Apache2 set CLASSPATH=. set CLASSPATH=%CLASSPATH%;%JAVABASE% set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib set CLASSPATH=%CLASSPATH%;\%USERCLASS% set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\ap01jv01\WEB-INF\classes set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\ap01jv01\WEB-INF\classes\simpacks 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%\mfcobol.jar rem * set JobStatus=0000 call SimoNOTE "* Settings CmdName ENV1BASE.cmd, Version 14.03.28, %MIFOSYS1%" call SimoNOTE "* BaseAPP ..... %BASEAPP%" rem * call SimoNOTE "* MFBSIDIR .... %MFBSI_DIR% " call SimoNOTE "* MFTRACE_LOGS Folder is %MFTRACE_LOGS% "
The following (SIMONOTE.cmd) is a listing of the contents of the command file. This command will display a message to the screen and write a "Date/Time stamped" message to a log file.
@echo OFF rem * ******************************************************************* rem * SIMONOTE.CMD - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2016 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
A command file (SYS1BAKCONSOLE.cmd) is called from the ezSTART.CMD file when starting a server. Enterprise Server will make a single backup copy of the console log but one level of backup is usually not enough. This command will keep ten levels of backup for the console.log file.
The following is a listing of the contents of the command file.
@echo OFF rem * rem * ESA, Enterprise Server Administration rem * Console Back up, maintain ten (10) levels rem * The ezServerName environment must be set to the rem * server name prior to calling this procedure rem * call ..\..\Env1base set SDIR=%BASESYS%\LOGS\%JESServerName% set TDIR=%BASESYS%\LOGS\%JESServerName% rem * call SimoNOTE "****************************************SYS1BAKConsole" call SimoNOTE "Starting CmdName SYS1BAKConsole, User is %USERNAME%" rem * if exist %SDIR%\Console_log_10.txt erase %TDIR%\Console_log_10.txt if exist %SDIR%\Console_log_09.txt rename %TDIR%\Console_log_09.txt Console_log_10.txt if exist %SDIR%\Console_log_08.txt rename %TDIR%\Console_log_08.txt Console_log_09.txt if exist %SDIR%\Console_log_07.txt rename %TDIR%\Console_log_07.txt Console_log_08.txt if exist %SDIR%\Console_log_06.txt rename %TDIR%\Console_log_06.txt Console_log_07.txt if exist %SDIR%\Console_log_05.txt rename %TDIR%\Console_log_05.txt Console_log_06.txt if exist %SDIR%\Console_log_04.txt rename %TDIR%\Console_log_04.txt Console_log_05.txt if exist %SDIR%\Console_log_03.txt rename %TDIR%\Console_log_03.txt Console_log_04.txt if exist %SDIR%\Console_log_02.txt rename %TDIR%\Console_log_02.txt Console_log_03.txt if exist %SDIR%\Console_log_01.txt rename %TDIR%\Console_log_01.txt Console_log_02.txt if exist %SDIR%\console.log copy %TDIR%\console.log %TDIR%\Console_log_01.txt rem * call SimoNOTE "Complete CmdName SYS1BAKConsole.CMD, User is %USERNAME%" rem *
As stated earlier the primary purpose of this suite of programs and procedures is to create a Customer Master File that may be used in the test and development environment. The names and addresses should not be associated with any real person. To do this a number of secondary files are used. There are three files that contain people names (First names for Females, First names for males and last names). There is a file for street names and the street numbers are randomly generated. There is a file of City, State and Postal Codes that is what may be obtained from the Postal Service. There is a Control File that may be configured to determine program behavior and what options are enabled.
On the mainframe 80-byte, EBCDIC-encoded, record-sequential files (sometimes referred to as card image files) are widely used as control files. In the Linux, UNIX and Windows (LUW) environments ASCII/Text files (or Line Sequential files) are widely used. When running Micro Focus technologies in the LUW environments it is possible to run in EBCDIC or ASCII mode. Therefore, we provide conversion programs for the files used in this suite of programs.
The following sections will describe these secondary files.
This is the file that is generated or updated by this suite of programs. It is a VSAM, KSDS file with 512 byte records. the key is twelve (12) bytes in length and starts in position 1 of each record.
There are two (2) files containing "First Names" for individuals. The female first names and male first names are in separate files. The format of the files are the same.
This is a record sequential file containing fixed length records of 32 bytes. The first six positions of each record is a sequence number. Positions 7-32 is a 26 byte text string containing a female first name. The first name is left-justified with trailing spaces.
This is a record sequential files containing fixed length records of 32 bytes. The first six positions of each record is a sequence number. Positions 7-32 is a 26 byte text string containing a male first name. The first name is left-justified with trailing spaces.
This is a record sequential file containing fixed length records of 32 bytes. The first six positions of each record is a sequence number. Positions 7-32 is a 26 byte text string containing a last name. The last name is left-justified with trailing spaces.
This is a record sequential file containing fixed length records of 80 bytes. The first six positions of each record is a sequence number. Positions 7-80 is a 74 byte text string containing a street name. The street name is left-justified with trailing spaces.
This is a record sequential file containing fixed length records of 80 bytes. The first six positions of each record is a sequence number. Positions 7-80 is a 74 byte text string containing the City, State and Zip code values. The following COBOL copy file (OBFPCDB1.cpy) shows the format of the records in the Post Codes file.
***************************************************************** * OBFPCDB1.CPY - a COBOL Copy File * * Record Structure for Postal Code File * * Copyright (C) 1987-2016 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 POSTCODE-REC. 05 POSTCODE-DATA-01. 10 POSTCODE-KEY pic 9(6). 10 POSTCODE-ZIP-10. 15 POSTCODE-ZIP-05 pic X(5). 15 POSTCODE-ZIP-EXT pic X(5). 10 POSTCODE-CITY pic X(27). 10 POSTCODE-STATE-GROUP. 15 POSTCODE-STATE pic X(2). 15 POSTCODE-STATE-EXT pic X(5). 10 POSTCODE-AREA-CODES pic X(30). * *** OBFPCDB1 - End-of-Copy File - - - - - - - - - - - OBFPCDB1 * ***************************************************************** *
This is a record sequential file containing fixed length records of 80 bytes. The following shows an example of records contained in the control file.
* A comment is identified by an asterisk (*) in position one (1) * ..:....1....:....2....:....3....:....4....:....5....:....6.... /CTL FLAGS=FFFF0100 /CTL RECORDS=100000
If position one (1) is an asterisk (*) the record is treated as a comment. If positions 1-5 contain the literal "/CTL " (position 5 is a space character) the record is treated as a control record and will be processed base on the text string in positions 6-80. The "/CTL " record expects the text string to contain an 'xxxxx=" value where "xxxxx" is a keyword followed by the equal sign followed by the parameter string.
| ||||||||||
Record Types within the Control File |
| ||||||||||||||||||
A Description of the Program Behavior Flags (Numbered 1 through 8) |
This section provides information that addresses specific items pertaining to the function and capabilities and their potential use within or beyond the author's original design objectives.
This section is a list of frequently asked questions preceded by a date stamp.
| ||||||
A List of Frequently Asked Questions |
The purpose of this program is to provide a model suite of programs that will create a file with obfuscated or generic names and addresses that may be used as a Customer Master File for testing purposes. 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 documents 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 Enterprises. 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 Enterprises.
SimoTime Enterprises 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 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, 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 JCL Connection for more examples of JCL functionality with programming techniques and sample code.
Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.
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.
This suite of programs and documentation is available to download for review and evaluation purposes. Other uses will require a SimoTime Software License. Link to an Evaluation zPAK Option that includes the program members, documentation and control files.
A good place to start is The SimoTime Home Page via Internet Connect for access to white papers, program examples and product information.
Explore The Micro Focus Web Site via Internet Connect for more information about products and services available from Micro Focus.
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 copyrighted and maintained by SimoTime Technologies.
If you have any questions, suggestions, comments or feedback please call or send an e-mail to: helpdesk@simotime.com
We appreciate hearing from you.
Founded in 1987, SimoTime Technologies 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 |
Create Generic Test Data, Generation of a Customer Master File |
Copyright © 1987-2016 SimoTime Technologies All Rights Reserved |
When technology complements business |
http://www.simotime.com |