Convert Digits to Text
SimoTXTN - The COBOL Source Code
  Table of Contents  v-16.01.01 - simotxtn.htm 
  Introduction
  What it Does
  How to Use
  The COBOL Source Code
  The COBOL Copy File
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Comments or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

This document provides information about the SimoTXTN routine that converts a numeric value (or digits) to a text string of words. Additional information about this program may be obtained by sending an e-mail to:
helpdesk@simotime.com


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-2024
SimoTime Technologies and Services
All Rights Reserved

Table of Contents Previous Section Next Section What it Does

The SimoTXTN routine (or callable program) will convert the digits in a text string to words in a new text string. For example, the numeric value of 000123 will be converted to a text string of "One-hundred-twenty-three"

Table of Contents Previous Section Next Section How to Use

The following is an example of how to convert a numeric value into a text string using a US currency format.

           move 'DECIMAL2'         to TXN-PASS-REQUEST
           move '000000001898'     to TXN-PASS-DIGITS-R
           move '-'                to TXN-PASS-TXT-DELIMITER
           move 'Dollars         ' to TXN-PASS-TXT-SUFFIX
           move '$'                to TXN-PASS-NUM-SYMBOL
           call 'SIMOTXTN'      using TXN-PASS-AREA
           move TXN-PASS-TXT to MESSAGE-TEXT

In the preceding example the contents of TXN-PASS-TXT will be " Eighteen-and-98/100-Dollars " upon return from the call to SIMOTXTN.

A copy file is provided to define the pass area to be used when calling SimoTXTN. The following statement is required in the WORKING STORAGE section of the calling program.

       COPY PASSTXTN.

Note: The content of the copy file is shown in a later section of this document.

Table of Contents Previous Section Next Section The COBOL Source Code

The following (SIMOTXTN.cbl) is the COBOL Source Code.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    SIMOTXTN.
       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 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    *
      * Technologies.                                                 *
      *                                                               *
      * Permission to use, copy, modify and distribute this software  *
      * for any commercial 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: SIMOTXTN.CBL
      * Copy Files:    PASSTXTN.CPY
      *****************************************************************
      *
      * SIMOTXTN - A called routine for digit to text conversions.
      *
      * CALLING PROTOCOL
      * ----------------
      * Use standard COBOL calling procedures.
      *
      * DESCRIPTION
      * -----------
      * This program will do Digits to Text conversions.
      *
      ****************************************************************
      *
      * MAINTENANCE
      * -----------
      * 1989/02/27 Simmons, Created program.
      * 1989/02/27 Simmons, no changes to date
      *
      *****************************************************************
      *
       DATA DIVISION.
       WORKING-STORAGE SECTION.
      *
      *****************************************************************
      *    Data-structure for Title and Copyright...
      *****************************************************************
       01  SIM-TITLE.
           05  T1 pic X(11) value '* SIMOTXTN '.
           05  T2 pic X(34) value 'Convert Digits to a Text String   '.
           05  T3 pic X(10) value ' v06.03.03'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* SIMOTXTN '.
           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  FIRST-TIME              pic X       value 'Y'.

       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER      pic X(11)   value '* SIMOTXTN '.
           05  MESSAGE-TEXT        pic X(68).

       01  WORK-DIGITS-A.
           05  WORK-DIGITS-A1      pic X(3).
           05  WORK-DIGITS-A2      pic X(3).
           05  WORK-DIGITS-A3      pic X(3).
           05  WORK-DIGITS-A4      pic X(3).
       01  WORK-DIGITS-N           redefines WORK-DIGITS-A
                                   pic 9(12).

       01  WORK-DECIMAL-2A.
           05  WORK-DECIMAL-N1     pic 9(10).
           05  WORK-DECIMAL-N2     pic 9(2).

       01  TEXT-FOR-CENTS.
           05  filler              pic X(4)    value 'and-'.
           05  TEXT-CENT-AMOUNT    pic 9(2)    value 0.
           05  filler              pic X(5)    value '/100-'.
       01  TEXT-FOR-CENTS-A1       redefines TEXT-FOR-CENTS
                                   pic X(11).

       01  WORK-01                 pic X.
       01  WORK-03                 pic X(3).
       01  WORK-10                 pic X(10).
       01  I-X1                    pic 9(3)    value 0.
       01  I-X2                    pic 9(3)    value 0.
       01  DIGITS-FLAG             pic X       value 'N'.

       01  EDIT-WORD-0 pic X(17)   value '$@@@,@@@,@@@,@@@ '.
       01  EDIT-WORD-2 pic X(17)   value '$@,@@@,@@@,@@@.@@'.

      *****************************************************************
       LINKAGE SECTION.
       COPY PASSTXTN.

      *****************************************************************
       PROCEDURE DIVISION using TXN-PASS-AREA.

           if  FIRST-TIME not = 'N'
               perform Z-POST-COPYRIGHT
               move 'N' to FIRST-TIME
           end-if

           initialize TXN-PASS-RESULT
           initialize TXN-PASS-TXT-LENGTH
           move SPACES to TXN-PASS-TXT
           move SPACES to WORK-DIGITS-A
           move TXN-PASS-NUM-SYMBOL to EDIT-WORD-0(1:1)
           move TXN-PASS-NUM-SYMBOL to EDIT-WORD-2(1:1)
           perform EDIT-TXN-PASS-DIGITS

           evaluate TXN-PASS-REQUEST
               when 'DECIMAL0' perform CREATE-TEXT-FOR-ZERO-DECIMALS
               when 'DECIMAL2' perform CREATE-TEXT-FOR-TWO-DECIMALS
               when OTHER      perform Z-POST-INVALID-REQUEST
           end-evaluate

           add TXN-PASS-RESULT to ZERO giving RETURN-CODE
           GOBACK.

      *****************************************************************
       CREATE-TEXT-FOR-TWO-DECIMALS.
      *
      *    Validate the input string contains all digits...
      *
           perform VALIDATE-DIGITS-OR-ABEND
           move TXN-PASS-NUM-RIGHT-ADJUST to WORK-DECIMAL-2A
           add WORK-DECIMAL-N1 to ZERO giving WORK-DIGITS-N
           add WORK-DECIMAL-N2 to ZERO giving TEXT-CENT-AMOUNT
           perform CREATE-TEXT-02
           perform CREATE-LEFT-EDIT-2
           exit.

       CREATE-LEFT-EDIT-0.
           move TXN-PASS-NUM-RIGHT-ADJUST
             to TXN-PASS-NUM-LEFT-EDITED
           exit.

       CREATE-LEFT-EDIT-2.
           move EDIT-WORD-2 to TXN-PASS-NUM-LEFT-EDITED
           move TXN-PASS-NUM-SYMBOL to TXN-PASS-NUM-LEFT-EDITED(1:1)
           add 12 to ZERO giving I-X1
           add 17 to ZERO giving I-X2
           move TXN-PASS-NUM-RIGHT-ADJUST to WORK-DIGITS-A
           perform until I-X1 = 0
                      or I-X2 = 1
               if  TXN-PASS-NUM-LEFT-EDITED(I-X2:1) = '@'
                   move WORK-DIGITS-A(I-X1:1)
                     to TXN-PASS-NUM-LEFT-EDITED(I-X2:1)
                   subtract 1 from I-X1
                   subtract 1 from I-X2
               else
                   subtract 1 from I-X2
               end-if
           end-perform
           move 'N' to DIGITS-FLAG
           add 1 to ZERO giving I-X1
           perform until DIGITS-FLAG = 'Y'
               if  TXN-PASS-NUM-LEFT-EDITED(I-X1:1) = '0'
               or  TXN-PASS-NUM-LEFT-EDITED(I-X1:1) =
                   EDIT-WORD-2(I-X1:1)
                   add 1 to I-X1
               else
                   move 'Y' to DIGITS-FLAG
               end-if
               if  I-X1 > 13
                   move 'Y' to DIGITS-FLAG
               end-if
           end-perform

           if  I-X1 > 1
               subtract 1 from I-X1
               perform until I-X1 < 2
                   add 2 to ZERO giving I-X2
                   perform 15 times
                       move TXN-PASS-NUM-LEFT-EDITED(I-X2 + 1:1)
                         to TXN-PASS-NUM-LEFT-EDITED(I-X2:1)
                       add 1 to I-X2
                   end-perform
                   subtract 1 from I-X1
                   move SPACE to TXN-PASS-NUM-LEFT-EDITED(17:1)
               end-perform
           end-if
           exit.

      *****************************************************************
       CREATE-TEXT-FOR-ZERO-DECIMALS.
      *
      *    Validate the input string contains all digits...
      *
           perform VALIDATE-DIGITS-OR-ABEND
           add TXN-PASS-NUM-RIGHT-ADJUST to ZERO giving WORK-DIGITS-N
           perform CREATE-TEXT-02
           perform CREATE-LEFT-EDIT-0
           exit.

      *****************************************************************
       CREATE-TEXT-02.
      *
      *    Process a Zero value...
           if  TXN-PASS-NUM-RIGHT-ADJUST = 0
               if  TXN-PASS-REQUEST = 'DECIMAL2'
                   if  TXN-PASS-TXT-SUFFIX = SPACES
                       move 'Zero-and-00/100' to TXN-PASS-TXT
                       perform CREATE-TEXT-CALCULATE-LENGTH
                   else
                       move 'Zero-and-00/100-' to TXN-PASS-TXT
                       inspect TXN-PASS-TXT
                       replacing FIRST '                '
                       by TXN-PASS-TXT-SUFFIX
                       perform CREATE-TEXT-CALCULATE-LENGTH
                   end-if
               else
                   move 'Zero' to TXN-PASS-TXT
                   add 4 to ZERO giving TXN-PASS-TXT-LENGTH
               end-if
               move SPACES     to TXN-PASS-NUM-LEFT-EDITED
               move '$0.00***' to TXN-PASS-NUM-LEFT-EDITED(1:8)
               GOBACK
           end-if
      *
      *    Process when two-decimal positions and the value to the
      *    left of the decimal position is zero...
           if  WORK-DIGITS-N = 0
               move 'Zero-' to TXN-PASS-TXT
           end-if
      *
      *    Process the first group of three digits...
           if  WORK-DIGITS-A1 not = '000'
               move WORK-DIGITS-A1 to WORK-03
               perform CREATE-TEXT-THREE-DIGIT-GROUP
               inspect TXN-PASS-TXT
               replacing FIRST '        '   by 'Billion-'
           end-if
      *
      *    Process the second group of three digits...
           if  WORK-DIGITS-A2 not = '000'
               move WORK-DIGITS-A2 to WORK-03
               perform CREATE-TEXT-THREE-DIGIT-GROUP
               inspect TXN-PASS-TXT
               replacing FIRST '        '   by 'Million-'
           end-if
      *
      *    Process the third group of three digits...
           if  WORK-DIGITS-A3 not = '000'
               move WORK-DIGITS-A3 to WORK-03
               perform CREATE-TEXT-THREE-DIGIT-GROUP
               inspect TXN-PASS-TXT
               replacing FIRST '         '   by 'Thousand-'
           end-if
      *
      *    Process the fourth group of three digits...
           if  WORK-DIGITS-A4 not = '000'
               move WORK-DIGITS-A4 to WORK-03
               perform CREATE-TEXT-THREE-DIGIT-GROUP
           end-if
      *
      *    Add suffix info for two decimal positions...
           if  TXN-PASS-REQUEST = 'DECIMAL2'
               inspect TXN-PASS-TXT
               replacing FIRST '           ' by TEXT-FOR-CENTS-A1
           end-if
      *
      *    Add suffix to text string...
           inspect TXN-PASS-TXT
           replacing FIRST '                ' by TXN-PASS-TXT-SUFFIX
      *
      *    Remove trailing hyphen...
           inspect TXN-PASS-TXT replacing FIRST '- '   by '  '
      *
      *    Calculate the length of the text within the text string...
           perform CREATE-TEXT-CALCULATE-LENGTH
      *
      *    Replace word delimiter with user defined character...
           if  TXN-PASS-TXT-DELIMITER not = '-'
               inspect TXN-PASS-TXT
               replacing all '-' by TXN-PASS-TXT-DELIMITER
           end-if
           exit.

      *****************************************************************
       CREATE-TEXT-CALCULATE-LENGTH.
           add 1 to ZERO giving TXN-PASS-TXT-LENGTH
           perform until TXN-PASS-TXT-LENGTH = 150
                      or TXN-PASS-TXT(TXN-PASS-TXT-LENGTH:1) = SPACE
               add 1 to TXN-PASS-TXT-LENGTH
           end-perform
           subtract 1 from TXN-PASS-TXT-LENGTH
           exit.

      *****************************************************************
       CREATE-TEXT-THREE-DIGIT-GROUP.
           move SPACES to WORK-10
           move WORK-03(1:1) to WORK-01
           perform CREATE-TEXT-ONE-THRU-NINE
           if  WORK-10 not = SPACES
               inspect TXN-PASS-TXT
               replacing FIRST '          ' by WORK-10
               inspect TXN-PASS-TXT
               replacing FIRST '        '   by 'Hundred-'
           end-if

           if  WORK-03(2:1) = '1'
               perform CREATE-TEXT-FOR-TEEN
           else
               perform CREATE-TEXT-FOR-NON-TEEN
           end-if
           exit.

      *****************************************************************
       CREATE-TEXT-FOR-TEEN.
           move SPACES to WORK-10
           evaluate WORK-03(3:1)
               when '0' move 'Ten-      ' to WORK-10
               when '1' move 'Eleven-   ' to WORK-10
               when '2' move 'Twelve-   ' to WORK-10
               when '3' move 'Thirteen- ' to WORK-10
               when '4' move 'Fourteen- ' to WORK-10
               when '5' move 'Fifteen-  ' to WORK-10
               when '6' move 'Sixteen-  ' to WORK-10
               when '7' move 'Seventeen-' to WORK-10
               when '8' move 'Eighteen- ' to WORK-10
               when '9' move 'Nineteen- ' to WORK-10
           end-evaluate
           if  WORK-10 not = SPACES
               inspect TXN-PASS-TXT
               replacing FIRST '          ' by WORK-10
           end-if
           exit.

      *****************************************************************
       CREATE-TEXT-FOR-NON-TEEN.
           move SPACES to WORK-10
           evaluate WORK-03(2:1)
               when '2' move 'Twenty-   ' to WORK-10
               when '3' move 'Thirty-   ' to WORK-10
               when '4' move 'Forty-    ' to WORK-10
               when '5' move 'Fifty-    ' to WORK-10
               when '6' move 'Sixty-    ' to WORK-10
               when '7' move 'Seventy-  ' to WORK-10
               when '8' move 'Eighty-   ' to WORK-10
               when '9' move 'Ninety-   ' to WORK-10
           end-evaluate
           if  WORK-10 not = SPACES
               inspect TXN-PASS-TXT
               replacing FIRST '          ' by WORK-10
           end-if

           move SPACES to WORK-10
           move WORK-03(3:1) to WORK-01
           perform CREATE-TEXT-ONE-THRU-NINE
           if  WORK-10 not = SPACES
               inspect TXN-PASS-TXT
               replacing FIRST '          ' by WORK-10
           end-if
           exit.

      *****************************************************************
       CREATE-TEXT-ONE-THRU-NINE.
           evaluate WORK-01
               when '1' move 'One-      ' to WORK-10
               when '2' move 'Two-      ' to WORK-10
               when '3' move 'Three-    ' to WORK-10
               when '4' move 'Four-     ' to WORK-10
               when '5' move 'Five-     ' to WORK-10
               when '6' move 'Six-      ' to WORK-10
               when '7' move 'Seven-    ' to WORK-10
               when '8' move 'Eight-    ' to WORK-10
               when '9' move 'Nine-     ' to WORK-10
           end-evaluate

           exit.

      *****************************************************************
      *    Scan the input digets and create right-adjusted, numeric...
      *****************************************************************
       EDIT-TXN-PASS-DIGITS.
           add 1 to ZERO giving I-X1
           add 1 to ZERO giving I-X2
           move SPACES to WORK-DIGITS-A
           perform until I-X1 > 12
             if TXN-PASS-DIGITS-R(I-X1:1) = ','
             or TXN-PASS-DIGITS-R(I-X1:1) = '.'
                add 1 to I-X1
             else
                move TXN-PASS-DIGITS-R(I-X1:1) to WORK-DIGITS-A(I-X2:1)
                add 1 to I-X1
                add 1 to I-X2
             end-if
           end-perform
           if  WORK-DIGITS-A(12:1) = SPACE
               perform until WORK-DIGITS-A(12:1) not = SPACE
                   add 11 to ZERO giving I-X1
                   add 12 to ZERO giving I-X2
                   perform 11 times
                       move WORK-DIGITS-A(I-X1:1)
                         to WORK-DIGITS-A(I-X2:1)
                       subtract 1 from I-X1
                       subtract 1 from I-X2
                   end-perform
                   move '0' to WORK-DIGITS-A(1:1)
               end-perform
           end-if
           move WORK-DIGITS-A to TXN-PASS-NUM-RIGHT-ADJUST
           exit.

      *****************************************************************
      *    Validate that input string is all digits, if not ABEND...
      *****************************************************************
       VALIDATE-DIGITS-OR-ABEND.
           add 1 to ZERO giving I-X1
           perform 12 times
               if  TXN-PASS-NUM-RIGHT-ADJUST(I-X1:1) > 0
               and TXN-PASS-NUM-RIGHT-ADJUST(I-X1:1) < 9
               or  TXN-PASS-NUM-RIGHT-ADJUST(I-X1:1) = 0
               or  TXN-PASS-NUM-RIGHT-ADJUST(I-X1:1) = 9
                   add 1 to I-X1
               else
                   perform Z-POST-NOT-ALL-DIGITS
               end-if
           end-perform
           exit.

      *****************************************************************
      * The following Z-Routines perform administrative tasks
      *****************************************************************
       Z-POST-COPYRIGHT.
           display SIM-TITLE      upon console
           display SIM-COPYRIGHT  upon console
           exit.

      *****************************************************************
       Z-POST-INVALID-REQUEST.
           move 'INVALID REQUEST - ' to MESSAGE-TEXT
           move TXN-PASS-REQUEST     to MESSAGE-TEXT(19:8)
           perform Z-POST-MESSAGE
           add 16 to ZERO giving TXN-PASS-RESULT
           exit.

      *****************************************************************
       Z-POST-MESSAGE.
           display MESSAGE-BUFFER upon console
           move SPACES to MESSAGE-TEXT
           exit.

      *****************************************************************
       Z-POST-NOT-ALL-DIGITS.
           move 'Not all DIGITS - ' to MESSAGE-TEXT
           move TXN-PASS-DIGITS-R   to MESSAGE-TEXT(18:12)
           perform Z-POST-MESSAGE
           add 16 to ZERO giving TXN-PASS-RESULT
           move SPACES to TXN-PASS-TXT
           move 'ERROR, VOID this item...' to TXN-PASS-TXT
           GOBACK.

      *****************************************************************
      *      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       *
      *****************************************************************

