Print and Display
 Fields with Binary Values
http://www.simotime.com
When technology complements business    Copyright © 1987-2010  SimoTime Enterprises  All Rights Reserved
  Table of Contents Version 10.03.20 
  Introduction
 
  Programming Objectives
  Programming Input and Output
  Programming Requirements
  Programming Overview
  The CMD Member for Net Express
  The JCL Member for z/OS or Mainframe Express
  The COBOL Source Member
  The COBOL Copy Files
 
  Table of Binary Values
  Table of Printable ASCII Characters
  Table of Printable ASCII Characters with Alternate Codes
  Table of Printable EBCDIC Characters
  Table of Printable EBCDIC Characters with Alternate Codes
  Summary
 
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages of Interest
  Glossary of Terms
  Comments or Suggestions
  About SimoTime

Introduction
[Next] [Previous] [Table-of-Contents]

A data string that is going to be printed or displayed on a display device should not contain binary data (i.e. non-display or non-printable characters). The binary characters may be the same value as a print or display control character that could result in the incorrect presentation of the data. This suite of programs provides an example of how a COBOL program may be used to define a binary table and then display data strings that have embedded binary (or non-display and non-print) values by removing the binary characters. This is accomplished by replacing the binary characters with space characters.

The sample programs will attempt to display the data strings with the binary values and then use a routine that replaces non-display or non-print values with spaces prior to displaying or printing. The intent of this example is to show how binary values may conflict with control or formatting characters for display devices or printers. The results may be slightly different depending on the display device or printer used when running this example.

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 (refer to http://www.microfocus.com).

Programming Objectives
(Next) (Previous) (Table-of-Contents)

This example illustrates the following functions.

1. Demonstrate how to define a table containing the 256, single-byte binary values from x'00' to x'FF' using COBOL.
2. Demonstrate how to access each element in the table or byte within a field or data string.
3. Demonstrate how to use the tables to replace non-display or non-print characters in a data string with spaces prior to displaying or printing the data string.

Programming Input and Output
(Next) (Previous) (Table-of-Contents)

The following shows the input and output for the program. The x'nn' represents a single byte for the actual binary value.

TEST-01-ROUTINE is Starting...
Test-000,x'00',End-of-Text-String...
Test-001,x'01',End-of-Text-String...
Test-002,x'02',End-of-Text-String...
Test-003,x'03',End-of-Text-String...
Test-004,x'04',End-of-Text-String...
Test-005,x'05'   ,End-of-Text-String...
Test-006,x'06',End-of-Text-String...
Test-007,x'07',End-of-Text-String...
Test-008,x'08',End-of-Text-String...
Test-009,x'09',End-of-Text-String...
Test-010,x'0A'
,End-of-Text-String...
Test-011,x'0B',End-of-Text-String...
Test-012,x'0C',End-of-Text-String...
Test-013,x'0D',End-of-Text-String...
Test-014,x'0E',End-of-Text-String...
Test-015,x'0F',End-of-Text-String...
Test-016,x'10',End-of-Text-String...
TEST-01-ROUTINE is Finished...
TEST-02-ROUTINE is Starting...
Test-000, ,End-of-Text-String...
Test-001, ,End-of-Text-String...
Test-002, ,End-of-Text-String...
Test-003, ,End-of-Text-String...
Test-004, ,End-of-Text-String...
Test-005, ,End-of-Text-String...
Test-006, ,End-of-Text-String...
Test-007, ,End-of-Text-String...
Test-008, ,End-of-Text-String...
Test-009, ,End-of-Text-String...
Test-010, ,End-of-Text-String...
Test-011, ,End-of-Text-String...
Test-012, ,End-of-Text-String...
Test-013, ,End-of-Text-String...
Test-014, ,End-of-Text-String...
Test-015, ,End-of-Text-String...
Test-016, ,End-of-Text-String...
TEST-02-ROUTINE is Finished...
TEST-03-ROUTINE is Starting...
Next two lines should be identical...
Test-0D0A
End-of-Text-String
Test-0D0A   End-of-Text-String
TEST-03-ROUTINE is Finished...

Programming Requirements
(Next) (Previous) (Table-of-Contents)

This suite of samples programs will run on the following platforms.

1. Executes on Windows/NT and Windows/XP using Micro Focus Net Express and the CMD file provided.
2. May be ported to run on the UNIX platforms supported by Micro Focus COBOL.
3. Executes on a mainframe with OS/390 or Windows/2000, Windows/NT and Windows/XP using Micro Focus Mainframe Express and the JCL file provided.

Programming Overview
(Next) (Previous) (Table-of-Contents)

This program will create a text string with non-display binary data mixed with display data and then attempt to display (refer to TEST-01-ROUTINE). The same test is then performed (refer to TEST-02-ROUTINE) but the message display routine will scan the display buffer to remove any non-display values from the text string. A third test (refer to TEST-03-ROUTINE) will insert a x'0D0A' into the text string and attempt to display the string with the binary (or non-display) values. Also, the third test will display the string using the display routine that replaces non-display values with spaces.

The COBOL program will first do a perform loop 17 times and create text strings that will contain a binary value from x'00' to x'10'. During each iteration of the programming loop a routine will be called that will attempt to display the text strings with the included binary values.

Next, the COBOL program will do a perform loop 17 times and create text strings that will contain a binary value from x'00' to x'10'. During each iteration of the programming loop a routine will be called that will replace the binary values with space characters before displaying the text strings.

The following is a block diagram of the table processing demonstration. The BLUE boxes are unique to the mainframe and Micro Focus Mainframe Express. The RED boxes are unique to the PC with Windows and Micro Focus Net Express. The GREEN boxes are platform independent and will execute on the mainframe or a PC with Windows. Also, the GREEN boxes may be ported to a UNIX platform that is supported by Micro Focus COBOL.

CBLPRTJ1
jcl
     
CBLPRTE1
cmd
      The JCL or CMD member for running the application.
 
     
 
       
IEFBR14
utl
     
IF Exist
stmt
      Delete any previously created SYSMEMO1 file.
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
       
   
CBLPRTC1
CBL
     
     
     
SYSMEMO1
data
      Attempt to display text strings with embedded binary values and then display same text strings with binary values replaced by space characters. Also, write the text strings to a file.
   
 
           
   
End-of-Job
EOJ
           

The CMD Member
[Next] [Previous] [Table-of-Contents]

The following is the Windows CMD (CBLPRTE1.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  *                   This program is provided by:                    *
REM  *                    SimoTime Enterprises, LLC                      *
REM  *           (C) Copyright 1987-2010 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 ECHO function.
REM  * Author - SimoTime Enterprises
REM  * Date   - January 24, 1996
REM  *
REM  * The first job step (DeleteQSAM) will delete any previously created
REM  * file.
REM  *
REM  * The second job step (CreateQSAM) will create a new file that shows
REM  * the table searches.
REM  * For this program to work the COBOL program must be compiled with
REM  * the ASSIGN(EXTERNAL) and SEQUENTIAL(LINE) directives under
REM  * Net Express.
REM  *
REM  * This set of programs will run on a Personal Computer with
REM  * Windows and Micro Focus Net Express.
REM  *
rem  * ********************************************************************
rem  * Step   1 of 2  Set the global environment variables,
rem  *                Delete any previously created file...
rem  *
     call Env1PROD
     set CmdName=CblPrtE1
rem  *
     call SimoNOTE "*******************************************************%CmdName%"
     call SimoNOTE "Starting JobName %CmdName%, User is %USERNAME%"
     call SimoNOTE "Identify JobStep DeleteQSAM"
:DeleteQSAM
     set SYSMEMO1=%BaseLib1%\DataLibA\Wrk1\SYSMEMO1.TXT
     if exist %SYSMEMO1% erase %SYSMEMO1%
REM  *
REM  * *******************************************************************
REM  * Step   2 of 2  Create and populate a new QSAM file...
REM  *
:CreateQSAM
     call SimoNOTE "Identify JobStep CreateQSAM"
     run CblPrtC1
     if not "%ERRORLEVEL%" == "0000"1 set JobStatus=0010
     if not "%JobStatus%" == "0000" goto :EojNOK
rem  *
     if exist %SYSMEMO1% goto :EojAok
     set JobStatus=0020
     goto :EojNok
:EojAok
     call SimoNOTE "Produced %SYSMEMO1%"
     call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     call SimoNOTE "Conclude SysLog is %SYSLOG%"
     if not "%1" == "nopause" pause

The JCL Member for z/OS or Mainframe Express
[Next] [Previous] [Table-of-Contents]

The following is the mainframe JCL (CBLPRTJ1.JCL) required to run the sample COBOL program. This is a two step job. The first step (identified by the //BLOWAWAY statement) will delete the file that was created from a previous run of this job. The second step (identified by the //SHOWTEXT statement) will execute the sample program.

The JOB and DD statements will need to be modified for different mainframe environments.

//CBLPRTJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*                   This program is provided by:                    *
//*                    SimoTime Enterprises, LLC                      *
//*           (C) Copyright 1987-2010 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Replace non-display, non-print characters with a SPACE.
//* Author - SimoTime Enterprises
//* Date   - January 24, 1996
//*
//* The job will attempt to display a text string with non-display
//* characters embedded in the string. The program will then attempt
//* to display the text string after scanning and replacing the
//* non-display characters with spaces.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//*                     ************
//*                     * CBLPRTJ1 *
//*                     ********jcl*
//*                          *
//*                     ************
//*                     * IEFBR14  *
//*                     ********utl*
//*                          *
//*                     ************     ************
//*                     * CBLPRTC1 *-----* SYSMEMO1 *
//*                     ********cbl*     ********dat*
//*                          *   *
//*                          *
//*                     ************
//*                     *   EOJ    *
//*                     ************
//*
//* *******************************************************************
//* Step   1   Delete any previously created file...
//*
//BLOWAWAY EXEC PGM=IEFBR14
//DD1      DD  DSN=SIMOTIME.DATA.SYSMEMO1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//*
//* *******************************************************************
//* Step   2   Edit input, create a new output file...
//*
//SHOWTEXT EXEC PGM=CBLPRTC1
//STEPLIB  DD  DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR
//SYSMEMO1 DD  DSN=SIMOTIME.DATA.SYSMEMO1,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//SYSOUT   DD  SYSOUT=*
//

The COBOL Source Code
[Next] [Previous] [Table-of-Contents]

The following is the source code (CBLPRTC1.CBL) for the sample COBOL program. This program will

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    CBLPRTC1.
       AUTHOR.        SIMOTIME ENTERPRISES.
      *****************************************************************
      * Copyright (C) 1987-2010 SimoTime Enterprises, LLC.            *
      *                                                               *
      * 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 express 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: CBLPRTC1.CBL
      * Copy Files:    BIN256B1.CPY
      *                PRTASCB1.CPY
      *                PRTEBCB1.CPY
      *****************************************************************
      *
      * CBLPRTC1 - Show what happens when binary data is in a display
      *            message.
      *
      * CALLING PROTOCOL
      * ----------------
      * Use standard procedure to RUN or ANIMATE.
      *
      * DESCRIPTION
      * -----------
      * This program will create a text string with non-display binary
      * data and then attempt to display (refer to TEST-01-ROUTINE).
      * The same test is performed (refer to TEST-02-ROUTINE) with but
      * the message display routine will scan the display buffer to
      * remove any non-display values from the text string.
      *
      *          ************
      *          * CBLPRTJ1 *
      *          ********jcl*
      *               *
      *               *
      *          ************     ************
      *          * CBLPRTC1 *-----* CONSOLE  *
      *          ********cbl*  *  ******dsply*
      *               *        *
      *               *        *
      *               *        *  ************
      *               *        *--* SYSMEMO1 *
      *               *           ********txt*
      *          ************
      *          *   EOJ    *
      *          ************
      *
      *****************************************************************
      *
      * MAINTENANCE
      * -----------
      * 1989/02/27 Simmons, Created program.
      * 1997/03/17 Simmons, No changes to date....
      *
      *****************************************************************
      *
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT SYSMEMO1-FILE  ASSIGN to     SYSMEMO1
                  ORGANIZATION is SEQUENTIAL
                  ACCESS MODE  is SEQUENTIAL
                  FILE STATUS  is SYSMEMO1-STATUS.

      *****************************************************************
       DATA DIVISION.
       FILE SECTION.
       FD  SYSMEMO1-FILE
           BLOCK CONTAINS 00800 CHARACTERS
           DATA RECORD    is SYSMEMO1-RECORD
           .
       01  SYSMEMO1-RECORD.
           05  SYSMEMO1-DATA-01  pic X(00080).

       WORKING-STORAGE SECTION.
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *    ------------------------------------------------------------
       01  SIM-TITLE.
           05  T1 pic X(11) value '* CBLPRTC1 '.
           05  T2 pic X(34) value 'Sample Print with Embedded Hex... '.
           05  T3 pic X(10) value ' v05.08.25'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* CBLPRTC1 '.
           05  C2 pic X(20) value 'Copyright 1987-2010 '.
           05  C3 pic X(28) value '  SimoTime Enterprises, LLC '.
           05  C4 pic X(20) value ' All Rights Reserved'.

       01  SIM-THANKS-01.
           05  C1 pic X(11) value '* CBLPRTC1 '.
           05  C2 pic X(32) value 'Thank you, this technology was p'.
           05  C3 pic X(32) value 'roduced at SimoTime Enterprises,'.
           05  C4 pic X(04) value ' LLC'.

       01  SIM-THANKS-02.
           05  C1 pic X(11) value '* CBLPRTC1 '.
           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'.

      *****************************************************************
      *    Buffer used for posting messages to the console.
      *    ------------------------------------------------------------
       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER      pic X(11)   value '* CBLPRTC1 '.
           05  MESSAGE-TEXT.
               10  MESSAGE-TEXT-1  pic X(68)   value SPACES.
               10  MESSAGE-TEXT-2  pic X(188)  value SPACES.

       01  SYSMEMO1-STATUS.
           05  SYSMEMO1-STATUS-L   pic X.
           05  SYSMEMO1-STATUS-R   pic X.
       01  SYSMEMO1-EOF            pic X       value 'N'.
       01  SYSMEMO1-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.

      *****************************************************************
      *    Work fields used for testing Print or Display.
      *    ------------------------------------------------------------
       01  TEST-BUFFER.
           05  FILLER      pic X(5)  value 'Test-'.
           05  TEST-CTR    pic 9(3)  value 0.
           05  FILLER      pic X     value ','.
           05  TEST-HEX    pic X     value SPACE.
           05  FILLER      pic X     value ','.
           05  FILLER      pic X(21) value 'End-of-Text-String...'.

       01  A-ASCII         pic X     value x'41'.
       01  A-EBCDIC        pic X     value x'C1'.
       01  A-COMPILE       pic X     value 'A'.

       01  IX-1            pic 9(3)  value 0.
       01  IX-2            pic 9(3)  value 0.

       01  DISPLAY-LINE.
           05  DISPLAY-VALUE   pic X(16)    value SPACES.
           05  DISPLAY-TEXT    pic X(20)    value SPACES.
       01  MESSAGE-ITEMS.
           05  FILLER pic X(20)    value ' * hex-00 to hex-0F '.
           05  FILLER pic X(20)    value ' * hex-10 to hex-1F '.
           05  FILLER pic X(20)    value ' * hex-20 to hex-2F '.
           05  FILLER pic X(20)    value ' * hex-30 to hex-3F '.
           05  FILLER pic X(20)    value ' * hex-40 to hex-4F '.
           05  FILLER pic X(20)    value ' * hex-50 to hex-5F '.
           05  FILLER pic X(20)    value ' * hex-60 to hex-6F '.
           05  FILLER pic X(20)    value ' * hex-70 to hex-7F '.
           05  FILLER pic X(20)    value ' * hex-80 to hex-8F '.
           05  FILLER pic X(20)    value ' * hex-90 to hex-9F '.
           05  FILLER pic X(20)    value ' * hex-A0 to hex-AF '.
           05  FILLER pic X(20)    value ' * hex-B0 to hex-BF '.
           05  FILLER pic X(20)    value ' * hex-C0 to hex-CF '.
           05  FILLER pic X(20)    value ' * hex-D0 to hex-DF '.
           05  FILLER pic X(20)    value ' * hex-E0 to hex-EF '.
           05  FILLER pic X(20)    value ' * hex-F0 to hex-FF '.
       01  MESSAGE-TABLE           redefines MESSAGE-ITEMS.
           05  MESSAGE-ELEMENT     pic X(20)   occurs 16 times.

       COPY BIN256B1.

       COPY PRTASCB1.
       COPY PRTEBCB1.
       COPY PRTASCB2.
       COPY PRTEBCB2.

      *****************************************************************
       PROCEDURE DIVISION.

           perform Z-POST-COPYRIGHT

           perform SYSMEMO1-OPEN

           perform TEST-01-ROUTINE

           perform TEST-02-ROUTINE

           perform TEST-03-ROUTINE

           perform TEST-04-ROUTINE

           perform TEST-05-ROUTINE

           perform TEST-06-ROUTINE

           perform TEST-07-ROUTINE

           perform SYSMEMO1-CLOSE

           perform Z-THANK-YOU.

           GOBACK.

      *****************************************************************
       PUT-APPL-MESSAGE.
           move MESSAGE-TEXT to SYSMEMO1-DATA-01
           perform Z-DISPLAY-CONSOLE-MESSAGE
           perform SYSMEMO1-WRITE
           exit.

      *****************************************************************
       PUT-APPL-MESSAGE-WITH-EDIT.
      *    The following inspect will replace any non-display text
      *    bytes with a space. The following evaluate will determine
      *    if the program has been compiled for an ASCII or EBCDIC
      *    environment and then replace the appropriate non-display
      *    characters with the appropriate space character.
           evaluate A-COMPILE
             when A-ASCII  inspect MESSAGE-TEXT
                           converting B-INFO to P1-ASC
             when A-EBCDIC inspect MESSAGE-TEXT
                           converting B-INFO to P1-EBC
           end-evaluate
           move MESSAGE-TEXT to SYSMEMO1-DATA-01
           perform Z-DISPLAY-CONSOLE-MESSAGE
           perform SYSMEMO1-WRITE
           exit.

      *****************************************************************
       PUT-APPL-MESSAGE-WITH-EDIT-2.
      *    The following inspect will replace any non-display text
      *    bytes with a space. The following evaluate will determine
      *    if the program has been compiled for an ASCII or EBCDIC
      *    environment and then replace the appropriate non-display
      *    characters with the appropriate space character.
           evaluate A-COMPILE
             when A-ASCII  inspect MESSAGE-TEXT
                           converting B-INFO to P2-ASC
             when A-EBCDIC inspect MESSAGE-TEXT
                           converting B-INFO to P2-EBC
           end-evaluate
           move MESSAGE-TEXT to SYSMEMO1-DATA-01
           perform Z-DISPLAY-CONSOLE-MESSAGE
           perform SYSMEMO1-WRITE
           exit.

      *****************************************************************
       TEST-01-ROUTINE.
           move 'TEST-01-ROUTINE is Starting...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT

           move ZERO  to TEST-CTR
           move SPACE to TEST-HEX

           move TEST-BUFFER to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT

           perform varying TEST-CTR from 0 by 1
           until TEST-CTR > 16
      *      Force a binary value into the text string to be displayed.
      *      As TEST-CTR is incremented a non-display value of x'00'
      *      through x'0F' is placed in the message to be displayed.
             move B-INFO(TEST-CTR + 1:1) to TEST-HEX
             move TEST-BUFFER to MESSAGE-TEXT
      *      The following perform will attempt to display the text
      *      string without testing and changing the embedded
      *      non-display, non-print characters.
             perform PUT-APPL-MESSAGE
           end-perform

           move 'TEST-01-ROUTINE is Finished...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT

           exit.

      *****************************************************************
       TEST-02-ROUTINE.
           move 'TEST-02-ROUTINE is Starting...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT

           move ZERO to TEST-CTR
           move SPACE to TEST-HEX

           move TEST-BUFFER to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT

           perform varying TEST-CTR from 0 by 1
           until TEST-CTR > 16
      *      Force a binary value into the text string to be displayed
             move B-INFO(TEST-CTR + 1:1) to TEST-HEX
             move TEST-BUFFER to MESSAGE-TEXT
      *      The following perform will attempt to display the text
      *      string after testing and changing the embedded
      *      non-display, non-print characters to a space character.
             perform PUT-APPL-MESSAGE-WITH-EDIT
           end-perform

           move 'TEST-02-ROUTINE is Finished...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT

           exit.

      *****************************************************************
       TEST-03-ROUTINE.
           move 'TEST-03-ROUTINE is Starting...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT

           move 'Next two lines should be identical...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT

           move 'Test-0D0A '  to MESSAGE-TEXT(1:10)
           move x'0D0A'       to MESSAGE-TEXT(11:2)
           move 'End-of-Text-String' to MESSAGE-TEXT(13:18)
      *      The following perform will attempt to display the text
      *      string without testing and changing the embedded
      *      carriage-return, line feed characters.
           perform PUT-APPL-MESSAGE

           move 'Test-0D0A '  to MESSAGE-TEXT(1:10)
           move x'0D0A'       to MESSAGE-TEXT(11:2)
           move 'End-of-Text-String' to MESSAGE-TEXT(13:18)
           perform PUT-APPL-MESSAGE-WITH-EDIT

           move 'TEST-03-ROUTINE is Finished...' to MESSAGE-TEXT
      *      The following perform will attempt to display the text
      *      string after testing and changing the embedded
      *      carriage-return, line feed characters to space characters.
           perform PUT-APPL-MESSAGE-WITH-EDIT

           move 'TEST-03-ROUTINE is Finished...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT

           exit.

      *****************************************************************
       TEST-04-ROUTINE.
           move 'TEST-04-ROUTINE is Starting...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE
           perform varying IX-1 from 1 by 16 until IX-1 > 256
             move B-INFO(IX-1:16) to MESSAGE-TEXT(13:18)
      *      The following perform will attempt to display the text
      *      string without testing and changing the embedded
      *      carriage-return, line feed characters.
             perform PUT-APPL-MESSAGE
           end-perform
           move 'TEST-04-ROUTINE is Finished...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT
           exit.

      *****************************************************************
       TEST-05-ROUTINE.
           move 'TEST-05-ROUTINE is Starting...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE
           add 3 to ZERO giving IX-2
           perform varying IX-1 from 33 by 16 until IX-1 > 256
             move B-INFO(IX-1:16) to DISPLAY-VALUE
             move MESSAGE-ELEMENT(IX-2)to DISPLAY-TEXT
             move DISPLAY-LINE to MESSAGE-TEXT
      *      The following perform will attempt to display the text
      *      string without testing and changing the embedded
      *      carriage-return, line feed characters.
             perform PUT-APPL-MESSAGE
             add 1 to IX-2
           end-perform
           move 'TEST-05-ROUTINE is Finished...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT
           exit.

      *****************************************************************
       TEST-06-ROUTINE.
           move 'TEST-06-ROUTINE is Starting...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE
           add 1 to ZERO giving IX-2
           perform varying IX-1 from 1 by 16 until IX-1 > 256
             move B-INFO(IX-1:16) to DISPLAY-VALUE
             move MESSAGE-ELEMENT(IX-2)to DISPLAY-TEXT
             move DISPLAY-LINE to MESSAGE-TEXT
      *      The following perform will attempt to display the text
      *      string with testing and changing the embedded non-display
      *      characters using the USA table.
             perform PUT-APPL-MESSAGE-WITH-EDIT
             add 1 to IX-2
           end-perform
           move 'TEST-06-ROUTINE is Finished...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE-WITH-EDIT
           exit.

      *****************************************************************
       TEST-07-ROUTINE.
           move 'TEST-07-ROUTINE is Starting...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE
           add 1 to ZERO giving IX-2
           perform varying IX-1 from 1 by 16 until IX-1 > 256
             move B-INFO(IX-1:16) to DISPLAY-VALUE
             move MESSAGE-ELEMENT(IX-2)to DISPLAY-TEXT
             move DISPLAY-LINE to MESSAGE-TEXT
      *      The following perform will attempt to display the text
      *      string with testing and changing the embedded non-display
      *      characters using the extended table.
             perform PUT-APPL-MESSAGE-WITH-EDIT-2
             add 1 to IX-2
           end-perform
           move 'TEST-07-ROUTINE is Finished...' to MESSAGE-TEXT
           perform PUT-APPL-MESSAGE
           exit.

      *****************************************************************
      * I/O ROUTINES FOR SYSMEMO1...                                  *
      *****************************************************************
       SYSMEMO1-WRITE.
           if  SYSMEMO1-OPEN-FLAG = 'C'
               perform SYSMEMO1-OPEN
           end-if
           write SYSMEMO1-RECORD
           if  SYSMEMO1-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               if  SYSMEMO1-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 'SYSMEMO1-Failure-WRITE...' to MESSAGE-TEXT
               perform Z-DISPLAY-CONSOLE-MESSAGE
               move SYSMEMO1-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSMEMO1-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open output SYSMEMO1-FILE
           if  SYSMEMO1-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to SYSMEMO1-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'SYSMEMO1-Failure-OPEN...' to MESSAGE-TEXT
               perform Z-DISPLAY-CONSOLE-MESSAGE
               move SYSMEMO1-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       SYSMEMO1-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close SYSMEMO1-FILE
           if  SYSMEMO1-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'C' to SYSMEMO1-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'SYSMEMO1-Failure-CLOSE...' to MESSAGE-TEXT
               perform Z-DISPLAY-CONSOLE-MESSAGE
               move SYSMEMO1-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.

      *****************************************************************
      * The following Z-Routines perform administrative tasks         *
      * 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-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.

      *****************************************************************
       Z-POST-COPYRIGHT.
           display SIM-TITLE     upon console
           display SIM-COPYRIGHT upon console
           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 '* CBLPRTC1 File-Status-' IO-STAT1 '/'
                       TWO-BYTES-BINARY upon console
           else
               display '* CBLPRTC1 File-Status-' IO-STATUS upon console
           end-if
           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.

      *****************************************************************
       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 COBOL Copy Files
[Next] [Previous] [Table-of-Contents]

This section provides a listing of the source code for the COBOL copy files used to define the tables of binary values. These tables are used to inspect a message buffer and replace non-display or non-print characters with spaces.

Table of Binary Values
[Next] [Previous] [Table-of-Contents]

The following is the source code (BIN256B1.CPY) for the COBOL copy file that defines a table of the possible 256 binary values.

      *****************************************************************
      *         Copyright (C) 1987-2010 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       *
      *****************************************************************
      *
....:.*..1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
       01  BINARY-DATA.
           05  FILLER pic X(16)
                          value X'000102030405060708090A0B0C0D0E0F'.    000-015
           05  FILLER pic X(16)
                          value X'101112131415161718191A1B1C1D1E1F'.    016-031
           05  FILLER pic X(16)
                          value X'202122232425262728292A2B2C2D2E2F'.    032-047
           05  FILLER pic X(16)
                          value X'303132333435363738393A3B3C3D3E3F'.    048-063
           05  FILLER pic X(16)
                          value X'404142434445464748494A4B4C4D4E4F'.    064-079
           05  FILLER pic X(16)
                          value X'505152535455565758595A5B5C5D5E5F'.    080=095
           05  FILLER pic X(16)
                          value X'606162636465666768696A6B6C6D6E6F'.    096-111
           05  FILLER pic X(16)
                          value X'707172737475767778797A7B7C7D7E7F'.    112-127
           05  FILLER pic X(16)
                          value X'808182838485868788898A8B8C8D8E8F'.    128 143
           05  FILLER pic X(16)
                          value X'909192939495969798999A9B9C9D9E9F'.    144-159
           05  FILLER pic X(16)
                          value X'A0A1A2A3A4A5A6A7A8A9AAABACADAEAF'.    160-175
           05  FILLER pic X(16)
                          value X'B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF'.    176-191
           05  FILLER pic X(16)
                          value X'C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF'.    192-207
           05  FILLER pic X(16)
                          value X'D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF'.    208-223
           05  FILLER pic X(16)
                          value X'E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF'.    224-239
           05  FILLER pic X(16)
                          value X'F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF'.    240-255
....:.*..1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
      *
       01  B-INFO          redefines BINARY-DATA pic X(256).
       01  BINARY-TABLE    redefines BINARY-DATA.
           05  BINARY-BYTE pic X     occurs 256 times.
      *
      *!   BIN256B1 - End-of-Copy File ... Version 05.10.20
      *

Table of Printable ASCII Characters
[Next] [Previous] [Table-of-Contents]

The following is the source code (PRTASCB1.CPY) for the COBOL copy file that defines a table of the valid print or display characters for the ASCII-encoded environment.

      *****************************************************************
      *         Copyright (C) 1987-2010 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       *
      *****************************************************************
      * This table is commonly used to change the non-display or      *
      * non-print characters in a message text string to spaces.      *
      * This table will only work for ASCII-encoded text strings.     *
      * The following is an example of an inspect statement for COBOL *
      *                                                               *
      *       inspect MESSAGE-TEXT converting B-INFO to P1-ASC        *
      *                                                               *
      * Note: Refer to BIN256B1.CPY for the table of binary values.   *
      *****************************************************************
      *
      *..1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
       01  P1-ASC-DATA.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)                                           !"#$%&'
                         value X'202122232425262728292A2B2C2D2E2F'.     ()*+,-./
           05 FILLER pic X(16)                                          01234567
                         value X'303132333435363738393A3B3C3D3E3F'.     89:;<=>?
           05 FILLER pic X(16)                                          @ABCDEFG
                         value X'404142434445464748494A4B4C4D4E4F'.     HIJKLMNO
           05 FILLER pic X(16)                                          PQRSTUVW
                         value X'505152535455565758595A5B5C5D5E5F'.     XYZ[\]^_
           05 FILLER pic X(16)                                          `abcdefg
                         value X'606162636465666768696A6B6C6D6E6F'.     hijklmno
           05 FILLER pic X(16)                                          pqrstuvw
                         value X'707172737475767778797A7B7C7D7E20'.     xyz{|}~
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
      *..1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
       01  P1-ASC redefines P1-ASC-DATA pic X(256).
      *
      *!   PRTASCB1 - End-of-Copy File ... Version 05.10.24
      *

Table of Printable ASCII Characters with Alternate Codes
[Next] [Previous] [Table-of-Contents]

The following is the source code (PRTASCB2.CPY) for the COBOL copy file that defines a table of the valid print or display characters for the ASCII-encoded environment that includes the vowels with the Acute, Grave, Umlat, Circumflex, Tilde, A-ring, Cedilla, O-slash and Strasse plus additional currency symbols and Diphthongs.

      *****************************************************************
      *         Copyright (C) 1987-2010 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       *
      *****************************************************************
      * This table is commonly used to change the non-display or      *
      * non-print characters in a message text string to spaces.      *
      * This table will only work for ASCII-encoded text strings.     *
      *                                                               *
      * The table includes the vowels with the acute, grave, umlat,   *
      * circumflex, tilde, a-ring, cedilla, o-slash and strasse.      *
      * The font type for the screen or printer may need to be        *
      * configured for Courier New (fixed font) or  Times New Roman   *
      * (proportional font).                                          *
      *                                                               *
      * The following is an example of an inspect statement for COBOL *
      *                                                               *
      *       inspect MESSAGE-TEXT converting B-INFO to P2-ASC        *
      *                                                               *
      * Note: Refer to BIN256B2.CPY for the table of binary values.   *
      *****************************************************************
      *
      *..1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
       01  P2-ASC-DATA.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)                                           !"#$%&'
                         value X'202122232425262728292A2B2C2D2E2F'.     ()*+,-./
           05 FILLER pic X(16)                                          01234567
                         value X'303132333435363738393A3B3C3D3E3F'.     89:;<=>?
           05 FILLER pic X(16)                                          @ABCDEFG
                         value X'404142434445464748494A4B4C4D4E4F'.     HIJKLMNO
           05 FILLER pic X(16)                                          PQRSTUVW
                         value X'505152535455565758595A5B5C5D5E5F'.     XYZ[\]^_
           05 FILLER pic X(16)                                          `abcdefg
                         value X'606162636465666768696A6B6C6D6E6F'.     hijklmno
           05 FILLER pic X(16)                                          pqrstuvw
                         value X'707172737475767778797A7B7C7D7E20'.     xyz{|}~
           05 FILLER pic X(16)                                          €
                         value X'80202020202020202020202020202020'.
           05 FILLER pic X(16)
                         value X'2020202020202020202020202020209F'.            Ÿ
           05 FILLER pic X(16)                                             £ ¥
                         value X'202020A320A520202020202020202020'.
           05 FILLER pic X(16)
                         value X'20202020202020202020202020202020'.
           05 FILLER pic X(16)                                          ÀÁÂÃÄÅÆÇ
                         value X'C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF'.     ÈÉÊËÌÍÎÏ
           05 FILLER pic X(16)                                           ÑÒÓÔÕÖ
                         value X'20D1D2D3D4D5D62020D9DADBDCDD20DF'.     ØÙÚÛÜÝ ß
           05 FILLER pic X(16)                                          àáâãäåæç
                         value X'E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF'.     èéêëìíîï
           05 FILLER pic X(16)                                           ñòóôõö
                         value X'20F1F2F3F4F5F620F8F9FAFBFCFD20FF'.     øùúûüý
      *..1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
       01  P2-ASC redefines P2-ASC-DATA pic X(256).
      *
      *!   PRTASCB2 - End-of-Copy File ... Version 06.01.24
      *****************************************************************
      *

Table of Printable EBCDIC Characters
[Next] [Previous] [Table-of-Contents]

The following is the source code (PRTEBCB1.CPY) for the COBOL copy file that defines a table of the valid print or display characters for the EBCDIC-encoded environment.

      *****************************************************************
      *         Copyright (C) 1987-2010 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       *
      *****************************************************************
      * This table is commonly used to change the non-display or      *
      * non-print characters in a message text string to spaces.      *
      * This table will only work for EBCDIC-encoded text strings.    *
      * The following is an example of an inspect statement for COBOL *
      *                                                               *
      *       inspect MESSAGE-TEXT converting B-INFO to P1-EBC        *
      *                                                               *
      * Note: Refer to BIN256B1.CPY for the table of binary values.   *
      *****************************************************************
      *
      *..1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
       01  P1-EBC-DATA.
           05 FILLER pic X(16)
                         value X'40404040404040404040404040404040'.
           05 FILLER pic X(16)
                         value X'40404040404040404040404040404040'.
           05 FILLER pic X(16)
                         value X'40404040404040404040404040404040'.
           05 FILLER pic X(16)
                         value X'40404040404040404040404040404040'.
           05 FILLER pic X(16)
                         value X'40404040404040404040404B4C4D4E4F'.        .<(+|
           05 FILLER pic X(16)                                          &
                         value X'504040404040404040405A5B5C5D5E5F'.       !$*);
           05 FILLER pic X(16)                                          -/
                         value X'606140404040404040406A6B6C6D6E6F'.        ,%_>?
           05 FILLER pic X(16)
                         value X'404040404040404040797A7B7C7D7E7F'.      `:#@'="
           05 FILLER pic X(16)                                           abcdefg
                         value X'40818283848586878889404040404040'.     hi
           05 FILLER pic X(16)                                           jklmnop
                         value X'40919293949596979899404040404040'.     qr
           05 FILLER pic X(16)                                           ~stuvwx
                         value X'40A1A2A3A4A5A6A7A8A9404040AD4040'.     yz
           05 FILLER pic X(16)                                          ^
                         value X'B0404040404040404040404040BD4040'.       []
           05 FILLER pic X(16)                                          {ABCDEFG
                         value X'C0C1C2C3C4C5C6C7C8C9404040404040'.     HI
           05 FILLER pic X(16)                                          }JKLMNOP
                         value X'D0D1D2D3D4D5D6D7D8D9404040404040'.     QR
           05 FILLER pic X(16)                                          \ STUVWX
                         value X'E0E1E2E3E4E5E6E7E8E9404040404040'.     YZ
           05 FILLER pic X(16)                                          01234567
                         value X'F0F1F2F3F4F5F6F7F8F9404040404040'.     89
      *..1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
       01  P1-EBC redefines P1-EBC-DATA pic X(256).
      *
      *!   PRTEBCB1 - End-of-Copy File ... Version 05.10.24
      *

Table of Printable EBCDIC Characters with Alternate Codes
[Next] [Previous] [Table-of-Contents]

The following is the source code (PRTEBCB2.CPY) for the COBOL copy file that defines a table of the valid print or display characters for the EBCDIC-encoded environment that includes the vowels with the Acute, Grave, Umlat, Circumflex, Tilde, A-ring, Cedilla, O-slash and Strasse plus additional currency symbols and Diphthongs.

      *****************************************************************
      *         Copyright (C) 1987-2010 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       *
      *****************************************************************
      * This table is commonly used to change the non-display or      *
      * non-print characters in a message text string to spaces.      *
      * This table will only work for EBCDIC-encoded text strings.    *
      *                                                               *
      * The table includes the vowels with the acute, grave, umlat,   *
      * circumflex, tilde, a-ring, cedilla, o-slash and strasse.      *
      * The font type for the screen or printer may need to be        *
      * configured for Courier New (fixed font) or  Times New Roman   *
      * (proportional font).                                          *
      *                                                               *
      * The following is an example of an inspect statement for COBOL *
      *                                                               *
      *       inspect MESSAGE-TEXT converting B-INFO to P2-EBC        *
      *                                                               *
      * Note: Refer to BIN256B1.CPY for the table of binary values.   *
      *****************************************************************
      *
      *..1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
       01  P2-EBC-DATA.
           05 FILLER pic X(16)
                         value X'40404040404040404040404040404040'.
           05 FILLER pic X(16)
                         value X'40404040404040404040404040404040'.
           05 FILLER pic X(16)
                         value X'20404040404040404040404040404040'.     €
           05 FILLER pic X(16)
                         value X'40404040404040404040404040404040'.
           05 FILLER pic X(16)                                            âäàáãå
                         value X'40404243444546474849404B4C4D4E4F'.     çñ¢.<(+|
           05 FILLER pic X(16)                                          &
                         value X'505152535455565758595A5B5C5D5E5F'.       !$*);
           05 FILLER pic X(16)                                          -/ÂÄÀÁÃÅ
                         value X'606162636465666768696A6B6C6D6E6F'.     ÇѦ,%_>?
           05 FILLER pic X(16)                                          øÉÊËÈÍÎÏ
                         value X'407172737475767778797A7B7C7D7E7F'.     Ì`:#@'="
           05 FILLER pic X(16)                                          Øabcdefg
                         value X'808182838485868788894040408D4040'.     hi   ý
           05 FILLER pic X(16)                                           jklmnop
                         value X'4091929394959697989940409C409E40'.     qr  æ Æ
           05 FILLER pic X(16)                                           ~stuvwx
                         value X'40A1A2A3A4A5A6A7A8A9404040AD4040'.     yz   Ý
           05 FILLER pic X(16)                                          ^
                         value X'B0B1B240404040404040BABB40BD4040'.       []
           05 FILLER pic X(16)                                          {ABCDEFG
                         value X'C0C1C2C3C4C5C6C7C8C940CBCCCDCECF'.     HI ôöòóõ
           05 FILLER pic X(16)                                          }JKLMNOP
                         value X'D0D1D2D3D4D5D6D7D8D940DBDCDDDEDF'.     QR ûüùúÿ
           05 FILLER pic X(16)                                          \ STUVWX
                         value X'E0E1E2E3E4E5E6E7E8E940EBECEDEEEF'.     YZ ÔÖÒÓÕ
           05 FILLER pic X(16)                                          01234567
                         value X'F0F1F2F3F4F5F6F7F8F940FBFCFDFEFF'.     89 ÛÜÙÚŸ
      *..1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
       01  P2-EBC redefines P2-EBC-DATA pic X(256).
      *
      *!   PRTEBCB2 - End-of-Copy File ... Version 06.01.24
      *****************************************************************
      *

Summary
Next] [Previous] [Table-of-Contents]

The purpose of this document is to assist as a tutorial for new programmers or as a quick reference for experienced programmers. As always, it is the programmer's responsibility to thoroughly test all programs.

Software Agreement and Disclaimer
(Next) (Previous) (Table-of-Contents)

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.

Permission to use, copy, modify and distribute this software for a 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.

SimoTime Enterprises makes no warranty or representations about the suitability of the software for any purpose. It is provided "AS IS" without any express 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.

Downloads and Links to Similar Pages of Interest
(Next) (Previous) (Table-of-Contents)

You may download this example at http://www.simotime.com/sim4dzip.htm#COBOLnondisplayZip as a Z-Pack. The Z-Packs provide individual programming examples, documentation and test data files in a single package. The Z-Packs are usually in zip format to reduce the amount of time to download. Please view the complete list of SimoTime Z-Pack Examples at http://www.simotime.com/sim4dzip.htm.

Note: You must be attached to the Internet to download a Z-Pack or view the list.

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.

Check out  The SQL Connection  for more examples of mainframe Relational Data Base management and accessing techniques with sample code.

Check out  The VSAM - QSAM Connection  for more examples of mainframe VSAM and QSAM accessing techniques and sample code.

This document provides a quick summary of the  File Status Key  for VSAM data sets and QSAM files.

Check out  The SimoTime Library  for a wide range of topics for Programmers, Project Managers and Software Developers.

To review all the information available on this site start at  The SimoTime Home Page .

Glossary of Terms
(Next) (Previous) (Table-of-Contents)

Check out  The SimoTime Glossary  for a list of terms and definitions used in the documents provided by SimoTime.

Comments or Suggestions
(Next) (Previous) (Table-of-Contents)

If you have any questions, suggestions or comments please call or send an e-mail to: helpdesk@simotime.com

About SimoTime Enterprises
[Next] [Previous] [Table-of-Contents]

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
Copyright © 1987-2010  SimoTime Enterprises  All Rights Reserved
When technology complements business
http://www.simotime.com