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.
JCL members are provided to run the jobs as ZOS batch jobs on an IBM Mainframe System or as a project with Micro Focus Enterprise Developer running on a Windows System. CMD members are provided to run the jobs with Micro Focus Net Express running on a Windows System. Bash Script Files are provided to run the jobs on a Linux (Ubuntu) or UNIX System. GnuCOBOL (formerly known as Open COBOL) is used to compile and execute the COBOL Programs.
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 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.
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. Job ScriptsA job script may be defined as a text file containing job setup information followed by job steps that identify programs to be executed along with parameters unique to the job step. A job script may be created using a text editor. The naming of a job script is determined by the Operating System. A simple job script may contain a single job step that performs a single function. A typical job script will contain multiple job steps executed in a predefined sequence. The status of each job step may be tested at the end of each job step. CMD FilesThis 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. Create a Control FileThis procedure is a four step process and creates three new control files to be used in various execution environments.
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 set CmdName=OBFCTLE1 rem * ******************************************************************* rem * Batch Job Script - 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 - Create various sequential files with 80-byte records. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * This Job Script 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 * call ..\ENV1BASE rem * call SimoNOTE "*******************************************************%CmdName% " call SimoNOTE "Starting JobName %CmdName% " rem * *-----------------------------------------------------------------* call SimoNOTE "Job_Step 1 of 5, Preparing the System and Job Environments" set RecordCount=250 set JobStatus=0 set SYSOUT=%BASELIB1%\LOGS\SYSOUT_%CmdName%.txt set LSEQ0080=%BASECAT%\Txt1\SIMOTIME.TEXT.OBFCTL80.TXT if exist %LSEQ0080% del %LSEQ0080% call SIMONOTE "Generate the Control Files that define a record count of %RecordCount% " rem * *-----------------------------------------------------------------* call SimoNOTE "Job_Step 2 of 5, Create a Control File, ASC_LSEQ Format" 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 * 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=20 if not "%JobStatus%" == "0" goto EojTAG call SimoNOTE "Produced DataSet %LSEQ0080%" rem * rem * *-----------------------------------------------------------------* call SimoNOTE "Job_Step 3 of 5, Create a Control File, ASC_RSEQ Format" 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 * set GETLS080=%LSEQ0080% set PUTRS080=%BASECAT%\Asc1\SIMOTIME.DATA.OBFCTL80.DAT if exist %PUTRS080% del %PUTRS080% run CV80ALAR if not exist %PUTRS080% set JobStatus=30 if not "%JobStatus%" == "0" goto EojTAG call SimoNOTE "Produced DataSet %PUTRS080%" rem * rem * *-----------------------------------------------------------------* call SimoNOTE "Job_Step 4 of 5, Create a Control File, EBC_RSEQ Format" 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 * set GETLS080=%LSEQ0080% set PUTRS080=%BASECAT%\Ebc1\SIMOTIME.DATA.OBFCTL80.DAT if exist %PUTRS080% del %PUTRS080% run CV80ALER if not exist %PUTRS080% set JobStatus=40 if not "%JobStatus%" == "0" goto EojTAG call SimoNOTE "Produced DataSet %PUTRS080%" :EojTAG rem * *-----------------------------------------------------------------* call SimoNOTE "Job_Step 5 of 5, End of Job processing" if "%JobStatus%" == "0" goto :EojAOK goto :EojNOK rem * :EojAOK call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus% " goto :End :EojNOK call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus% " rem * :End call SimoNOTE "Conclude SYSOUT is %SYSOUT%" if not "%1" == "nopause" pause Sequential Load, New Customer FileThis 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 set CmdName=OBFADDE1 rem * ******************************************************************* rem * OBFADDE1.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 - 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 * call ..\Env1BASE if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG set SYSOUT=%BASELIB1%\LOGS\SYSOUT_%CmdName%.txt 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 SYSOUT is %SYSOUT%" if not "%1" == "nopause" pause Random Access, Existing Customer FileThis 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-2019 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 JCL MembersThe following are the JCL Members used in the suite of sample programs.
Create a Control FileThe 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-2019 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) // Create a Customer FileTo 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. Define a VSAM Cluster for a Customer FileThe 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-2019 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)) /* //* Sequential Load, New Customer FileThe 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-2019 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=* //* Random Access, Existing Customer FileThe 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-2019 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=* //* Delete an Existing Customer FileThe 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-2019 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 /* Bash Shell ScriptsThis suite of jobs comes with three (3) Bash Script files. The first job shows how to create the control file. The second job will show how to do the initial load of the customer file. The third job will show how to view selected records in a Hex-Dump format. The following sections provide additional detail about the Bash Script files. Create a Control FileThis procedure is a four step process and creates three new control files to be used in various execution environments.
The following is the source listing for a Bash Script (obfctls8.sh) that creates the control files for the application that generates a customer master file. #!/bin/bash JOBNAME=obfctls8 # ********************************************************************* # * Bash Script File - provided by SimoTime Technologies * # * (C) Copyright 1987-2018 All Rights Reserved * # * Web Site URL: http://www.simotime.com * # * e-mail: helpdesk@simotime.com * # ********************************************************************* # * # * Text - Create a Sequential Data. # * Author - SimoTime Technologies # * Date = January 24, 1996 # * # * The 1ST step will delete a previously created file and then # * create a new ASCII/Text file. # * The 2ND step will convert the Line Sequential file to a Record # * Sequential file and keep the ASCII encoding. # * The 3RD step will convert the Line Sequential file to a Record # * Sequential file and convert the record content from ASCII to EBCDIC # * # * This set of programs will run on a Linux System with GnuCOBOL. # * # * ******************************************************************** # * Step 1 of 3, Prepare the System Environment. # * JOBSTATUS=0 for textstring in $(cat ENV4SYS1.txt); do # # * The following statement will replace all occurences # # * of DL_BASESYS1 with the value of the BASESYS1 # # * environment variable. textstring=${textstring//DL_BASESYS1/$BASESYS1} # # * The following statement will replace all occurences # # * of DL_JOBNAME with the value of the JOBNAME # # * environment variable. textstring=${textstring/DL_JOBNAME/$JOBNAME} export $textstring rc=$? if [ $rc != 0 ] then simonote.sh "# $textstring - Return Code is $rc" JOBSTATUS=$rc fi done # * simonote.sh "************************************************************$JOBNAME" echo "# SIMOSYS1........... $BASESYS1" echo "# SIMONOTE........... $SIMONOTE" echo "# COB_LIBS........... $COB_LIBS" echo "# COB_LIBRARY_PATH... $COB_LIBRARY_PATH" simonote.sh "StepInfo Delete previously created files" export GETLS080=$BASESYS1/SIMOSAM1/DEVL/DATA/TXT1/OBFCTL80.txt # * # * ******************************************************************* # * Step 2 of 3 Create and populate a new ASCII/TEXT file... # * simonote.sh "StepInfo Create an ASCII/Text File" if [ -f "$GETLS080" ] then rm $GETLS080 fi # * ..1....:....2....:....3....:....4....:....5....:....6....:....7. echo "/CTL FLAGS=FFFF0100 ">>$GETLS080 echo "/CTL RECORDS=25000 ">>$GETLS080 if [ -f "$GETLS080" ] then simonote.sh "GETLS080 is $GETLS080" else simonote.sh "ABENDING File not created, $GETLS080" exit 9001 fi # * # * ******************************************************************* # * Step 2 of 3, Convert ASCII/TEXT file to ASCII RSEQ File... # * simonote.sh "StepInfo Convert Line Sequential to ASC Record Sequential" export PUTRS080=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.DATA.OBFCTL80.dat if [ -f "$PUTRS080" ] then rm $PUTRS080 fi cobcrun CV80ALAR rc=$? if [ $rc != 0 ] then simonote.sh "+ $name - Return Code is $rc" JOBSTATUS=$rc simonote.sh "ABENDING Job Name is $JOBNAME, Job Status is $JOBSTATUS" exit $JOBSTATUS else simonote.sh "DataTake $GETLS080" simonote.sh "DataMake $PUTRS080" fi # * # * ******************************************************************* # * Step 3 of 3 Convert ASCII/TEXT file to EBCDIC RSEQ File... # * simonote.sh "StepInfo Convert Line Sequential to EBC Record Sequential" export PUTRS080=$BASESYS1/SIMOSAM1/DEVL/DATA/EBC1/SIMOTIME.DATA.OBFCTL80.dat if [ -f "$PUTRS080" ] then rm $PUTRS080 fi cobcrun CV80ALER rc=$? if [ $rc != 0 ] then simonote.sh "+ $name - Return Code is $rc" JOBSTATUS=$rc simonote.sh "ABENDING Job Name is $JOBNAME, Job Status is $JOBSTATUS" exit $JOBSTATUS else simonote.sh "DataTake $GETLS080" simonote.sh "DataMake $PUTRS080" fi # * if [ "$JOBSTATUS" = "0" ] then simonote.sh "Finished Job Name $JOBNAME" else simonote.sh "ABENDING Job Name $JOBNAME" fi Sequential Load, New Customer FileThis script (obfadds1.sh) 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. #!/bin/bash JOBNAME=obfadds1 # * ******************************************************************* # * Bash Script File - provided by SimoTime Technologies * # * (C) Copyright 1987-2018 All Rights Reserved * # * Web Site URL: http://www.simotime.com * # * e-mail: helpdesk@simotime.com * # * ******************************************************************* # * # * Text - Execute program, Add records to Customer Master File # * Author - SimoTime Technologies # * Date - November 11, 2003 # * Version - 06.07.16 # * # * Prepare the environment by mapping the file names. # * Execute the 80/80 copy file program. # * # * ******************************************************************** # * Step 1 of 3, Prepare the System Environment. # * JOBSTATUS=0 for textstring in $(cat ENV4SYS1.txt); do # # * The following statement will replace all occurences # # * of DL_BASESYS1 with the value of the BASESYS1 # # * environment variable. textstring=${textstring//DL_BASESYS1/$BASESYS1} # # * The following statement will replace all occurences # # * of DL_JOBNAME with the value of the JOBNAME # # * environment variable. textstring=${textstring/DL_JOBNAME/$JOBNAME} export $textstring rc=$? if [ $rc != 0 ] then simonote.sh "# $textstring - Return Code is $rc" JOBSTATUS=$rc fi done # * simonote.sh "************************************************************$JOBNAME" simonote.sh "# Starting Job Name $JOBNAME" simonote.sh "# SIMOSYS1........... $BASESYS1" simonote.sh "# SIMONOTE........... $SIMONOTE" simonote.sh "# COB_LIBS........... $COB_LIBS" simonote.sh "# COB_LIBRARY_PATH... $COB_LIBRARY_PATH" # * # * Prepare the environment, map the file names... export OBFCTL80=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.DATA.OBFCTL80.dat export FNAMEM01=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.DATA.FNAMEM01.dat export FNAMEF01=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.DATA.FNAMEF01.dat export LASTNAME=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.DATA.LASTNAME.dat export POSTCODE=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.DATA.POSTCODE.dat export STREET01=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.DATA.STREET01.dat export OBF1CUST=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.DATA.OBF1CUST.dat simonote.sh "# DATATAKE is $OBFCTL80" simonote.sh "# DATAMAKE is $OBF1CUST" # * # * ******************************************************************** # * Step 2 of 3, Run the program. # * cobcrun OBFDATC2 | tee $BASESYS1/SIMOSAM1/DEVL/LOGS/SYSOUT_USERPROG_OBFDATC2.txt rc=$? if [ $rc != 0 ] then simonote.sh "# ABENDING $name - Return Code is $rc" JOBSTATUS=$rc else ((AOK_Count++)) fi # * # * ******************************************************************** # * Step 3 of 3, End of Job Processing. # * if [ "$JOBSTATUS" = "0" ] then simonote.sh "# Finished Job Name $JOBNAME" else simonote.sh "# ABENDING Job Name $JOBNAME" fi Hex-Dump of User-Selected RecordsThis script (obfhexs3.sh) will read user-defined selected records and produce a Hex-Dump of the selected records. The Hex-Dump information is written to a sequential file and contains all text data. It may be viewed with a text editor of choice. #!/bin/bash JOBNAME=obfhexs3 # * ******************************************************************* # * Bash Script File - provided by SimoTime Technologies * # * (C) Copyright 1987-2018 All Rights Reserved * # * Web Site URL: http://www.simotime.com * # * e-mail: helpdesk@simotime.com * # * ******************************************************************* # * # * Text - Execute program, Justify Text String within a Field # * Author - SimoTime Technologies # * Date - November 11, 2003 # * Version - 06.07.16 # * # * Prepare the environment by mapping the file names. # * Execute the 80/80 copy file program. # * # * ******************************************************************** # * Step 1 of 3, Prepare the System Environment. # * JOBSTATUS=0 for textstring in $(cat ENV4SYS1.txt); do # # * The following statement will replace all occurences # # * of DL_BASESYS1 with the value of the BASESYS1 # # * environment variable. textstring=${textstring//DL_BASESYS1/$BASESYS1} # # * The following statement will replace all occurences # # * of DL_JOBNAME with the value of the JOBNAME # # * environment variable. textstring=${textstring/DL_JOBNAME/$JOBNAME} export $textstring rc=$? if [ $rc != 0 ] then simonote.sh "# $textstring - Return Code is $rc" JOBSTATUS=$rc fi done # * simonote.sh "************************************************************$JOBNAME" simonote.sh "# Starting Job Name $JOBNAME" simonote.sh "# SIMOSYS1........... $BASESYS1" simonote.sh "# SIMONOTE........... $SIMONOTE" simonote.sh "# COB_LIBS........... $COB_LIBS" simonote.sh "# COB_LIBRARY_PATH... $COB_LIBRARY_PATH" # * # * Prepare the environment, map the file names... export SYSUT1=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.DATA.OBF1CUST.dat export SYSUT2=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.HEXDUMP.OBF1CUST.dat export SYSUT3=$BASESYS1/SIMOSAM1/DEVL/DATA/APPL/SIMOTIME.HEXDUMP.OBF1KEYS.dat simonote.sh "# DATATAKE is $SYSUT1" simonote.sh "# DATAMAKE is $SYSUT2" simonote.sh "# DATAKEYS is $SYSUT3" # * # * ******************************************************************* # * Step 2 of 4, Create a file that is a list of Customer Numbers... # * simonote.sh "Identify JobStep Step-2, Create a list of keys" export SYSWORK=$BASESYS1/SIMOSAM1/DEVL/DATA/TXT1/SIMOTIME.HEXDUMP.OBF1KEYS.txt if [ -f "$SYSWORK" ] then rm $SYSWORK fi # * ..:....1....:....2....:....3....:....4....:....5....:....6.... echo "/USERKEY 000000000010">$SYSWORK echo "/USERKEY 000000000020">>$SYSWORK echo "/USERKEY 000000022049">>$SYSWORK echo "/USERKEY 000000025000">>$SYSWORK # * simonote.sh "StepInfo Convert Line Sequential to Record Sequential" export GETLS080=$SYSWORK export PUTRS080=$SYSUT3 if [ -f "$PUTRS080" ] then rm $PUTRS080 fi cobcrun CV80ALAR rc=$? if [ $rc != 0 ] then simonote.sh "# ABENDING $name - Return Code is $rc" JOBSTATUS=$rc exit $rc fi # * # * # * ******************************************************************** # * Step 2 of 3, Run the program. # * if [ -f "$SYSUT2" ] then rm $SYSUT2 fi cobcrun CUHEXKC3 | tee $BASESYS1/SIMOSAM1/DEVL/LOGS/SYSOUT_USERPROG_$JOBNAME.txt rc=$? if [ $rc != 0 ] then simonote.sh "# ABENDING $name - Return Code is $rc" JOBSTATUS=$rc else ((AOK_Count++)) fi # * simonote.sh "StepInfo Convert Record Sequential to Line Sequential" export RSEQ0512=$SYSUT2 export LSEQ0512=$BASESYS1/SIMOSAM1/DEVL/DATA/TXT1/SIMOTIME.HEXDUMP.OBF1DUMP.txt if [ -f "$LSEQ0512" ] then rm $LSEQ0512 fi simonote.sh "# RSEQ0512 is $RSEQ0512" simonote.sh "# LSEQ0512 is $LSEQ0512" cobcrun CV1HARAL rc=$? if [ $rc != 0 ] then simonote.sh "# ABENDING $name - Return Code is $rc" JOBSTATUS=$rc exit $rc fi # * nohup gedit --encoding=WINDOWS-1252 $LSEQ0512 >/dev/null &# * # * ******************************************************************** # * Step 3 of 3, End of Job Processing. # * if [ "$JOBSTATUS" = "0" ] then simonote.sh "# Finished Job Name $JOBNAME" else simonote.sh "# ABENDING Job Name $JOBNAME" fi Ancillary FunctionsThis section provides additional detail about Micro Focus Server usage and configuration. Set the EnvironmentA command file (ENV1BASE.cmd) that 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" Display and Log MessagesThe 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-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 Console.Log Backup, Ten LevelsA 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 * Data FilesAs 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. Data File, The Customer Master FileThis 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. Data File, The First Names FilesThere 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. Data File, First Names File for FemalesThis 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. Data File, First Names File for MalesThis 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. Data File, The Last Names FileThis 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. Data File, The Street Names FileThis 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. Data File, The Postal Codes FileThis 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-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 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 * ***************************************************************** * Data File, The Program Control FileThis 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.
Possibilities and ConsiderationsThis 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. Frequently Asked Questions (FAQ's)This section is a list of frequently asked questions preceded by a date stamp.
SummaryThe 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 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 documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration. SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the Contact or Feedback section of this document.
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. Downloads and LinksThis 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. Current Server or Internet AccessThe 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 that are used to interpret the results of accessing VSAM data sets and/or QSAM files. Internet Access RequiredThe following links will require an Internet connection. 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 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 GnuCOBOL Technologies available from SourceForge. SourceForge is an Open Source community resource dedicated to helping open source projects be as successful as possible. GnuCOBOL (formerly OpenCOBOL) is a COBOL compiler with run time support. The compiler (cobc) translates COBOL source to executable using intermediate C, designated C compiler and linker. This link will require an Internet Connection. Glossary of TermsExplore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers. Contact or FeedbackThis document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
We appreciate hearing from you. Company OverviewSimoTime 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
|