Table of Contents Previous Section Next Section The COBOL Copy File

The following source member (PASSTXTN.cpy) is the COBOL copy file that is used to define the structure of the pass area when calling SIMOTXTN.

      *****************************************************************
      *     Data Structure or Pass Area used for calling SIMOTXTN.    *
      *****************************************************************
      *         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       *
      *****************************************************************
      *
      * The following is a summary of the fields used as linkage items.
      *
      * TXN-PASS-REQUEST       This is an eight character data string
      *                        and should contain one of the following
      *                        in upper case.
      *                        DECIMAL0 - The numeric data string has
      *                                   zero decimal positions.
      *                        DECIMAL2 - The numeric data string has
      *                                   two decimal positions.
      * TXN-PASS-RESULT        Zero       Request was successful
      *                        non-Zero   Request was invalid or failed
      * TXN-PASS-DIGITS        Numeric field provided by caller
      * TXN-PASS-TXT-DELIMITER Character used between words in text
      * TXN-PASS-TXT-SUFFIX    A word that is appended to text string
      * TXN-PASS-TXT-LENGTH    Length of text within text field
      * TXN-PASS-TXT           Text string created by conversion
      * TXN-PASS-NUM-SYMBOL    Character used to insert in front
      *                        of the edited numeric amount string.
      * TXN-PASS-NUM-LEFT-EDITED  The numeric field edited for decimal,
      *                           comma and currency symbol.
      * TXN-PASS-NUM-RIGHT-ADJUST The numeric field right adjusted.
      *
      *****************************************************************
       01  TXN-PASS-AREA.
      *    Control Information provided by calling program,
      *    the TXN-PASS-RESULT field may be modified by SimoTXTN.
           05  TXN-PASS-REQUEST            PIC X(8).
           05  TXN-PASS-RESULT             PIC 9(4).
           05  TXN-PASS-DIGITS             PIC 9(12).
           05  TXN-PASS-DIGITS-R           redefines TXN-PASS-DIGITS
                                           PIC X(12).
      *    Textual specifications supplied by calling program.
           05  TXN-PASS-TXT-DELIMITER      PIC X.
           05  TXN-PASS-TXT-SUFFIX         PIC X(16).
      *    Textual length and word string supplied by SimoTXTN routine.
           05  TXN-PASS-TXT-LENGTH         PIC 9(3).
           05  TXN-PASS-TXT                PIC X(150).
      *    Numeric editing currency symbol supplied by calling program.
           05  TXN-PASS-NUM-SYMBOL         PIC X.
      *    Left-justified with currency, commas, and decimal point,
      *    supplied by SimoTXTN routine.
           05  TXN-PASS-NUM-LEFT-EDITED    PIC X(17).
      *    Right-justified numeric value supplied by SimoTXTN.
           05  TXN-PASS-NUM-RIGHT-ADJUST   PIC 9(12).
      ***  PASSTXTN - End-of-Copy File - - - - - - - - - - - PASSTXTN *
      *****************************************************************
      *

Table of Contents Previous Section Next Section Summary

This document provides information about the SimoTXTN routine that converts a numeric value (or digits) to a text string of words. This document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers.

In the world of programming there are many ways to solve a problem. This 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, Comment or Feedback  section of this document.

Table of Contents Previous Section Next Section Software Agreement and Disclaimer

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.

SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

Table of Contents Previous Section Next Section Downloads and Links

This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.

Note: A SimoTime License is required for the items to be made available on a local system or server.

Table of Contents Previous Section Next Section Current Server or Internet Access

The following links may be to the current server or to the Internet.

Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the Link to Internet 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 Link to Server icon.

Link to Internet   Link to Server   Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.

Link to Internet   Link to Server   Explore a complete list of the SimoTime Callable Routines or Utility Programs. This includes the callable routines and utility programs for the Micro Focus environment.

Link to Internet   Link to 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.

Link to Internet   Link to Server   Explore The File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files.

Table of Contents Previous Section Next Section Internet Access Required

The following links will require an internet connect.

This suite of programs and documentation is available to download for review and evaluation purposes. Other uses will require a SimoTime Software License. Link to an Evaluation zPAK Option that includes the program members, documentation and control files.

A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection

Explore The Micro Focus Web Site for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection.

Table of Contents Previous Section Next Section Glossary of Terms

Link to Internet   Link to Server   Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.

Table of Contents Previous Section Next Section Comments or Feedback

This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.

1. Send an e-mail to our helpdesk.
1.1. helpdesk@simotime.com.
2. Our telephone numbers are as follows.
2.1. 1 415 763-9430 office-helpdesk
2.2. 1 415 827-7045 mobile

 

We appreciate hearing from you.

Table of Contents Previous Section Next Section Company Overview

SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.

Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.

Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.

Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com


Return-to-Top
Digits to Text Conversion using COBOL
Copyright © 1987-2024
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com