![]() |
Text Justify within a Field Center, Right or Left Justification |
| When technology complements business | Copyright © 1987-2012 SimoTime Enterprises All Rights Reserved |
| The SimoTime Home Page |
This suite of programs provides an example of a routine that will center a text string within a character field. It also shows how to left or right justify a text string within a character field. Two sample COBOL programs are provided. The first program is a demonstration program that reads a file containing the JUSTIFY information records and calls the second COBOL program that actually does the text justification.
The objective of the text-justification routine is to right-justify, left-justify or center a text string within a field with the appropriate leading and/or trailing space characters.
Refer to the callable routine that will right-adjust and zero-fill a numeric field and test the final content for a valid numeric value.
The source code for both COBOL programs is written using the VS COBOL II dialect and also work with COBOL for MVS and COBOL/370. A JCL member is provided to run the job as an MVS batch job on an IBM mainframe or as a project with Micro Focus Mainframe Express (MFE) running on a PC with Windows. A Windows Command (.CMD) file is provided to run the job on a PC with Micro Focus Net Express. This program may serve as a tutorial for new programmers and as a reference for experienced programmers.
Additional information is provided in the Downloads and Links to Similar Pages section of this document.
The following is a list of the functions provided in this example.
| ||||||
| Objectives for the Text Justification Programs |
The first task performed by the SimoJUST routine is to scan the source field from left to right and determine the positions of the first and last non-space character and the length of the text string within the source field. The next task is to do the requested justification (center, right or left) by copying the text string from the source field to the appropriate position in target field. IF a request other than CENTER, RIGHT or LEFT is requested the return code (or JUST-RESPOND) is set to 0008.
The following is an example of the contents of the input file that contains records with randomly positioned text strings within a field.
CENTER ********************************************* CENTER CENTER THE FOLLOWING CENTER PLEASE CENTER THIS LEFT-JUSTIFIED STRING CENTER PLEASE CENTER A RIGHT-JUSTIFIED STRING CENTER CENTER WITH LEADING SPACES TO CONSIDER CENTER THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING CENTER CENTER THIS CENTER 1 CENTER 12 CENTER 123 CENTER 1234 CENTER 12345 CENTER 123456 CENTER End of centering request LEFT ********************************************* LEFT LEFT-JUSTIFY THE FOLLOWING LEFT PLEASE LEFT THIS LEFT-JUSTIFIED STRING LEFT PLEASE LEFT A RIGHT-JUSTIFIED STRING LEFT LEFT WITH LEADING SPACES TO CONSIDER LEFT THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING LEFT LEFT THIS LEFT 1 LEFT 12 LEFT 123 LEFT 1234 LEFT 12345 LEFT 123456 LEFT End of Left-Justify request RIGHT ********************************************* RIGHT RIGHT-JUSTIFY THE FOLLOWING RIGHT PLEASE RIGHT THIS LEFT-JUSTIFIED STRING RIGHT PLEASE RIGHT A RIGHT-JUSTIFIED STRING RIGHT RIGHT WITH LEADING SPACES TO CONSIDER RIGHT THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING RIGHT RIGHT THIS RIGHT 1 RIGHT 12 RIGHT 123 RIGHT 1234 RIGHT 12345 RIGHT 123456 RIGHT End of Right-Justify request
The following is a sample output file with the formatted justification based on the keyword that starts in position 1 of the input record.
Justify a Text String in a Field v04.03.17 http://www.simotime.com
Copyright 1987-2011 SimoTime Enterprises All Rights Reserved
....:....1....:....2....:....3....:....4....:....5....:....6
*********************************************
CENTER THE FOLLOWING
PLEASE CENTER THIS LEFT-JUSTIFIED STRING
PLEASE CENTER A RIGHT-JUSTIFIED STRING
CENTER WITH LEADING SPACES TO CONSIDER
THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING
CENTER THIS
1
12
123
1234
12345
123456
End of centering request
*********************************************
LEFT-JUSTIFY THE FOLLOWING
PLEASE LEFT THIS LEFT-JUSTIFIED STRING
PLEASE LEFT A RIGHT-JUSTIFIED STRING
LEFT WITH LEADING SPACES TO CONSIDER
THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING
LEFT THIS
1
12
123
1234
12345
123456
End of Left-Justify request
*********************************************
RIGHT-JUSTIFY THE FOLLOWING
PLEASE RIGHT THIS LEFT-JUSTIFIED STRING
PLEASE RIGHT A RIGHT-JUSTIFIED STRING
RIGHT WITH LEADING SPACES TO CONSIDER
THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING
RIGHT THIS
1
12
123
1234
12345
123456
End of Right-Justify request
....:....1....:....2....:....3....:....4....:....5....:....6
JUSTGET1 line count is 0000042
Thank you for using this software provided from SimoTime Enterprises
Please send all inquires or suggestions to the helpdesk@simotime.com
This suite of samples programs will run on the following platforms.
| ||||||
| Supported Operating Systems and Micro Focus Environments |
The following diagram is an overview of how the demonstration program fits into the example. The demonstration program will read the JUSTIFY info file (JUSTGET1), call the right-adjust routine and write the results to the output file (JUSTPUT1).
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Overview of Text Justification Job |
Note: The light-green boxes are unique to the Mainframe and Micro Focus Enterprise Server/Studio (or Micro Focus Mainframe Express). The light-red boxes are unique to the PC with Windows and Micro Focus. The light-yellow boxes are decision points or program transitions in the processing logic. The light-blue boxes identify data structures such as Files, VSAM Data Sets or Relational Tables. The light-gray boxes identify a system function or information item.
The following is the syntax for calling the text-justification routine.
call 'SIMOJUST' using JUST-PASS-AREA
The callable justify routine will accept a string of text up to forty-eight (48) characters. A data structure for calling the SIMOJUST routine is provided. A copy file (PASSJUST.CPY) is provided with the following fields defined.
*****************************************************************
* PASSJUST is a COBOL Copy File *
* Data Structure or Pass Area used for calling SIMOJUST. *
* Copyright (C) 1987-2012 SimoTime Enterprises *
* All Rights Reserved *
*****************************************************************
* Provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
01 JUST-PASS-AREA.
05 JUST-REQUEST PIC X(8).
05 JUST-RESPOND PIC 9(4).
05 JUST-SOURCE PIC X(60).
05 JUST-TARGET PIC X(60).
*
*** PASSJUST - End-of-Copy File - - - - - - - - - - - PASSJUST *
*****************************************************************
*
The following table is an overview of the data strings used in the pass area.
| ||||||||||||||||
| Parameters that are Passed to the Text Justification Routine |
This sample suite of programs has two CMD members. The first CMD member will execute the demonstration program. The second CMD member will create a JUSTIFY info file (JUSTGET1.TXT) that is used by the first CMD member as input.
The following is the command (CBLJUSE1.CMD) required to run the demonstration program on a Personal Computer with Micro Focus Net Express.
@echo OFF
rem * *******************************************************************
rem * CBLJUSE1.CMD - a Windows Command File *
rem * This program is provided by SimoTime Enterprises *
rem * (C) Copyright 1987-2012 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - Read a file of JUSTIFY info, do justify, write output.
rem * Author - SimoTime Enterprises
rem * Date - January 24, 1996
rem *
rem * The job will read a file if 80-byte records that contains randomly
rem * positioned text strings within a field within the records.
rem * The program will justify the randomly positioned text strings to
rem * be Center, Right or Left justified based on the keyword starting
rem * in position 1 of each input record.
rem *
rem * This set of programs will run on a mainframe under MVS or on a
rem * Personal Computer with Windows and Micro Focus Net Express.
rem *
rem * ************
rem * * CblJusE1 *
rem * ********cmd*
rem * *
rem * *
rem * ************ ************ ************
rem * * SimoEXEC ******* SIMOLOGS ******* CONSOLE *
rem * ********cbl* * ********cbl* * ************
rem * * * *
rem * * * * ************
rem * * * **** SYSLOG *
rem * * * ********txt*
rem * * *
rem * * **************************
rem * * *
rem * * ************ ************ ************
rem * * * JUSTGET1 ******* CblJusC1 ******* JUSTPUT1 *
rem * * *******rseq* ********cbl* *******rseq*
rem * *
rem * ************
rem * * EOJ *
rem * ************
rem *
rem * *******************************************************************
rem * Step 1 Delete any previously created file...
rem *
set CmdName=CBLJUSE1
call ..\Env1BASE %CmdName%
if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem *
call SimoNOTE "*******************************************************%CmdName%"
call SimoNOTE "Starting CmdName %CmdName%"
:DeleteQSAM
call SimoNOTE "StepInfo Delete previously created file"
set JUSTGET1=%BaseLib1%\DATA\Asc1\JUSTRS80.DAT
set JUSTPUT1=%BaseLib1%\DATA\Wrk1\JUSTPUT1.DAT
if exist %JUSTPUT1% del %JUSTPUT1%
rem *
rem * *******************************************************************
rem * Step 2 Edit input, create a new output file...
rem *
:ExecuteJustifyRoutine
call SimoNOTE "StepInfo Execute the Justify Program"
run CBLJUSC1
if not ERRORLEVEL = 0 set JobStatus=0010
if not %JobStatus% == 0000 goto :EojNok
call SimoNOTE "DataTake %JUSTGet1%"
call SimoNOTE "DataMake %JUSTPUT1%"
rem *
if exist %JUSTPUT1% goto :EojAok
set JobStatus=0020
goto :EojNok
:EojAok
call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
goto :End
:EojNok
call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
if not "%1" == "nopause" pause
The following is the command (CBLJUSE2.CMD) that may be used to create a JUSTIFY-Info file (JUSTGET1.TXT).
@echo OFF
rem * *******************************************************************
rem * CBLJUSE2.CMD - a Windows Command File *
rem * This program is provided by SimoTime Enterprises *
rem * (C) Copyright 1987-2012 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - Create a Sequential Data Set on disk using IEBGENER.
rem * Author - SimoTime Enterprises
rem * Date = January 24, 1996
rem *
rem * The 1ST step will delete a previously created file and then
rem * create a new ASCII/Text file.
rem * The 2ND step will convert the Line Sequential file to a Record
rem * Sequential file and keep the ASCII encoding.
rem * The 3RD step will convert the Line Sequential file to a Record
rem * Sequential file and convert the record content from ASCII to EBCDIC
rem *
rem * This set of programs will run on a Personal Computer with Windows
rem * and Micro Focus Net Express.
rem *
set CmdName=CBLJUSE2
call ..\Env1BASE %CmdName%
if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
rem *
call SimoNOTE "*******************************************************%CmdName%"
call SimoNOTE "Starting CmdName %CmdName%, User is %USERNAME%"
call SimoNOTE "StepInfo Delete previously created files"
set JUSTTXT1=%BaseLib1%\DATA\TXT1\JUSTTXT1.TXT
rem *
rem * *******************************************************************
rem * Step 1 of 3 Create and populate a new ASCII/TEXT file...
rem *
call SimoNOTE "StepInfo Create an ASCII/Text File"
if exist %JUSTTXT1% del %JUSTTXT1%
rem * ..1....:....2....:....3....:....4....:....5....:....6....:....7.
echo CENTER ********************************************* >>%JUSTTXT1%
echo CENTER CENTER THE FOLLOWING >>%JUSTTXT1%
echo CENTER PLEASE CENTER THIS LEFT-JUSTIFIED STRING >>%JUSTTXT1%
echo CENTER PLEASE CENTER A RIGHT-JUSTIFIED STRING >>%JUSTTXT1%
echo CENTER CENTER WITH LEADING SPACES TO CONSIDER >>%JUSTTXT1%
echo CENTER THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING >>%JUSTTXT1%
echo CENTER CENTER THIS >>%JUSTTXT1%
echo CENTER 1 >>%JUSTTXT1%
echo CENTER 12 >>%JUSTTXT1%
echo CENTER 123 >>%JUSTTXT1%
echo CENTER 1234 >>%JUSTTXT1%
echo CENTER 12345 >>%JUSTTXT1%
echo CENTER 123456 >>%JUSTTXT1%
echo CENTER End of centering request >>%JUSTTXT1%
echo LEFT ********************************************* >>%JUSTTXT1%
echo LEFT LEFT-JUSTIFY THE FOLLOWING >>%JUSTTXT1%
echo LEFT PLEASE LEFT THIS LEFT-JUSTIFIED STRING >>%JUSTTXT1%
echo LEFT PLEASE LEFT A RIGHT-JUSTIFIED STRING >>%JUSTTXT1%
echo LEFT LEFT WITH LEADING SPACES TO CONSIDER >>%JUSTTXT1%
echo LEFT THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING >>%JUSTTXT1%
echo LEFT LEFT THIS >>%JUSTTXT1%
echo LEFT 1 >>%JUSTTXT1%
echo LEFT 12 >>%JUSTTXT1%
echo LEFT 123 >>%JUSTTXT1%
echo LEFT 1234 >>%JUSTTXT1%
echo LEFT 12345 >>%JUSTTXT1%
echo LEFT 123456 >>%JUSTTXT1%
echo LEFT End of Left-Justify request >>%JUSTTXT1%
echo RIGHT ********************************************* >>%JUSTTXT1%
echo RIGHT RIGHT-JUSTIFY THE FOLLOWING >>%JUSTTXT1%
echo RIGHT PLEASE RIGHT THIS LEFT-JUSTIFIED STRING >>%JUSTTXT1%
echo RIGHT PLEASE RIGHT A RIGHT-JUSTIFIED STRING >>%JUSTTXT1%
echo RIGHT RIGHT WITH LEADING SPACES TO CONSIDER >>%JUSTTXT1%
echo RIGHT THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING >>%JUSTTXT1%
echo RIGHT RIGHT THIS >>%JUSTTXT1%
echo RIGHT 1 >>%JUSTTXT1%
echo RIGHT 12 >>%JUSTTXT1%
echo RIGHT 123 >>%JUSTTXT1%
echo RIGHT 1234 >>%JUSTTXT1%
echo RIGHT 12345 >>%JUSTTXT1%
echo RIGHT 123456 >>%JUSTTXT1%
echo RIGHT End of Right-Justify request >>%JUSTTXT1%
if exist %JUSTTXT1% call SimoNOTE "DataMake %JUSTTXT1%"
if not exist %JUSTTXT1% set JobStatus=9001
if not %JobStatus% == 0000 goto :EojNok
rem *
rem * *******************************************************************
rem * Step 2 of 3 Convert ASCII/TEXT file to ASCII RSEQ File...
rem *
call SimoNOTE "StepInfo Convert Line Sequential to Record Sequential"
set GETLS080=%JUSTTXT1%
set PUTRS080=%BaseLib1%\DATA\Asc1\JUSTRS80.DAT
if exist %PUTRS080% del %PUTRS080%
run CV80ALAR
if not ERRORLEVEL = 0 set JobStatus=0030
if not %JobStatus% == 0000 goto :EojNok
call SimoNOTE "DataTake %GETLS080%"
call SimoNOTE "DataMake %PUTRS080%"
rem *
rem * *******************************************************************
rem * Step 3 of 3 Convert ASCII/TEXT file to EBCDIC RSEQ File...
rem *
call SimoNOTE "StepInfo Convert Line Sequential to Record Sequential"
set GETLS080=%JUSTTXT1%
set PUTRS080=%BaseLib1%\DATA\Ebc1\JUSTRS80.DAT
if exist %PUTRS080% del %PUTRS080%
run CV80ALER
if not ERRORLEVEL = 0 set JobStatus=0030
if not %JobStatus% == 0000 goto :EojNok
call SimoNOTE "DataTake %GETLS080%"
call SimoNOTE "DataMake %PUTRS080%"
rem *
:EojAok
call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus% "
goto :End
:EojNok
call SimoNOTE "NOTE ABENDING CmdName %CmdName%, Job Status is %JobStatus% "
:End
if not "%1" == "nopause" pause
This sample suite of programs has two JCL members. The first JCL member will execute the demonstration program. The second JCL member will create a JUSTIFY info file (DSN=SIMOTIME.DATA.JUSTGET1) that is used by the first JCL member as input.
The following is the JCL member (CBLJUSJ1.JCL) required to run the demonstration program on the mainframe or with Micro Focus Mainframe Express.
//CBLJUSJ1 JOB (SIMOTIME),'COBOL TEXT JUSTIFY',CLASS=1,MSGCLASS=0, // NOTIFY=CSIP1 //* ******************************************************************* //* This JCL Member is provided by SimoTime Enterprises * //* (C) Copyright 1987-2012 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Read a file of JUSTIFY Info, do justify, write output. //* Author - SimoTime Enterprises //* Date - January 24, 1996 //* //* This job will read a file of 80-byte records that contain randomly //* positioned text strings within a field within the records. //* The program will justify the randomly positioned text strings to //* be Center, Right or Left justified based on the keyword starting //* in position 1 of each input record. //* //* This set of programs will run on a mainframe under MVS or on a //* Personal Computer with Windows and Micro Focus Mainframe Express. //* //* ************ //* * CBLJUSJ1 * //* ********jcl* //* * //* ************ //* * IEFBR14 * //* ********utl* //* * //* ************ ************ ************ //* * JUSTGET1 *-----* CBLJUSC1 *-----* JUSTPUT1 * //* ********dat* ********cbl* ********dat* //* * * //* * * ************ //* * *-call--* SIMOJUST * //* * ********cbl* //* * //* ************ //* * EOJ * //* ************ //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* //GETREADY EXEC PGM=IEFBR14 //JUSTPUT1 DD DSN=SIMOTIME.DATA.JUSTPUT1,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2, Right, left and center adjust a text string in a field //* Create a new output file... //* //JUSTIFY1 EXEC PGM=CBLJUSC1 //STEPLIB DD DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR //JUSTGET1 DD DSN=SIMOTIME.DATA.JUSTGET1,DISP=SHR //JUSTPUT1 DD DSN=SIMOTIME.DATA.JUSTPUT1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //SYSOUT DD SYSOUT=* //
The following is the JCL member (CBLJUSJ2.JCL) that may be used to create a data file with randomly positioned text strings within a field within the records.
//CBLJUSJ2 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* This JCL Member is provided by SimoTime Enterprises * //* (C) Copyright 1987-2012 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Create a Sequential Data Set on disk using IEBGENER. //* Author - SimoTime Enterprises //* Date - January 24, 1996 //* //* The first job step (QSAMDELT) will delete any previously created //* file. The second job step (QCRTDIN1) will create a new file of //* randomly positioned text strings within a field within the records. //* //* 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 of 2, Delete any previously created file... //* //GETREADY EXEC PGM=IEFBR14 //SYSUT2 DD DSN=SIMOTIME.DATA.JUSTGET1,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... //* //BUILDNEW EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //* :....1....:....2....:....3....:....4....:....5....:....6....:....7. //SYSUT1 DD * CENTER ********************************************* CENTER CENTER THE FOLLOWING CENTER PLEASE CENTER THIS LEFT-JUSTIFIED STRING CENTER PLEASE CENTER A RIGHT-JUSTIFIED STRING CENTER CENTER WITH LEADING SPACES TO CONSIDER CENTER THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING CENTER CENTER THIS CENTER 1 CENTER 12 CENTER 123 CENTER 1234 CENTER 12345 CENTER 123456 CENTER End of centering request LEFT ********************************************* LEFT LEFT-JUSTIFY THE FOLLOWING LEFT PLEASE LEFT THIS LEFT-JUSTIFIED STRING LEFT PLEASE LEFT A RIGHT-JUSTIFIED STRING LEFT LEFT WITH LEADING SPACES TO CONSIDER LEFT THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING LEFT LEFT THIS LEFT 1 LEFT 12 LEFT 123 LEFT 1234 LEFT 12345 LEFT 123456 LEFT End of Left-Justify request RIGHT ********************************************* RIGHT RIGHT-JUSTIFY THE FOLLOWING RIGHT PLEASE RIGHT THIS LEFT-JUSTIFIED STRING RIGHT PLEASE RIGHT A RIGHT-JUSTIFIED STRING RIGHT RIGHT WITH LEADING SPACES TO CONSIDER RIGHT THIS IS A FULL SIXTY (060) CHARACTER STRING USED FOR TESTING RIGHT RIGHT THIS RIGHT 1 RIGHT 12 RIGHT 123 RIGHT 1234 RIGHT 12345 RIGHT 123456 RIGHT End of Right-Justify request /* //SYSUT2 DD DSN=SIMOTIME.DATA.JUSTGET1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //
The following is the JCL member (CBLJUSJ9.JCL) that may be used to delete the data files created during the execution of the Justification programs.
//CBLJUSJ9 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* This JCL Member is provided by SimoTime Enterprises * //* (C) Copyright 1987-2012 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Delete files created by the Text Justification programs. //* Author - SimoTime Enterprises //* Date - January 24, 1996 //* //* This is a single step job that will delete the files created by //* the sample Text Justification programs //* //* 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 of 1, Delete files created by Text Justification programs. //* //QSAMDELT EXEC PGM=IEFBR14 //CLEANOUT DD DSN=SIMOTIME.DATA.JUSTGET1,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //SYSUT2 DD DSN=SIMOTIME.DATA.JUSTPUT1,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS) //*
The following is the source code (CBLJUSC1.CBL) for the demonstration program. This program will read the input file containing the randomly positioned text strings, do the requested justification and write the formatted results to an output file.
IDENTIFICATION DIVISION.
PROGRAM-ID. CBLJUSC1.
AUTHOR. SIMOTIME ENTERPRISES.
*****************************************************************
* Copyright (C) 1987-2012 SimoTime Enterprises. *
* *
* All rights reserved. Unpublished, all rights reserved under *
* copyright law and international treaty. Use of a copyright *
* notice is precautionary only and does not imply publication *
* or disclosure. *
* *
* Permission to use, copy, modify and distribute this software *
* for any non-commercial purpose and without fee is hereby *
* granted, provided the SimoTime copyright notice appear on all *
* copies of the software. The SimoTime name or Logo may not be *
* used in any advertising or publicity pertaining to the use *
* of the software without the written permission of SimoTime *
* Enterprises. *
* *
* Permission to use, copy, modify and distribute this software *
* for any commercial purpose requires a fee to be paid to *
* SimoTime Enterprises. Once the fee is received by SimoTime *
* the latest version of the software will be delivered and a *
* license will be granted for use within an enterprise, *
* provided the SimoTime copyright notice appear on all copies *
* of the software. The SimoTime name or Logo may not be used *
* in any advertising or publicity pertaining to the use of the *
* software without the written permission of SimoTime *
* Enterprises. *
* *
* SimoTime Enterprises makes no warranty or representations *
* about the suitability of the software for any purpose. It is *
* provided "AS IS" without any expressed or implied warranty, *
* including the implied warranties of merchantability, fitness *
* for a particular purpose and non-infringement. SimoTime *
* Enterprises shall not be liable for any direct, indirect, *
* special or consequential damages resulting from the loss of *
* use, data or projects, whether in an action of contract or *
* tort, arising out of or in connection with the use or *
* performance of this software *
* *
* SimoTime Enterprises *
* 15 Carnoustie Drive *
* Novato, CA 94949-5849 *
* 415.883.6565 *
* *
* RESTRICTED RIGHTS LEGEND *
* Use, duplication, or disclosure by the Government is subject *
* to restrictions as set forth in subparagraph (c)(1)(ii) of *
* the Rights in Technical Data and Computer Software clause at *
* DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of *
* Commercial Computer Software - Restricted Rights at 48 *
* CFR 52.227-19, as applicable. Contact SimoTime Enterprises, *
* 15 Carnoustie Drive, Novato, CA 94949-5849. *
* *
*****************************************************************
* This program is provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
* Source Member: CBLJUSC1.CBL
* Copy Files: PASSJUST.CPY
* Calls to: SIMOJUST
*****************************************************************
*
* ************
* * CBLJUSJ1 *
* ********jcl*
* *
* ************
* * IEFBR14 *
* ********utl*
* *
* ************ ************ ************
* * JUSTGET1 *-----* CBLJUSC1 *-----* JUSTPUT1 *
* ********dat* ********cbl* ********dat*
* * *
* * * ************
* * *-call--* SIMOJUST *
* * ********cbl*
* *
* ************
* * EOJ *
* ************
*
*****************************************************************
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT JUSTGET1-FILE ASSIGN to JUSTGET1
ORGANIZATION is SEQUENTIAL
ACCESS MODE is SEQUENTIAL
FILE STATUS is JUSTGET1-STATUS.
SELECT JUSTPUT1-FILE ASSIGN to JUSTPUT1
ORGANIZATION is SEQUENTIAL
ACCESS MODE is SEQUENTIAL
FILE STATUS is JUSTPUT1-STATUS.
*****************************************************************
DATA DIVISION.
FILE SECTION.
FD JUSTGET1-FILE
* BLOCK CONTAINS 00800 CHARACTERS
DATA RECORD is JUSTGET1-RECORD
.
01 JUSTGET1-RECORD.
05 JUSTGET1-DATA-01.
10 JUSTGET1-KEYWORD pic X(10).
10 JUSTGET1-INFO pic X(70).
FD JUSTPUT1-FILE
* BLOCK CONTAINS 00800 CHARACTERS
DATA RECORD is JUSTPUT1-RECORD
.
01 JUSTPUT1-RECORD.
05 JUSTPUT1-DATA-01 pic X(00080).
WORKING-STORAGE SECTION.
01 SIM-TITLE.
05 T1 pic X(11) value '* CBLJUSC1 '.
05 T2 pic X(34) value 'Justify a Text String in a Field '.
05 T3 pic X(10) value ' v08.06.04'.
05 T4 pic X(24) value ' http://www.simotime.com'.
01 SIM-COPYRIGHT.
05 C1 pic X(11) value '* CBLJUSC1 '.
05 C2 pic X(20) value 'Copyright 1987-2012 '.
05 C3 pic X(28) value '--- SimoTime Enterprises ---'.
05 C4 pic X(20) value ' All Rights Reserved'.
01 SIM-THANKS-01.
05 C1 pic X(11) value '* CBLJUSC1 '.
05 C2 pic X(32) value 'Thank you for using this softwar'.
05 C3 pic X(32) value 'e provided from SimoTime Enterpr'.
05 C4 pic X(04) value 'ises'.
01 SIM-THANKS-02.
05 C1 pic X(11) value '* CBLJUSC1 '.
05 C2 pic X(32) value 'Please send all inquires or sugg'.
05 C3 pic X(32) value 'estions to the helpdesk@simotime'.
05 C4 pic X(04) value '.com'.
01 MESSAGE-BUFFER.
05 MESSAGE-HEADER pic X(11) value '* CBLJUSC1 '.
05 MESSAGE-TEXT.
10 MESSAGE-TEXT-1 pic X(68) value SPACES.
10 MESSAGE-TEXT-2 pic X(188) value SPACES.
01 JUSTGET1-STATUS.
05 JUSTGET1-STATUS-L pic X.
05 JUSTGET1-STATUS-R pic X.
01 JUSTGET1-EOF pic X value 'N'.
01 JUSTGET1-OPEN-FLAG pic X value 'C'.
01 JUSTPUT1-STATUS.
05 JUSTPUT1-STATUS-L pic X.
05 JUSTPUT1-STATUS-R pic X.
01 JUSTPUT1-EOF pic X value 'N'.
01 JUSTPUT1-OPEN-FLAG pic X value 'C'.
01 IO-STATUS.
05 IO-STAT1 pic X.
05 IO-STAT2 pic X.
01 TWO-BYTES.
05 TWO-BYTES-LEFT pic X.
05 TWO-BYTES-RIGHT pic X.
01 TWO-BYTES-BINARY redefines TWO-BYTES pic 9(4) comp.
01 APPL-RESULT pic S9(9) comp.
88 APPL-AOK value 0.
88 APPL-EOF value 16.
01 JUSTGET1-TOTAL.
05 filler pic X(23) value 'JUSTGET1 line count is '.
05 JUSTGET1-LOC pic 9(7) value 0.
01 JUSTIFY-HEADER.
05 FILLER pic X(10) value '....:....1'.
05 FILLER pic X(10) value '....:....2'.
05 FILLER pic X(10) value '....:....3'.
05 FILLER pic X(10) value '....:....4'.
05 FILLER pic X(10) value '....:....5'.
05 FILLER pic X(10) value '....:....6'.
05 FILLER pic X(10) value '....:....7'.
05 FILLER pic X(10) value '....:....8'.
*****************************************************************
* The following copy file of the pass area for calling SIMOJUST,
* the date editing routine.
*****************************************************************
*
COPY PASSJUST.
*
*****************************************************************
PROCEDURE DIVISION.
perform Z-POST-COPYRIGHT
perform JUSTGET1-OPEN
perform JUSTPUT1-OPEN
perform SHOW-HEADER-LINE
* The following perform loop will execute until all the
* records are read from the JUSTIFY-Info File or an error
* (non-zero status code) occurs while reading the file.
perform until JUSTGET1-STATUS not = '00'
perform JUSTGET1-READ
if JUSTGET1-STATUS = '00'
add 1 to JUSTGET1-LOC
perform JUSTIFY-FUNCTION-DO-IT
perform JUSTIFY-FUNCTION-SHOW-RESULT
end-if
end-perform
perform SHOW-HEADER-LINE
move JUSTGET1-TOTAL to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
if JUSTGET1-EOF = 'Y'
move 'is Finished...' to MESSAGE-TEXT
else
move 'is ABENDING...' to MESSAGE-TEXT
end-if
perform Z-DISPLAY-CONSOLE-MESSAGE
perform JUSTPUT1-CLOSE
perform JUSTGET1-CLOSE
perform Z-THANK-YOU.
GOBACK.
*****************************************************************
* The following routines are in alphabetical sequence.. *
*****************************************************************
*****************************************************************
JUSTIFY-FUNCTION-DO-IT.
move JUSTGET1-KEYWORD to JUST-REQUEST
move JUSTGET1-INFO to JUST-SOURCE
call 'SIMOJUST' using JUST-PASS-AREA
exit.
*
*****************************************************************
JUSTIFY-FUNCTION-SHOW-RESULT.
move JUST-TARGET to MESSAGE-TEXT
move MESSAGE-TEXT to JUSTPUT1-DATA-01
perform Z-DISPLAY-CONSOLE-MESSAGE
perform JUSTPUT1-WRITE
exit.
*
*****************************************************************
SHOW-HEADER-LINE.
move JUSTIFY-HEADER(1:LENGTH of JUST-TARGET)
to MESSAGE-TEXT-1(1:LENGTH of JUST-TARGET)
perform Z-DISPLAY-CONSOLE-MESSAGE
move SPACES to JUSTPUT1-DATA-01
move JUSTIFY-HEADER(1:LENGTH of JUST-TARGET)
to JUSTPUT1-DATA-01(1:LENGTH of JUST-TARGET)
perform JUSTPUT1-WRITE
exit.
*****************************************************************
* I/O ROUTINES FOR JUSTGET1... *
*****************************************************************
JUSTGET1-CLOSE.
add 8 to ZERO giving APPL-RESULT.
close JUSTGET1-FILE
if JUSTGET1-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
else
add 12 to ZERO giving APPL-RESULT
end-if
if APPL-AOK
CONTINUE
else
move 'JUSTGET1-Failure-CLOSE...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move JUSTGET1-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*---------------------------------------------------------------*
JUSTGET1-READ.
read JUSTGET1-FILE
if JUSTGET1-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
else
if JUSTGET1-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 JUSTGET1-EOF
else
move 'JUSTGET1-Failure-GET...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move JUSTGET1-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
end-if
exit.
*---------------------------------------------------------------*
JUSTGET1-OPEN.
add 8 to ZERO giving APPL-RESULT.
open input JUSTGET1-FILE
if JUSTGET1-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
move 'O' to JUSTGET1-OPEN-FLAG
else
add 12 to ZERO giving APPL-RESULT
end-if
if APPL-AOK
CONTINUE
else
move 'JUSTGET1-Failure-OPEN...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move JUSTGET1-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*****************************************************************
* I/O ROUTINES FOR JUSTPUT1... *
*****************************************************************
JUSTPUT1-WRITE.
if JUSTPUT1-OPEN-FLAG = 'C'
perform JUSTPUT1-OPEN
end-if
write JUSTPUT1-RECORD
if JUSTPUT1-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
else
if JUSTPUT1-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 'JUSTPUT1-Failure-WRITE...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move JUSTPUT1-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*---------------------------------------------------------------*
JUSTPUT1-OPEN.
add 8 to ZERO giving APPL-RESULT.
open output JUSTPUT1-FILE
if JUSTPUT1-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
move 'O' to JUSTPUT1-OPEN-FLAG
else
add 12 to ZERO giving APPL-RESULT
end-if
if APPL-AOK
CONTINUE
else
move 'JUSTPUT1-Failure-OPEN...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move JUSTPUT1-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*---------------------------------------------------------------*
JUSTPUT1-CLOSE.
add 8 to ZERO giving APPL-RESULT.
close JUSTPUT1-FILE
if JUSTPUT1-STATUS = '00'
subtract APPL-RESULT from APPL-RESULT
move 'C' to JUSTPUT1-OPEN-FLAG
else
add 12 to ZERO giving APPL-RESULT
end-if
if APPL-AOK
CONTINUE
else
move 'JUSTPUT1-Failure-CLOSE...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move JUSTPUT1-STATUS to IO-STATUS
perform Z-DISPLAY-IO-STATUS
perform Z-ABEND-PROGRAM
end-if
exit.
*****************************************************************
* 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-CONSOLE-MESSAGE
end-if
move 'PROGRAM-IS-ABENDING...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
add 12 to ZERO giving RETURN-CODE
STOP RUN.
* exit.
*****************************************************************
* Display CONSOLE messages... *
*****************************************************************
Z-DISPLAY-CONSOLE-MESSAGE.
if MESSAGE-TEXT-2 = SPACES
display MESSAGE-BUFFER(1:79) upon console
else
display MESSAGE-BUFFER upon console
end-if
move all SPACES to MESSAGE-TEXT
exit.
*****************************************************************
* Display the file status bytes. This routine will display as *
* two digits if the full two byte file status is numeric. If *
* second byte is non-numeric then it will be treated as a *
* binary number. *
*****************************************************************
Z-DISPLAY-IO-STATUS.
if IO-STATUS not NUMERIC
or IO-STAT1 = '9'
subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY
move IO-STAT2 to TWO-BYTES-RIGHT
display '* CBLJUSC1 File-Status-' IO-STAT1 '/'
TWO-BYTES-BINARY upon console
else
display '* CBLJUSC1 File-Status-' IO-STATUS upon console
end-if
exit.
*****************************************************************
Z-POST-COPYRIGHT.
display SIM-TITLE upon console
display SIM-COPYRIGHT upon console
exit.
*****************************************************************
Z-THANK-YOU.
display SIM-THANKS-01 upon console
display SIM-THANKS-02 upon console
exit.
*****************************************************************
* This example is provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
The following is the source code (SIMOJUST.CBL) for the callable routine that does the Center, Right or Left Justification.
IDENTIFICATION DIVISION.
PROGRAM-ID. SIMOJUST.
AUTHOR. SIMOTIME ENTERPRISES.
*****************************************************************
* Copyright (C) 1987-2012 SimoTime Enterprises. *
* *
* All rights reserved. Unpublished, all rights reserved under *
* copyright law and international treaty. Use of a copyright *
* notice is precautionary only and does not imply publication *
* or disclosure. *
* *
* Permission to use, copy, modify and distribute this software *
* for any non-commercial purpose and without fee is hereby *
* granted, provided the SimoTime copyright notice appear on all *
* copies of the software. The SimoTime name or Logo may not be *
* used in any advertising or publicity pertaining to the use *
* of the software without the written permission of SimoTime *
* Enterprises. *
* *
* Permission to use, copy, modify and distribute this software *
* for any commercial purpose requires a fee to be paid to *
* SimoTime Enterprises. Once the fee is received by SimoTime *
* the latest version of the software will be delivered and a *
* license will be granted for use within an enterprise, *
* provided the SimoTime copyright notice appear on all copies *
* of the software. The SimoTime name or Logo may not be used *
* in any advertising or publicity pertaining to the use of the *
* software without the written permission of SimoTime *
* Enterprises. *
* *
* SimoTime Enterprises makes no warranty or representations *
* about the suitability of the software for any purpose. It is *
* provided "AS IS" without any expressed or implied warranty, *
* including the implied warranties of merchantability, fitness *
* for a particular purpose and non-infringement. SimoTime *
* Enterprises shall not be liable for any direct, indirect, *
* special or consequential damages resulting from the loss of *
* use, data or projects, whether in an action of contract or *
* tort, arising out of or in connection with the use or *
* performance of this software *
* *
* SimoTime Enterprises *
* 15 Carnoustie Drive *
* Novato, CA 94949-5849 *
* 415.883.6565 *
* *
* RESTRICTED RIGHTS LEGEND *
* Use, duplication, or disclosure by the Government is subject *
* to restrictions as set forth in subparagraph (c)(1)(ii) of *
* the Rights in Technical Data and Computer Software clause at *
* DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of *
* Commercial Computer Software - Restricted Rights at 48 *
* CFR 52.227-19, as applicable. Contact SimoTime Enterprises, *
* 15 Carnoustie Drive, Novato, CA 94949-5849. *
* *
*****************************************************************
* This program is provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
* *
*****************************************************************
*
*****************************************************************
* Source Member: SIMOJUST.CBL
* Copy Files: PASSJUST.CPY
*****************************************************************
*
* SIMOJUST - Justify (or position) a text string within a field
* based on the caller's request to center, left or right justify.
*
* EXECUTION or CALLING PROTOCOL
* -----------------------------
* CALL 'SIMOJUST' USING JUST-PASS-AREA.
*
*****************************************************************
*
* MAINTENANCE
* -----------
* 1988/02/27 Simmons, Created program.
* 1988/02/27 Simmons, No changes to date.
*
*****************************************************************
*
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Z-PTR-1 pic 9(3) value 0.
01 Z-PTR-2 pic 9(3) value 0.
01 Z-MAX-1 pic 9(3) value 0.
01 Z-MAX-2 pic 9(3) value 0.
01 FIRST-BYTE pic 9(3) value 0.
01 FINAL-BYTE pic 9(3) value 0.
01 LENGTH-OF-STRING pic 9(3) value 0.
*****************************************************************
LINKAGE SECTION.
COPY PASSJUST.
*****************************************************************
PROCEDURE DIVISION using JUST-PASS-AREA.
perform INITIALIZE-FIELDS
perform until Z-PTR-1 > Z-MAX-1
if JUST-SOURCE(Z-PTR-1:1) not = SPACE
if FIRST-BYTE = 0
add Z-PTR-1 to ZERO giving FIRST-BYTE
end-if
add Z-PTR-1 to ZERO giving FINAL-BYTE
end-if
add 1 to Z-PTR-1
end-perform
compute LENGTH-OF-STRING = FINAL-BYTE - FIRST-BYTE + 1
evaluate JUST-REQUEST
when 'CENTER ' perform REQUEST-CENTER
when 'LEFT ' perform REQUEST-LEFT
when 'RIGHT ' perform REQUEST-RIGHT
when other add 8 to ZERO giving JUST-RESPOND
end-evaluate
GOBACK.
*****************************************************************
INITIALIZE-FIELDS.
add 16 to ZERO giving JUST-RESPOND
move ZERO to Z-PTR-1
move ZERO to Z-PTR-2
move ZERO to FIRST-BYTE
move ZERO to FINAL-BYTE
move ZERO to LENGTH-OF-STRING
move SPACES to JUST-TARGET
add length of JUST-SOURCE to ZERO giving Z-MAX-1
add length of JUST-TARGET to ZERO giving Z-MAX-2
exit.
*****************************************************************
REQUEST-CENTER.
compute Z-PTR-2 = (Z-MAX-2 - LENGTH-OF-STRING) / 2 + 1
move JUST-SOURCE(FIRST-BYTE:LENGTH-OF-STRING)
to JUST-TARGET(Z-PTR-2:LENGTH-OF-STRING)
move ZERO to JUST-RESPOND
exit.
*****************************************************************
REQUEST-LEFT.
add 1 to ZERO giving Z-PTR-2
move JUST-SOURCE(FIRST-BYTE:LENGTH-OF-STRING)
to JUST-TARGET(Z-PTR-2:LENGTH-OF-STRING)
move ZERO to JUST-RESPOND
exit.
*****************************************************************
REQUEST-RIGHT.
compute Z-PTR-2 = (Z-MAX-2 - LENGTH-OF-STRING) + 1
move JUST-SOURCE(FIRST-BYTE:LENGTH-OF-STRING)
to JUST-TARGET( Z-PTR-2:LENGTH-OF-STRING)
move ZERO to JUST-RESPOND
exit.
*****************************************************************
* This example is provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
This suite of programs provides an example of a routine that does centering and left or right justification of a variable length text string within a field of fixed length. The purpose of this document is to assist as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem. This documents and the links to other documents are intended to provide a choice of alternatives.
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Enterprises. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.
SimoTime Enterprises makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that is beyond the scope and purpose of this document. The first sub-section requires an internet connection, the second sub-section references locally available documents.
Note: A SimoTime License is required for the items to be made available on a local server.
The following links will require an internet connect.
A good place to start is The SimoTime Home Page for access to white papers, program examples and product information.
This suite of programs and documentation is available for download. Link to an Evaluation zPAK Option that includes the program members, documentation and control files.
Explore The ASCII and EBCDIC translation tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.
Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and QSAM files.
Explore The Micro Focus Web Site for more information about products and services available from Micro Focus.
The following links may be accessible without an internet connection.
Refer to the callable routine that will right-adjust and zero-fill a numeric field and test the final content for a valid numeric value.
Check out The COBOL Connection for more examples of mainframe COBOL coding techniques and sample code.
Check out The JCL Connection for more mainframe JCL examples.
Explore The Mainframe System Model for additional information about defining, creating and managing the Environments, Processes, Functions and Data that are needed (required) to expand the platform flexibility and allow a business application currently running on a mainframe system to run on a Windows, UNIX or Linux system using Micro Focus Server Enterprise Edition.
Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and QSAM files.
Check out The SimoTime Glossary for a list of terms and definitions used in the documents provided by SimoTime.
This document was created and is maintained by SimoTime Enterprises.
If you have any questions, suggestions, comments or feedback please call or send an e-mail to: helpdesk@simotime.com
We appreciate hearing from you.
Founded in 1987, SimoTime Enterprises is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
| Return-to-Top |
| Justify to the Center, Right or Left a Text String within a Field |
| Copyright © 1987-2012 SimoTime Enterprises All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |