Printed Report Price List for the Item Master File |
The SimoTime Home Page |
Printing numeric fields, especially packed-decimal or binary (i.e. COMP-3 or COMP) requires special consideration. Also, signed, zoned-decimal fields will require special consideration. Most numeric fields will require some sort of editing before printing. This suite of programs provides examples of how a COBOL program may be used to properly print (or display) numeric fields.
The COBOL program is written using the IBM COBOL for OS/390 dialect and will also work with IBM Enterprise COBOL. 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 batch or command file is provided to run the job as a Windows batch job on a Wintel platform using 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
This example illustrates the following functions.
| ||||
Functions to be Described and Demonstrated |
The input to the sample program is the Item Master file. On the Mainframe this is a VSAM, Key-Sequenced-Data-Set (or KSDS) and with Micro Focus it is a Key-Sequenced or Indexed file. The output will be a printed report showing the item prices and quantity available. The item price is stored in the item master file in a packed-decimal format (i.e. COMP-3). The quantity available is calculated from two fields that are stored in the item master file in a binary (i.e. COMP) format. The quantity-available equals the quantity-on-hand minus the quantity-allocated.
This suite of samples programs will run on the following platforms.
| ||||||
Operating Systems and Supporting Software |
This program will sequentially read the item master file and build a print line of text from the text fields and numeric fields that are packed and binary formats. Once the print line has been created it will be printed. It is actually written to a sequential file (spooling) that contains print control characters and data.
Color Associations: The Batch 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 convention and content 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. Command FileThe following is the Windows CMD (NUMPRTE1.cmd) required to run the sample COBOL program. This is a two step job. The first step (identified by the :DeleteQSAM statement) will delete the file that was created from a previous run of this job. The second step (identified by the :CreateQSAM statement) will execute the sample program. @echo OFF rem * ******************************************************************* rem * NUMPRTE1.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 the Item Master File, print a price list. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 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 * setlocal set CmdName=NUMPRTE1 call ..\Env1BASE %CmdName% set JobStatus=0000 call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting JobName %CmdName%, User is %USERNAME%" rem * ******************************************************************* rem * Step 1 Set File Mapping, Delete any previously created file... rem * :SetDeleteQSAM call SimoNOTE "Identify JobStep DeleteQSAM" set ITEMMAST=%BaseLib1%\DATA\APPL\SIMOTIME.DATA.ITEMMAST.DAT set ITMPRINT=%BaseLib1%\DATA\WRK1\SIMOTIME.REPORT.ITMPRINT.DAT if exist %ITMPRINT% del %ITMPRINT% rem * rem * ******************************************************************* rem * Step 2 Edit input, create a new output file... rem * :ExecuteNumericPrint call SimoNOTE "Identify JobStep ExecuteNumericPrint" run NUMPRTC1 if not "%ERRORLEVEL%" == "0" set JobStatus=0010 if not "%JobStatus%" == "0000" goto :EojNOK rem * if exist %ITMPRINT% (call SimoNOTE "Produced DataSet %ITMPRINT%" goto :EojAOK) set JobStatus=0020 if not "%JobStatus%" == "0000" goto :EojNOK :EojAOK call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus% " goto :End :EojNOK call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus% " goto :End :End call SimoNOTE "Conclude SysOut is %SYSOUT%" endlocal if not "%1" == "nopause" pause JCL MemberThe following is the JCL member (NUMPRTJ1.jcl) required to run the sample COBOL program in a mainframe-oriented environment. This is a two step job. The first step (identified by the //NUMPRTS1 statement) will delete the file that was created from a previous run of this job. The second step (identified by the //NUMPRTS2 statement) will execute the sample program. The JOB and DD statements may need to be modified for different mainframe-oriented environments. The job may be executed on an IBM Mainframe System with ZOS or a Linux, UNIX or Windows System with Micro Focus Enterprise Server or Studio. //NUMPRTJ1 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 - Build print lines of text from packed and binary data. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* The job will show how to convert PACKED and BINARY fields to //* printable text fields. //* //* This set of programs will run on a mainframe under MVS or on a //* Personal Computer with Windows and Micro Focus Mainframe Express. //* or ES/MTO with the Batch Facility. //* //* ************ //* * NUMPRTJ1 * //* ********jcl* //* * //* ************ //* * IEFBR14 * //* ********utl* //* * //* ************ ************ ************ //* * ITEMMAST *-----* NUMPRTC1 *-----* ITMPRINT * //* ********dat* ********cbl* ********dat* //* * //* * //* ************ //* * EOJ * //* ************ //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* //NUMPRTS1 EXEC PGM=IEFBR14 //DD1 DD DSN=SIMOTIME.DATA.ITMPRINT,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=133,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2, Read item master and write to price list file. //* //NUMPRTS2 EXEC PGM=NUMPRTC1 //STEPLIB DD DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR //ITEMMAST DD DSN=SIMOTIME.DATA.ITEMMAST,DISP=SHR //ITMPRINT DD DSN=SIMOTIME.REPORT.ITMPRINT, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=133,DSORG=PS) //SYSOUT DD SYSOUT=* // The COBOL ProgramThe following is the source code (NUMPRTC1.cbl) for the sample COBOL program. IDENTIFICATION DIVISION. PROGRAM-ID. NUMPRTC1. AUTHOR. SIMOTIME TECHNOLOGIES. ***************************************************************** * Copyright (C) 1987-2019 SimoTime Technologies. * * * * 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 purpose requires a fee to be paid to SimoTime * * Technologies. 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 * * Technologies. * * * * SimoTime Technologies 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 * * 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 * * * * SimoTime Technologies * * 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 Technologies, * * 15 Carnoustie Drive, Novato, CA 94949-5849. * * * ***************************************************************** * This program is provided by SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** * Source Member: NUMPRTC1.CBL ***************************************************************** * * NUMPRTC1 - Print text and various numeric field formats. * * DESCRIPTION * ----------- * This set of programs is used to show the various numeric * formats and how to edit for printing. * * This program illustrates the use of some of the commonly * used numeric formats such as the display format(actual digits), * the packed format (COMP-3) and the binary (COMP) formats. * * The COBOL programs are compiled with the ASSIGN(EXTERNAL) * directive. This provides for external file mapping of file * names. * * When running with Net Express the IBMCOMP an NOTRUNC directives * will be required to maintain compatability with the mainframe * format and field sizes for binary fields. The filetype(11) and * ADV directive will be required to maintain the mainframe print * format for the output file. * * This technique provides for the use of a single COBOL source * program that will run on OS/390, Windows or Unix. * * This program will run on a Personal Computer with Windows * and Micro Focus Net Express or Mainframe Express. * * This program will also run on an IBM Mainframe. * ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT ITEMMAST-FILE ASSIGN TO ITEMMAST ORGANIZATION IS INDEXED ACCESS MODE IS SEQUENTIAL RECORD KEY IS ITEM-NUMBER FILE STATUS IS ITEMMAST-STATUS. SELECT ITMPRINT-FILE ASSIGN TO ITMPRINT ORGANIZATION IS SEQUENTIAL ACCESS MODE IS SEQUENTIAL FILE STATUS IS ITMPRINT-STATUS. ***************************************************************** DATA DIVISION. FILE SECTION. FD ITEMMAST-FILE DATA RECORD IS ITEM-RECORD. COPY ITEMCB01. FD ITMPRINT-FILE DATA RECORD IS ITMPRINT-REC . 01 ITMPRINT-REC. 05 ITMPRINT-DATA-01 PIC X(00132). ***************************************************************** * This program was created using 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. * * * * 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 '* NUMPRTC1 '. 05 T2 pic X(34) value 'Sample Printing of Item File '. 05 T3 pic X(10) value 'v08.02.26 '. 05 T4 pic X(24) value ' http://www.simotime.com'. 01 SIM-COPYRIGHT. 05 C1 pic X(11) value '* NUMPRTC1 '. 05 C2 pic X(20) value 'Copyright 1987-2019 '. 05 C3 pic X(28) value ' SimoTime Technologies '. 05 C4 pic X(20) value ' All Rights Reserved'. 01 ITEMMAST-STATUS. 05 ITEMMAST-STATUS-L pic X. 05 ITEMMAST-STATUS-R pic X. 01 ITEMMAST-EOF pic X value 'N'. 01 ITEMMAST-OPEN-FLAG pic X value 'C'. 01 ITMPRINT-STATUS. 05 ITMPRINT-STATUS-L pic X. 05 ITMPRINT-STATUS-R pic X. 01 ITMPRINT-EOF pic X value 'N'. 01 ITMPRINT-OPEN-FLAG pic X value 'C'. ***************************************************************** * 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 '* NUMPRTC1 '. 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 'NUMPRTC1'. 01 APPL-RESULT pic S9(9) comp. 88 APPL-AOK value 0. 88 APPL-EOF value 16. 01 LINE-COUNT pic 9(5) value 66. 01 PRINT-HDR-1-LINE. 05 FILLER pic X(57) value SPACES. 05 FILLER pic X(17) value 'Item Master File'. 01 PRINT-HDR-2-LINE. 05 FILLER pic X(60) value SPACES. 05 FILLER pic X(10) value 'Price List'. 01 PRINT-HDR-3-LINE. 05 FILLER pic X(12) value ' Number'. 05 FILLER PIC X value SPACE. 05 FILLER pic X(11) value 'Description'. 05 FILLER PIC X(45) value SPACES. 05 FILLER pic X(11) value 'Price'. 05 FILLER PIC X value SPACE. 05 FILLER pic X(11) value 'Available'. 01 PRINT-DTL-1-LINE. 05 P-ITEM-NUMBER PIC X(12). 05 FILLER PIC X value SPACE. 05 P-ITEM-DESCRIPTION PIC X(48). 05 FILLER PIC X value SPACE. 05 P-ITEM-PRICE PIC Z,ZZZ,ZZZ.99-. 05 FILLER PIC X(6) value SPACE. 05 P-QTY-AVAILABLE PIC Z,ZZZ,ZZ9+. 01 ITEMMAST-TOTAL. 05 ITEMMAST-RDR pic 9(9) value 0. 05 filler pic X(3) value ' - '. 05 filler pic X(23) value 'Line count for ITEMMAST'. 01 ITMPRINT-TOTAL. 05 ITMPRINT-ADD pic 9(9) value 0. 05 filler pic X(3) value ' - '. 05 filler pic X(23) value 'Line count for ITMPRINT'. ***************************************************************** PROCEDURE DIVISION. perform Z-POST-COPYRIGHT perform ITEMMAST-OPEN perform ITMPRINT-OPEN perform until ITEMMAST-STATUS not = '00' perform ITEMMAST-READ if ITEMMAST-STATUS = '00' if LINE-COUNT > 60 move SPACES to ITMPRINT-REC move PRINT-HDR-1-LINE to ITMPRINT-REC perform ITMPRINT-WRITE-HDR-1 move PRINT-HDR-2-LINE to ITMPRINT-REC perform ITMPRINT-WRITE move PRINT-HDR-3-LINE to ITMPRINT-REC perform ITMPRINT-WRITE add 3 to ZERO giving LINE-COUNT end-if add 1 to ITEMMAST-RDR perform BUILD-PRINT-LINE perform ITMPRINT-WRITE if ITMPRINT-STATUS = '00' add 1 to ITMPRINT-ADD add 1 to LINE-COUNT end-if end-if end-perform move ITEMMAST-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ITMPRINT-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT if APPL-EOF move 'is Complete...' to MESSAGE-TEXT else move 'is ABENDING...' to MESSAGE-TEXT end-if perform Z-DISPLAY-MESSAGE-TEXT perform ITMPRINT-CLOSE perform ITEMMAST-CLOSE GOBACK. ***************************************************************** BUILD-PRINT-LINE. *> TransCOPY... move ITEM-NUMBER to P-ITEM-NUMBER inspect P-ITEM-NUMBER replacing leading ZEROES by SPACE move ITEM-DESCRIPTION to P-ITEM-DESCRIPTION move ITEM-PRICE to P-ITEM-PRICE subtract ITEM-QTY-ALLOCATED from ITEM-QTY-ONHAND giving P-QTY-AVAILABLE move SPACES to ITMPRINT-REC move PRINT-DTL-1-LINE to ITMPRINT-REC exit. ***************************************************************** * I/O Routines for the INPUT File... * ***************************************************************** ITEMMAST-CLOSE. add 8 to ZERO giving APPL-RESULT. close ITEMMAST-FILE if ITEMMAST-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 ITEMMAST' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ITEMMAST-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* ITEMMAST-READ. read ITEMMAST-FILE if ITEMMAST-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if ITEMMAST-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 ITEMMAST-EOF else move 'READ Failure with ITEMMAST' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ITEMMAST-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if end-if exit. *---------------------------------------------------------------* ITEMMAST-OPEN. add 8 to ZERO giving APPL-RESULT. open input ITEMMAST-FILE if ITEMMAST-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to ITEMMAST-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'OPEN Failure with ITEMMAST' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ITEMMAST-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * I/O Routines for the OUTPUT File... * ***************************************************************** ITMPRINT-WRITE. if ITMPRINT-OPEN-FLAG = 'C' perform ITMPRINT-OPEN end-if write ITMPRINT-REC after advancing 1 if ITMPRINT-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if ITMPRINT-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 ITMPRINT' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ITMPRINT-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ITMPRINT-WRITE-HDR-1. if ITMPRINT-OPEN-FLAG = 'C' perform ITMPRINT-OPEN end-if write ITMPRINT-REC after advancing page if ITMPRINT-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if ITMPRINT-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 ITMPRINT' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ITMPRINT-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* ITMPRINT-OPEN. add 8 to ZERO giving APPL-RESULT. open OUTPUT ITMPRINT-FILE if ITMPRINT-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to ITMPRINT-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'OPEN Failure with ITMPRINT' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ITMPRINT-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* ITMPRINT-CLOSE. add 8 to ZERO giving APPL-RESULT. close ITMPRINT-FILE if ITMPRINT-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'C' to ITMPRINT-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'CLOSE Failure with ITMPRINT' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move ITMPRINT-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: 2006-03-30 Generation Time: 13:39:08:07 * ***************************************************************** The COBOL Copy FileThe following is the COBOL Copy File (ITEMCB01.cpy) that is used to define the record structure for the Item Master file. ***************************************************************** * ITEMCB01.CPY - a COBOL Copy File * * An Item Master File used by the Demo programs. * * This is a VSAM Keyed-Sequential-Data-Set or Key-Indexed 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 ITEM-RECORD. 05 ITEM-NUMBER PIC 9(12). COL-A 05 ITEM-DATA. 10 ITEM-DESCRIPTION PIC X(48). COL-B 10 ITEM-QTY-ONHAND PIC 9(7) COMP. COL-C 10 ITEM-QTY-ALLOCATED PIC 9(7) COMP. COL-D 10 ITEM-UNIT-OF-MEASURE PIC X(16). COL-E 10 ITEM-COST PIC S9(7)V9(2) COMP-3. COL-F 10 ITEM-PRICE PIC S9(7)V9(2) COMP-3. COL-G 10 ITEM-LADATE PIC X(8). COL-H 10 ITEM-LATIME PIC X(8). COL-I 10 ITEM-TOKEN PIC X(3). 10 ITEM-DISCOUNT OCCURS 3 TIMES. 15 ITEM-D-CODE PIC X. 15 ITEM-D-PERCENT PIC S9(3)V9(4). 10 FILLER PIC X(375). * *** ITEMCB01 - End-of-Copy File - - - - - - - - - - - ITEMCB01 * ***************************************************************** * SummaryThis suite of programs provides examples of how a COBOL program may be used to properly print (or display) numeric fields. 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 Numbers Connection for additional information about the structure and processing of numeric data items (or numeric fields). Explore The Binary or COMP format for numeric data strings. This numeric structure is supported by COBOL and may be explicitly defined with the "USAGE IS COMP" or "USAGE IS BINARY" clause. Explore The Edited for Display format for numeric data strings. This numeric structure is supported by COBOL and may be used with an edit-mask to prepare the presentation for readability by human beings. Explore The Packed-Decimal or COMP-3 format for numeric data strings. This numeric structure is supported by COBOL and may be explicitly defined with the "USAGE IS COMP-3" clause. Explore The Zoned-Decimal format for numeric data strings. This numeric structure is the default numeric for COBOL and may be explicitly defined with the "USAGE IS DISPLAY" clause. 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 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. 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
|