|
Variable Length Records ASCII/Text to Record Sequential |
![]() |
| The SimoTime Home Page |
The example will describe how to convert an ASCII/Text file (Line Sequential) to a Micro Focus Record Sequential file with variable length records. The COBOL program that does the file format conversion was generated using SimoTime Technology running on a Windows System with Micro Focus Net Express.
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
The conversion task is a three (3) step job. The first step prepares the environment, the second step executes the conversion program and the third step completes the job with End of Job processing. The following is a listing of the command file (TXVREXE1.cmd) used in this example.
@echo OFF
rem * *******************************************************************
rem * TXVRECE1.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 - Read variable ASCII/Text,write variable Record Sequential
rem * Author - SimoTime Technologies
rem * Created - 2003/04/24
rem * Updated - 2011/03/15
rem * Version - 04.01.20
rem *
rem * This procedure uses the following Command Files.
rem * 1. Env1BASE.CMD - provides a single point for setting commonly
rem * used environment variables.
rem * 2. SimoNOTE.CMD - provides a consistent process for displaying
rem * messages to the screen and writing to a log
rem * or journal file.
rem *
rem * This set of programs illustrates the use of COBOL programs to read
rem * an, ASCII/Text file and create a Record Sequential file using
rem * variable length records.
rem *
rem * The COBOL program is compiled with the ASSIGN(EXTERNAL) directive.
rem * This provides for external file mapping of the file names.
rem *
rem * This set of programs will run on a Personal Computer with Windows
rem * and Micro Focus Net Express.
rem *
rem * ************
rem * * TXVRECE1 *
rem * ********cmd*
rem * *
rem * *
rem * ************ ************
rem * * if EXIST ******* CUSTLCSV *
rem * *******stmt* * ******erase*
rem * *
rem * *
rem * ************ ************ ************
rem * * GETLSEQ ******* TXVRECC1 ******* PUTRVRL *
rem * *******lffl* ********cbl* *******rvlr*
rem * *
rem * *
rem * ************
rem * * EOJ *
rem * ********cmd*
rem *
rem * Note-1: RVLR=Record Sequential with Variable-Length-Records.
rem * Note-2: LFFL=Line Sequential with Fixed-Field-Length format.
rem *
rem * ********************************************************************
rem * Step 1 of 3, Prepare the Environment...
rem *
call ..\Env1BASE
if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
set JobName=TXVRECE1
rem *
call SimoNOTE "*******************************************************%JobName%"
call SimoNOTE "Starting JobName %JobName%, User is %USERNAME%"
rem * *******************************************************************
rem * Step 2 of 3, Map File Names and Execute the Convert Program.
rem *
set GETLSEQ=%BaseLib1%\DATA\TXT1\GETLSEQ1.TXT
set PUTRVLR=%BaseLib1%\DATA\WRK1\PUTRVLR1.DAT
if exist %PUTRVLR% erase %PUTRVLR%
:CblCsvC1
run TXVRECC1
if not "%ERRORLEVEL%" == "0" set JobStatus=0010
if not %JobStatus% == 0000 goto :EojNok
rem *
if exist %PUTRVLR% goto :EojAok
set JobStatus=0020
goto :EojNok
rem * *******************************************************************
rem * Step 3 of 3, End of Job Processing.
rem *
:EojAok
call SimoNOTE "DataTake GETLSEQ=%GETLSEQ%"
call SimoNOTE "DataMake PUTRVLR=%PUTRVLR%"
call SimoNOTE "Finished JobName %JobName%, Job Status is %JobStatus%"
goto :End
:EojNok
call SimoNOTE "ABENDING JobName %JobName%, Job Status is %JobStatus%"
:End
call SimoNOTE "Conclude SYSOUT is %SYSOUT%"
if not "%1" == "nopause" pause
The following program (TXVRECC1.cbl) was generated using SimoTime Technologies. It is a COBOL program that may be compiled and executed on a Linux, UNIX or Windows (LUW) system that is supported by Micro Focus COBOL. The input file is a Line Sequential (or ASCII/Text) file. Since this file format is unique to the LUW systems it will not compile and execute on an IBM Mainframe System. If the "Line Sequential" specification were changed to "Sequential" it would compile and execute on an IBM Mainframe System.
The output file is a record sequential file with variable length records. This format is supported by Micro Focus on the LUW Systems and by IBM on the Mainframe Systems (both ZOS and VSE).
IDENTIFICATION DIVISION.
PROGRAM-ID. TXVRECC1.
AUTHOR. SIMOTIME TECHNOLOGIES.
*****************************************************************
* This program was generated by SimoZAPS *
* A product of SimoTime Technologies *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
* *
* Generation Date: 2011-05-04 Generation Time: 13:45:16:20 *
* *
* Record Record Key *
* Function Name Organization Format Max-Min Pos-Len *
* INPUT GETLSEQ ASCII/CRLF VARIABLE 32760 *
* 00004 *
* OUTPUT PUTRVLR SEQUENTIAL VARIABLE 32760 *
* 00004 *
* *
*****************************************************************
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT GETLSEQ-FILE ASSIGN TO GETLSEQ
ORGANIZATION IS LINE SEQUENTIAL
ACCESS MODE IS SEQUENTIAL
FILE STATUS IS GETLSEQ-STATUS.
SELECT PUTRVLR-FILE ASSIGN TO PUTRVLR
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL
FILE STATUS IS PUTRVLR-STATUS.
*****************************************************************
DATA DIVISION.
FILE SECTION.
FD GETLSEQ-FILE
DATA RECORD IS GETLSEQ-REC
RECORDING MODE IS V
RECORD VARYING FROM 00004 TO 32760
DEPENDING ON GETLSEQ-LRECL
.
01 GETLSEQ-REC.
05 GETLSEQ-DATA-01 PIC X(32760).
FD PUTRVLR-FILE
DATA RECORD IS PUTRVLR-REC
RECORDING MODE IS V
RECORD VARYING FROM 00004 TO 32760
DEPENDING ON PUTRVLR-LRECL
.
01 PUTRVLR-REC.
05 PUTRVLR-DATA-01 PIC X(32760).
*****************************************************************
* This program was created with the SYSMASK1.TXT file as input. *
* The SYSMASK1 provides for the sequential reading of the input *
* file and the sequential writing of the output file. *
* *
* If the output file is indexed then the input file must be in *
* sequence by the field that will be used to provide the key *
* for the output file. This is a sequential load process. *
* *
* If the key field is not in sequence then refer to SYSMASK2 *
* to provide for a random add or update of the indexed file. *
* *
* This program mask will have the ASCII/EBCDIC table inserted *
* for use by the /TRANSLATE function of SimoZAPS. *
* *
* For additional information contact SimoTime Technologies. *
* *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
WORKING-STORAGE SECTION.
01 SIM-TITLE.
05 T1 pic X(11) value '* TXVRECC1 '.
05 T2 pic X(34) value 'Convert LSEQ File to VREC 4-32,760'.
05 T3 pic X(10) value ' v11.05.02'.
05 T4 pic X(24) value ' helpdesk@simotime.com'.
01 SIM-COPYRIGHT.
05 C1 pic X(11) value '* TXVRECC1 '.
05 C2 pic X(32) value 'This Data File Convert Member wa'.
05 C3 pic X(32) value 's generated by SimoTime Technolo'.
05 C4 pic X(04) value 'gies'.
01 GETLSEQ-STATUS.
05 GETLSEQ-STATUS-L pic X.
05 GETLSEQ-STATUS-R pic X.
01 GETLSEQ-EOF pic X value 'N'.
01 GETLSEQ-OPEN-FLAG pic X value 'C'.
01 PUTRVLR-STATUS.
05 PUTRVLR-STATUS-L pic X.
05 PUTRVLR-STATUS-R pic X.
01 PUTRVLR-EOF pic X value 'N'.
01 PUTRVLR-OPEN-FLAG pic X value 'C'.
01 GETLSEQ-LRECL pic 9(5) value 32760.
01 PUTRVLR-LRECL pic 9(5) value 32760.
01 GETLSEQ-LRECL-MAX pic 9(5) value 32760.
*****************************************************************
* The following buffers are used to create a four-byte status *
* code that may be displayed. *
*****************************************************************
01 IO-STATUS.
05 IO-STAT1 pic X.
05 IO-STAT2 pic X.
01 IO-STATUS-04.
05 IO-STATUS-0401 pic 9 value 0.
05 IO-STATUS-0403 pic 999 value 0.
01 TWO-BYTES-BINARY pic 9(4) BINARY.
01 TWO-BYTES-ALPHA redefines TWO-BYTES-BINARY.
05 TWO-BYTES-LEFT pic X.
05 TWO-BYTES-RIGHT pic X.
*****************************************************************
* Message Buffer used by the Z-DISPLAY-MESSAGE-TEXT routine. *
*****************************************************************
01 MESSAGE-BUFFER.
05 MESSAGE-HEADER pic X(11) value '* TXVRECC1 '.
05 MESSAGE-TEXT.
10 MESSAGE-TEXT-1 pic X(68) value SPACES.
10 MESSAGE-TEXT-2 pic X(188) value SPACES.
*****************************************************************
01 PROGRAM-NAME pic X(8) value 'TXVRECC1'.
01 INFO-STATEMENT.
05 INFO-SHORT.
10 INFO-ID pic X(8) value 'Starting'.
10 filler pic X(2) value ', '.
10 filler pic X(34)
value 'Convert LSEQ File to VREC 4-32,760'.
05 filler pic X(24)
value ' http://www.SimoTime.com'.
01 APPL-RESULT pic S9(9) comp.
88 APPL-AOK value 0.
88 APPL-EOF value 16.
01 GETLSEQ-TOTAL.
05 GETLSEQ-RDR pic 9(9) value 0.
05 filler pic X(3) value ' - '.
05 filler pic X(23) value 'Line count for GETLSEQ '.
01 PUTRVLR-TOTAL.
05 PUTRVLR-ADD pic 9(9) value 0.
05 filler pic X(3) value ' - '.
05 filler pic X(23) value 'Line count for PUTRVLR '.
01 N-1 pic 9(7)V9(9) value 0.
01 N-2 pic 9(7)V9(9) value 0.
01 N-3 pic 9(7)V9(9) value 0.
01 N-4 pic 9(7)V9(9) value 0.
01 N-5 pic 9(7)V9(9) value 0.
*****************************************************************
PROCEDURE DIVISION.
move all '*' to MESSAGE-TEXT-1
perform Z-DISPLAY-MESSAGE-TEXT
move INFO-STATEMENT to MESSAGE-TEXT-1
perform Z-DISPLAY-MESSAGE-TEXT
move all '*' to MESSAGE-TEXT-1
perform Z-DISPLAY-MESSAGE-TEXT
perform Z-POST-COPYRIGHT
perform GETLSEQ-OPEN
perform PUTRVLR-OPEN
perform until GETLSEQ-STATUS not = '00'
perform GETLSEQ-READ
if GETLSEQ-STATUS = '00'
add 1 to GETLSEQ-RDR
perform BUILD-OUTPUT-RECORD
perform PUTRVLR-WRITE
if PUTRVLR-STATUS = '00'
add 1 to PUTRVLR-ADD
end-if
end-if
end-perform
move GETLSEQ-TOTAL to MESSAGE-TEXT
perform Z-DISPLAY-MESSAGE-TEXT
move PUTRVLR-TOTAL to MESSAGE-TEXT
perform Z-DISPLAY-MESSAGE-TEXT
if APPL-EOF
move 'Complete' to INFO-ID
else
move 'ABENDING' to INFO-ID
end-if
move INFO-STATEMENT to MESSAGE-TEXT(1:79)
perform Z-DISPLAY-MESSAGE-TEXT
perform PUTRVLR-CLOSE
perform GETLSEQ-CLOSE
GOBACK.
*****************************************************************
BUILD-OUTPUT-RECORD.
* TransINIT process...
move ALL SPACES to PUTRVLR-REC
* TransVREC Enabled ...
add GETLSEQ-LRECL to ZERO giving PUTRVLR-LRECL
move GETLSEQ-REC(1:GETLSEQ-LRECL)
to PUTRVLR-REC(1:PUTRVLR-LRECL)
exit.
*****************************************************************
* I/O Routines for the INPUT File... *
*****************************************************************
GETLSEQ-CLOSE.
add 8 to ZERO giving APPL-RESULT.
close GETLSEQ-FILE
if GETLSEQ-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
else
add 12 to ZERO giving APPL-RESULT
end-if
if APPL-AOK
CONTINUE
else
move 'CLOSE Failure with GETLSEQ ' to MESSAGE-TEXT
perform Z-DISPLAY-MESSAGE-TEXT
move GETLSEQ-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*---------------------------------------------------------------*
GETLSEQ-READ.
read GETLSEQ-FILE
if GETLSEQ-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
else
if GETLSEQ-STATUS = '10'
add 16 to ZERO giving APPL-RESULT
else
add 12 to ZERO giving APPL-RESULT
end-if
end-if
if APPL-AOK
CONTINUE
else
if APPL-EOF
move 'Y' to GETLSEQ-EOF
else
move 'READ Failure with GETLSEQ ' to MESSAGE-TEXT
perform Z-DISPLAY-MESSAGE-TEXT
move GETLSEQ-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
end-if
exit.
*---------------------------------------------------------------*
GETLSEQ-OPEN.
add 8 to ZERO giving APPL-RESULT.
open input GETLSEQ-FILE
if GETLSEQ-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
move 'O' to GETLSEQ-OPEN-FLAG
else
add 12 to ZERO giving APPL-RESULT
end-if
if APPL-AOK
CONTINUE
else
move 'OPEN Failure with GETLSEQ ' to MESSAGE-TEXT
perform Z-DISPLAY-MESSAGE-TEXT
move GETLSEQ-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*****************************************************************
* I/O Routines for the OUTPUT File... *
*****************************************************************
PUTRVLR-WRITE.
if PUTRVLR-OPEN-FLAG = 'C'
perform PUTRVLR-OPEN
end-if
write PUTRVLR-REC
if PUTRVLR-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
else
if PUTRVLR-STATUS = '10'
add 16 to ZERO giving APPL-RESULT
else
add 12 to ZERO giving APPL-RESULT
end-if
end-if.
if APPL-AOK
CONTINUE
else
move 'WRITE Failure with PUTRVLR ' to MESSAGE-TEXT
perform Z-DISPLAY-MESSAGE-TEXT
move PUTRVLR-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*---------------------------------------------------------------*
PUTRVLR-OPEN.
add 8 to ZERO giving APPL-RESULT.
open OUTPUT PUTRVLR-FILE
if PUTRVLR-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
move 'O' to PUTRVLR-OPEN-FLAG
else
add 12 to ZERO giving APPL-RESULT
end-if
if APPL-AOK
CONTINUE
else
move 'OPEN Failure with PUTRVLR ' to MESSAGE-TEXT
perform Z-DISPLAY-MESSAGE-TEXT
move PUTRVLR-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*---------------------------------------------------------------*
PUTRVLR-CLOSE.
add 8 to ZERO giving APPL-RESULT.
close PUTRVLR-FILE
if PUTRVLR-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
move 'C' to PUTRVLR-OPEN-FLAG
else
add 12 to ZERO giving APPL-RESULT
end-if
if APPL-AOK
CONTINUE
else
move 'CLOSE Failure with PUTRVLR ' to MESSAGE-TEXT
perform Z-DISPLAY-MESSAGE-TEXT
move PUTRVLR-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*****************************************************************
* The following Z-ROUTINES provide administrative functions *
* for this program. *
*****************************************************************
* ABEND the program, post a message to the console and issue *
* a STOP RUN. *
*****************************************************************
Z-ABEND-PROGRAM.
if MESSAGE-TEXT not = SPACES
perform Z-DISPLAY-MESSAGE-TEXT
end-if
move 'PROGRAM-IS-ABENDING...' to MESSAGE-TEXT
perform Z-DISPLAY-MESSAGE-TEXT
add 12 to ZERO giving RETURN-CODE
STOP RUN.
* exit.
*****************************************************************
* Display CONSOLE messages... *
*****************************************************************
Z-DISPLAY-MESSAGE-TEXT.
if MESSAGE-TEXT-2 = SPACES
display MESSAGE-BUFFER(1:79)
else
display MESSAGE-BUFFER
end-if
move all SPACES to MESSAGE-TEXT
exit.
*****************************************************************
* Display the file status bytes. This routine will display as *
* four digits. If the full two byte file status is numeric it *
* will display as 00nn. If the 1st byte is a numeric nine (9) *
* the second byte will be treated as a binary number and will *
* display as 9nnn. *
*****************************************************************
Z-DISPLAY-IO-STATUS.
if IO-STATUS not NUMERIC
or IO-STAT1 = '9'
move IO-STAT1 to IO-STATUS-04(1:1)
subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY
move IO-STAT2 to TWO-BYTES-RIGHT
add TWO-BYTES-BINARY to ZERO giving IO-STATUS-0403
move 'File Status is: nnnn' to MESSAGE-TEXT
move IO-STATUS-04 to MESSAGE-TEXT(17:4)
perform Z-DISPLAY-MESSAGE-TEXT
else
move '0000' to IO-STATUS-04
move IO-STATUS to IO-STATUS-04(3:2)
move 'File Status is: nnnn' to MESSAGE-TEXT
move IO-STATUS-04 to MESSAGE-TEXT(17:4)
perform Z-DISPLAY-MESSAGE-TEXT
end-if
exit.
*****************************************************************
Z-POST-COPYRIGHT.
display SIM-TITLE
display SIM-COPYRIGHT
exit.
*****************************************************************
* This program was generated by SimoZAPS *
* A product of SimoTime Technologies *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
* *
* Generation Date: 2011-05-04 Generation Time: 13:45:16:24 *
*****************************************************************
When managing non-relational data files in an environment that requires data file conversion and comparison it is quite often necessary to address unique or specialized requirements by writing a program. This type of programming uses techniques that are similar within the convert/compare processing but not typical to what an application programmer is accustom to doing in their day-to-day activities. Also, writing a program plus the effort to test, correct and retest can be very time consuming.
To generate a conversion or comparison program requires a Process Control File (PCF). Depending on the options specified the generation process may do the following.
| ||||||||
| Possible Functions for a data File Conversion |
The following (TXVREC01.pcf) is the Process Control File used to generate the conversion program to do a file format conversion from an ASCII/Text file to a Micro Focus Record Sequential file with variable length records.
*********************************************************************** * This Process Control File is provided by SimoTime Enterprises * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * SYSUT1 is an ASCII/Text file with variable-length records. * * SYSUT2 is a Record Sequential file with variable-length records. * *********************************************************************** * This Process Control File will be used to generate a callable COBOL * routine. * Refer to the utconv01.htm document for additional detail. * * The following group of statements will define the high level * functions and processes to be performed. * &SIMOPREP call ..\..\ENV1BASE &USERPREP call USERCONV * * The following group of statements will define the behavioral * characteristics and environment variable for the file I/O Program * to be generated. * *HEAD34 ....:....1....:....2....:....3.... &HEAD34 Convert LSEQ File to VREC 4-32,760 &PROGID TXVRECC1 &SYSUT1 name=GETLSEQ org=ASCII/Text recfm=VARIABLE rmin=4 rmax=32760 RECMODE RECVARY &SYSUT2 name=PUTRVLR org=Sequential recfm=VARIABLE rmin=4 rmax=32760 RECMODE RECVARY TRUNC=SYSUT1 * * The following group of statements will define the behavioral * characteristics and environment variables for the record content * conversion program to be generated. * &TRANSINIT SPACES &TransVREC ENABLE TRUNC MOVE * &END
This section provides information about the preparation required prior to running the conversion program. The following command (TXVRECE8.cmd) will create the test file used as input to the file conversion program.
@echo OFF
rem * *******************************************************************
rem * TXVRECE8.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 an ASCII/Text file for Testing Purposes
rem * Author - SimoTime Technologies
rem * Created - 2003/04/24
rem * Updated - 2011/03/15
rem * Version - 04.01.20
rem *
rem * This procedure uses the following Command Files.
rem * 1. Env1BASE.CMD - provides a single point for setting commonly
rem * used environment variables.
rem * 2. SimoNOTE.CMD - provides a consistent process for displaying
rem * messages to the screen and writing to a log
rem * or journal file.
rem *
rem * This script illustrates the use of Windows "echo" command to
rem * create an ASCII/Text file with variable text strings.
rem *
rem * This script will run on a Personal Computer with Windows.
rem *
rem * ************
rem * * TXVRECE8 *
rem * ********cmd*
rem * *
rem * *
rem * ************ ************
rem * * if EXIST ******* GETLSEQ *
rem * *******stmt* * ******erase*
rem * *
rem * *
rem * ************ ************
rem * * echo ******* GETLSEQ *
rem * ********cbl* *******rseq*
rem * *
rem * *
rem * ************
rem * * EOJ *
rem * ********cmd*
rem *
rem * Note-1: LSEQ=Line Sequential.
rem *
rem * ********************************************************************
rem * Step 1 of 3, Prepare the Environment...
rem *
call ..\Env1BASE
if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
set JobName=TXVRECE8
rem *
call SimoNOTE "*******************************************************%JobName%"
call SimoNOTE "Starting JobName %JobName%, User is %USERNAME%"
rem * *******************************************************************
rem * Step 2 of 3, Map File Name and Create the Test File.
rem *
set GETLSEQ=%BaseLib1%\DATA\TXT1\GETLSEQ1.TXT
if exist %GETLSEQ% erase %GETLSEQ%
echo FIRST>>%GETLSEQ%
echo abcdefghijklmnopqrstuvwxyz>>%GETLSEQ%
echo 0123456789>>%GETLSEQ%
echo LAST>>%GETLSEQ%
if not "%ERRORLEVEL%" == "0" set JobStatus=0010
if not %JobStatus% == 0000 goto :EojNok
rem *
if exist %GETLSEQ% goto :EojAok
set JobStatus=0020
goto :EojNok
rem * *******************************************************************
rem * Step 3 of 3, End of Job Processing.
rem *
:EojAok
call SimoNOTE "DataMake GETLSEQ=%GETLSEQ%"
call SimoNOTE "Finished JobName %JobName%, Job Status is %JobStatus%"
goto :End
:EojNok
call SimoNOTE "ABENDING JobName %JobName%, Job Status is %JobStatus%"
:End
call SimoNOTE "Conclude SYSOUT is %SYSOUT%"
if not "%1" == "nopause" pause
This section provides information about program members that are used by this suite of programs and shared with other tasks or applications. These ancillary program members are available as a separate package or as part of the SimoTime Enterprise package.
This link provides detailed information for the Common or Shared program members.
A Windows command file (ENV1BASE.cmd) is called from other command files to set commonly used environment variables. This provides a single point of definition. The following is a listing of the contents of the command file.
@echo OFF
rem * *******************************************************************
rem * ENV1BASE.cmd - a Windows Command File *
rem * This program is provided by SimoTime Technologies *
rem * (C) Copyright 1987-2021 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - Provide a single point to set common environment variables.
rem * Author - SimoTime Technologies
rem * Date - January 24, 1996
rem *
rem * Set the commonly used environment variables. This is used to provide
rem * a single point for managing the commonly used environment variables.
rem *
set SimoLIBR=c:\SimoLIBR
set BASELIB1=c:\SIMOSAM1\DEVL
set BASELIB8=c:\SimoSAM8
set BaseWIP1=c:\SimoSAM1\WIP1
set DATAZERO=c:\SIMODATA\DEVL\DATA\ZERO
set BASEAPP=%BaseLib1%
set BASESYS=%BaseLib1%\SYS1
set BASECAT=%BaseLib1%\DATA
set UMAPALIB=%BASECAT%\ASC1
set UMAPELIB=%BASECAT%\EBC1
set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT
set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.txt
set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT
set PostNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT
set SIMONOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.txt
set USERPOST=%BASEAPP%\LOGS\ASSIGNED_USER_POST_FILE.txt
if [%1]==[] goto NO_POST
set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%1.txt
call SIMONOTE "+ ENV1BASE *"
call SIMONOTE "+ ENV1BASE ********************************************************************%1"
call SIMONOTE "+ ENV1BASE is preparing the System Environment..."
call SIMONOTE "+ SIMOLIBR is %SIMOLIBR%"
call SIMONOTE "+ MIFOSYS1 is %MIFOSYS1%"
call SIMONOTE "+ BASELIB1 is %BASELIB1%"
:NO_POST
call SIMONOTE "+ SIMONOTE Job Log File is %SIMONOTE% "
rem *
set MQBASE=C:\Program Files\IBM\WebSphere MQ
rem *
rem * Set the location for the Apache-Tomcat Server...
set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52
rem set CATALINA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112
rem *
rem * Set the Environment for the Java Environment...
rem set JAVABASE=C:\APACHETC\apache-tomcat-7.0.52
set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112
set JAVASDK="%JAVABASE%\bin"
set JAVA_HOME=%JAVABASE%
set JRE_HOME=%JAVABASE%
set SIMOTCAT=%CATALINA_HOME%\webapps\simotcat
set SIMPACKS=%CATALINA_HOME%\webapps\simotcat\WEB-INF\classes\simpacks
rem *
rem * Set the environment for the Micro Focus technology...
set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer
set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL Build Tools
set MIFOESTU=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0
set MIFOEMFE="C:\Program Files (x86)\Micro Focus\Mainframe Express"
rem *
rem * Large file support, performance tuning and record locking of the File Handler
set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG
rem *
rem * For IMS Support
set ES_IMSLIB=%BASEAPP%\IMSLIB
set ES_ACBLIB=%BASEAPP%\IMSLIB
rem *
rem * EZASOKETS Check EZASOKETS Enabled box or set ES_EZASOKET_SUPPORT=YES
set EZACONFG=BASESYS1\CONFIG\EZACONFG.dat
rem *
rem * Resource Allocation and Performance for SORT and non-Relational Data
rem set MFJSENGINE=SYNCSORT
set SORTSCHEME=1
set SORTSPACE=750000000
set TMP=C:\SORTWORK
rem *
set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg
rem * For CORE_ON_ERROR function, ABEND Dump
rem * set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg
rem *
rem * Consolidated Trace Facility (CTF)
rem * set MFTRACE_CONFIG=%BASESYS%\CONFIG\ctf.cfg
rem * set MFTRACE_LOGS=c:\ctflogs
rem *
rem * For Job Restart, ABEND Recovery
set MF_UCC11=Y
set ES_JES_RESTART=Y
rem *
rem * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
set ES_EMP_EXIT_1=mfbsiemx
set MFBSI_DIR=%BASESYS%\LOGS\%JESSERVERNAME%
set MFBSIEOP_CMD=ENABLE
set MFBSIEOP_CSV=ENABLE
set MFBSIEOP_HTM=ENABLE
set MFBSIEOP_XML=ENABLE
rem *
rem * Set Behavior and Trace Flags for GETJOBDD
rem * Position=12345678/12345678
set JDDFLAGS=nnnWnnnn/YYnnnnnn
rem *
rem * If not already set then set the PATH for Micro Focus Directories
if "%SIMOPATH%" == "Y" goto JUMPPATH
if "%MIFOSYS1%" == "EDEV" goto JUMPEDEV
if "%MIFOSYS1%" == "VCBL" goto JUMPVCBL
if "%MIFOSYS1%" == "ESTU" goto JUMPESTU
if "%MIFOSYS1%" == "EMFE" goto JUMPEMFE
:JUMPEDEV
set path=%BASESYS%\LOADLIB;%MIFOEDEV%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOEDEV%\CPYLIB
set MIFOBASE=%MIFOEDEV%
goto JUMPPATH
:JUMPVCBL
set path=%MIFOVCBL%\bin;%MIFOVCBL%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
set MIFOBASE=%MIFOVCBL%
goto JUMPPATH
:JUMPESTU
set MIFOBASE=%MIFOESTU%\Base
set MIFOBIN=%MIFOBASE%\bin
set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
goto JUMPPATH
:JUMPEMFE
set MIFOBASE=%MIFOEMFE%\Base
set MIFOBIN=%MIFOBASE%\bin
set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
goto JUMPPATH
rem *
:JUMPPATH
set SIMOPATH=Y
rem *
set MAINFRAME_FLOATING_POINT=true
set COBIDY=%BASEAPP%\COBIDY
set COBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
set LIBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE%
set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%
rem *
set USERCLASS=%BASELIB1%\LOADLIB
set CLASSPATH=.
set CLASSPATH=%CLASSPATH%;%JAVABASE%
set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib
set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks
set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes
set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks
rem *
if "%MIFOSYS1%" == "ESTU" set CLASSPATH=%CLASSPATH%;%MIFOBIN%
if "%MIFOSYS1%" == "EDEV" set CLASSPATH=%CLASSPATH%;%MIFOEDEV%
if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%
if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%\bin\mfcobol.jar
rem *
set JobStatus=0000
call SIMONOTE "+ ENV1BASE is returning to caller"
The following (SIMONOTE.cmd) is a listing of the contents of the SimoNOTE.CMD command file.
@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
The example will describe how to convert an ASCII/Text file (Line Sequential) to a Micro Focus Record Sequential file with variable length records. 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.
Software Agreement and Disclaimer
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.
SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.
Note: A SimoTime License is required for the items to be made available on a local system or server.
The following links may be to the current server or to the Internet.
Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the
icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the
icon.
Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.
Explore The File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files.
The following links will require an internet connect.
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 Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
| 1. | Send an e-mail to our helpdesk. |
| 1.1. | helpdesk@simotime.com. |
| 2. | Our telephone numbers are as follows. |
| 2.1. | 1 415 763-9430 office-helpdesk |
| 2.2. | 1 415 827-7045 mobile |
We appreciate hearing from you.
SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
| Return-to-Top |
| ASCII/Text to Record Sequential, File Convert using Variable Length Records |
| Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |