ITEM File Inquiry
CICS, Access a VSAM Data Set
  Table of Contents  v-24.01.01 - it2inq01.htm 
  Introduction
  View an Item File Record
  Technical Details
  COBOL Program, Item File Inquiry
  BMS Member, Item File Inquiry
  Record Structure, a COBOL Copy File
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Contact or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

The transaction identifier (or Tran ID) for viewing the records in the Item Master File is "ITI1" and the program is "IT2INQ". This program will prompt a user for the item number. Once a item number is entered the program accesses the Item Master File (ITEMMAST) and displays the item information at the 3270 Terminal. If a item record is not found a message is displayed. A user may continue to enter item numbers or exit the program. The programs use command level CICS statements and display information to a 3270 terminal or terminal emulator. The programs run on an IBM Mainframe System with CICS or a Microsoft Windows System with Micro Focus Server for Mainframe Migration.

Table of Contents Previous Section Next Section View an Item File Record

After selecting the menu option or starting the transaction "ITI1" the following screen should be displayed. The cursor should be position at the first character for the "New Item #" field. When entering an item number it is not necessary to type the leading zeroes. For example, item number "000000000002" only requires "2 " followed by one space character (the program will remove any characters after the initial space character and right-adjust the field with leading zero-fill). Press the "Enter" key to retrieve and display the item information. The following screen shows the results after pressing the "Enter" key.

 IT2INQ1                 Data Files and VSAM Data Sets               2009/08/03 
 STOA                         Item Inquiry Option                   14:32:51:92

           New Item #: 000000000001

               Item #: 000000000001
          Description: Distributor Cap
      Unit of Measure: Each
                Price: 6.98               Cost: 3.29

      Quantity Onhand: 24        Allocated: 0         Available: 24


   Last Activity Date: 20111109   Time: 14334874   Token: 000




                     PF3=Menu                                           F12=Esc

If another item needs to be viewed simply position the cursor to the first position of the "New Item #" field and enter a new item number.

Note: PF3 will end this transaction and display the sub-Menu for "Data Files and VSAM Data Sets". PF12 will end this session and return to the CICS prompt screen.

Table of Contents Previous Section Next Section Technical Details

This section provides additional detail about the COBOL Programs, BMS Screens and Data Structures.

Table of Contents Previous Section Next Section COBOL Program, Item File Inquiry

The following (IT2INQ.cbl) is the COBOL source code for the "Inquiry" Program that accesses the Item Master File and displays record information to a 3270 device.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.  IT2INQ.
       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       *
      *****************************************************************
      *
      * MAINTENANCE
      * -----------
      * 1989/02/27 Simmons, Created program.
      * 1997/03/17 Simmons, Updated for SYSID.
      *
      *****************************************************************
       ENVIRONMENT DIVISION.

      *****************************************************************
       DATA DIVISION.
       WORKING-STORAGE SECTION.

       01  EOJ-MESSAGE          pic X(50)
           value '     - Enter Tran ID . . .        completed IT2INQ'.

       01  LGTH                 pic S9(4)   comp.
       01  WORK-RESP-CODE       pic 9(08)   comp.
       01  XCTL-RESP-CODE       pic 9(08)   comp.
       01  ITEM-KEY             pic X(12).
       01  MSG-LINES.
           03  MSG-DATA         pic X(38).
           03  filler           pic X(38)      value LOW-VALUES.

       01  PROGRAM-NAME         pic x(8)       value SPACES.

       01  WS-RESPONSE         pic S9(8) comp.
       01  WS-REASON-CODE      pic S9(8) comp.

       01  LOCAL-TRAN-ID        pic X(4)       value 'ITI1'.

       01  SYS-ID               pic X(4).

       01  WORK-DATE.
           05  WORK-DATE-CC     pic X(02).
           05  WORK-DATE-YY     pic 9(02).
           05  WORK-DATE-MM     pic X(02).
           05  WORK-DATE-DD     pic 9(02).
       01  WORK-TIME.
           05  WORK-TIME-HH     pic X(02).
           05  WORK-TIME-NN     pic X(02).
           05  WORK-TIME-SS     pic X(02).
           05  WORK-TIME-TT     pic X(02).

       01  Z-WORK-12            pic X(12)      value SPACES.
       01  IX-12                pic 9(3)       value 0.

       01  WORK-14-2-GROUP.
           05  WORK-14-2-VALUE  pic S9(14)V9(2) value 0.

       01  WORK-7-0-GROUP.
           05  WORK-7-0-VALUE   pic 9(7)        value 0.

       01  WORK-QTY-AVAILABLE   pic 9(7)        value 0.

       01  WORK-18              pic X(18)      value SPACES.
       01  W18-1                pic 9(3)       value 0.
       01  W18-2                pic 9(3)       value 0.
       01  SIG-DIG              pic X          value 'N'.
       01  DECIMAL-BYTE         pic X          value '.'.

       COPY IT2INQ1.
       COPY DFHBMSCA.
       COPY DFHAID.

       COPY ITEMCB01.

      *****************************************************************
       LINKAGE SECTION.
       01  DFHCOMMAREA.
           03  LS-ITEMNO         pic X(12).
           03  filler            pic X(200).

      *****************************************************************
       PROCEDURE DIVISION.
       FIRST-ROUTINE.

           EXEC CICS HANDLE CONDITION
                ERROR   (GEN-ERR)
                MAPFAIL (NO-MAP)
                NOTFND  (NO-REC)
                END-EXEC.

           EXEC CICS ASSIGN
                SYSID(SYS-ID)
                END-EXEC.

      *---------------------------------------------------------------*
      *    If Program Function Key 3 then End-Of-Job.
           if  EIBAID equal DFHPF3


               move 'MN1FMS  ' to PROGRAM-NAME
               perform TRANSFER-CONTROL
      *    Should never get to here


               EXEC CICS SEND
                    FROM   (EOJ-MESSAGE)
                    LENGTH (50)
                    ERASE
                    END-EXEC

               EXEC CICS SEND
                    CONTROL FREEKB
                    END-EXEC

               EXEC CICS RETURN
                    END-EXEC
           end-if.

      *---------------------------------------------------------------*
      *    If Program Function Key 12 then End-Of-Transaction.
           if  EIBAID equal DFHPF12
               EXEC CICS SEND
                    FROM   (EOJ-MESSAGE)
                    LENGTH (50)
                    ERASE
                    END-EXEC

               EXEC CICS SEND
                    CONTROL FREEKB
                    END-EXEC

               EXEC CICS RETURN
                    END-EXEC
           end-if.

      *---------------------------------------------------------------*
      *    If COMMAREA length of zero, do first time processing. In
      *    order to have a COMMAREA next time, we must create one now.
           if  EIBCALEN = ZERO
               perform BMS-HDR-1
               move
                'Please enter a 12 digit customer number and hit ENTER'
                 to SYSMSG1I
               perform SET-PROTECT-ATTRIBUTES
               EXEC CICS SEND
                    MAP    ('IT2INQ1')
                    MAPSET ('IT2INQ1')
                    FROM   (IT2INQ1I)
                    ERASE
                    END-EXEC
               move LOW-VALUES to IT2INQ1O
               EXEC CICS RETURN
                    TRANSID (LOCAL-TRAN-ID)
                    COMMAREA (IT2INQ1O)
                    LENGTH    (32)
                    END-EXEC
           end-if.
      *---------------------------------------------------------------*
      *    Test for the ENTER KEY
      *
           if  EIBAID is not equal to DFHENTER
               perform BMS-HDR-1
               move
              'I repeat enter a 12 digit item number and hit ENTER'
                        to SYSMSG1I
               perform SET-PROTECT-ATTRIBUTES
               EXEC CICS SEND
                    MAP    ('IT2INQ1')
                    MAPSET ('IT2INQ1')
                    ERASE
                    END-EXEC
               move LOW-VALUES to IT2INQ1O
               EXEC CICS RETURN
                    TRANSID (LOCAL-TRAN-ID)
                    COMMAREA (IT2INQ1O)
                    LENGTH    (32)
                    END-EXEC
           end-if.

      *---------------------------------------------------------------*
      *    Get data from Screen
      *
           EXEC CICS RECEIVE
                MAP    ('IT2INQ1')
                MAPSET ('IT2INQ1')
                RESP(WS-RESPONSE)
                RESP2(WS-REASON-CODE)
                END-EXEC.

           if  REQNUMBL > ZERO
               move REQNUMBI to Z-WORK-12
               perform Z-RIGHT-ADJUST-Z-WORK-12
               move Z-WORK-12 to REQNUMBI
               move REQNUMBI to LS-ITEMNO
           else
               move 'Please enter a 12 digit item number'
                 to MSG-LINES
               go to ERR-RTN
           end-if.

      *---------------------------------------------------------------*
      * Randomly read the VSAM Keyed-Sequential-Data-Set (KSDS).
      *
       READ-CUST.
           move LS-ITEMNO to ITEM-KEY.
           move 512       to LGTH.
           EXEC CICS read
                DATASET   ('ITEMMAST')
                INTO      (ITEM-RECORD)
                LENGTH    (LGTH)
                RIDFLD    (ITEM-KEY)
                KEYLENGTH (12)
                RESP      (WORK-RESP-CODE)
                END-EXEC.

      *---------------------------------------------------------------*
      *    If the read worked the data is moved to the screen
      *
           if  WORK-RESP-CODE = ZEROS
               move ITEM-NUMBER          to REQNUMBO
               move ITEM-NUMBER          to ITNUMBI
               move ITEM-DESCRIPTION     to ITDESCO
               move ITEM-UNIT-OF-MEASURE to ITUNITO
               add  ITEM-PRICE to ZERO giving WORK-14-2-VALUE
               perform SHIFT-LEFT-14-2
               move WORK-18      to ITPRCEO
               add  ITEM-COST  to ZERO giving WORK-14-2-VALUE
               perform SHIFT-LEFT-14-2
               move WORK-18              to ITCOSTO

               add  ITEM-QTY-ONHAND  to ZERO giving WORK-7-0-VALUE
               perform SHIFT-LEFT-7-0
               move WORK-18              to ITOHNDO

               add  ITEM-QTY-ALLOCATED  to ZERO giving WORK-7-0-VALUE
               perform SHIFT-LEFT-7-0
               move WORK-18              to ITALOCO

               if  ITEM-QTY-ONHAND > ITEM-QTY-ALLOCATED
                   compute WORK-QTY-AVAILABLE =
                           ITEM-QTY-ONHAND - ITEM-QTY-ALLOCATED
               else
                   move ZERO to WORK-QTY-AVAILABLE
               end-if
               add  WORK-QTY-AVAILABLE  to ZERO giving WORK-7-0-VALUE
               perform SHIFT-LEFT-7-0
               move WORK-18              to ITAVAIO

               move ITEM-LADATE          to ITLDATEO
               move ITEM-LATIME          to ITLTIMEO
               move ITEM-TOKEN           to ITTOKENO
               move LOW-VALUES           to SYSMSG1O
           else
               move SPACES               to REQNUMBO
                                            ITDESCO
                                            ITUNITO
                                            ITPRCEO
                                            ITCOSTO
                                            ITOHNDO
                                            ITALOCO
                                            ITAVAIO
                                            ITLDATEO
                                            ITLTIMEO
                                            ITTOKENO
                                            SYSMSG1O
                move LS-ITEMNO to MSG-LINES
                move '* Item number not found,please try again...'
                  to MSG-LINES(14:44)
                go to ERR-RTN
           end-if.

      *---------------------------------------------------------------*
      *    Provide a new COMMAREA and send data to screen
      *
           perform BMS-HDR-1
           move 'Enter another item number or hit F3 to EXIT'
             to MSG-LINES
           move MSG-LINES to SYSMSG1O.
           move -1 to REQNUMBL
           perform SET-PROTECT-ATTRIBUTES

           EXEC CICS SEND
                MAP ('IT2INQ1')
                MAPSET ('IT2INQ1')
                DATAONLY ERASEAUP
                END-EXEC.
           EXEC CICS RETURN
                TRANSID (LOCAL-TRAN-ID)
                COMMAREA (DFHCOMMAREA)
                LENGTH   (212)
                END-EXEC.

      *****************************************************************
       SHIFT-LEFT-7-0.
           move SPACES to WORK-18
           move 'N' to SIG-DIG
           add 1 to ZERO giving W18-1
           add 1 to ZERO giving W18-2
           perform 7 times
             if  WORK-7-0-GROUP(W18-1:1) not = ZERO
                 move 'Y' to SIG-DIG
             end-if
             if  W18-1 = 7
                 move 'Y' to SIG-DIG
             end-if
             if  SIG-DIG = 'Y'
                 move WORK-7-0-GROUP(W18-1:1) to WORK-18(W18-2:1)
                 add 1 to W18-2
             end-if
             add 1 to W18-1
           end-perform
           exit.

      *****************************************************************
       SHIFT-LEFT-14-2.
           move SPACES          to WORK-18
           move 'N' to SIG-DIG
           add 1 to ZERO giving W18-1
           add 1 to ZERO giving W18-2
           perform 16 times
             if  WORK-14-2-GROUP(W18-1:1) not = ZERO
                 move 'Y' to SIG-DIG
             end-if
             if  W18-1 = 15
                 move 'Y' to SIG-DIG
                 move DECIMAL-BYTE to WORK-18(W18-2:1)
                 add 1 to W18-2
             end-if
             if  SIG-DIG = 'Y'
                 move WORK-14-2-GROUP(W18-1:1) to WORK-18(W18-2:1)
                 add 1 to W18-2
             end-if
             add 1 to W18-1
           end-perform
           exit.

      *****************************************************************
       SET-PROTECT-ATTRIBUTES.
           move DFHPROTI to SYSPAGEA
                            SYSDATEA
                            SYS-IDA
                            SYSTIMEA
                            ITNUMBA
                            ITDESCA
                            ITUNITA
                            ITPRCEA
                            ITCOSTA
                            ITLDATEA
                            ITLTIMEA
                            ITTOKENA
                            SYSMSG1A
           exit.

      *****************************************************************
       BMS-HDR-1.
           move 'IT2INQ1 ' to SYSPAGEO
           move SYS-ID to SYS-IDO.
           perform Z-GET-DATE-AND-TIME
           exit.

      *****************************************************************
      * Exception routines
      *****************************************************************
       GEN-ERR.
           move 'Someone GOOFED, should not be here!' to MSG-LINES.
           move -1 to REQNUMBL.
           go to ERR-RTN.

      *---------------------------------------------------------------*
       NO-MAP.
           move 'Please enter item number' to MSG-LINES.
           go to ERR-RTN.

      *---------------------------------------------------------------*
       NO-REC.
           if EIBDS is equal to 'CUSTMAST'
              move 'Item not found' to SYSMSG1O
              move -1 to REQNUMBL
              move DFHBMBRY to REQNUMBL
           end-if.

      *---------------------------------------------------------------*
       ERR-RTN.
           perform BMS-HDR-1
           move MSG-LINES to SYSMSG1O.
      *    move DFHBMBRY  to SYSMSGA
           move -1 to REQNUMBL

           EXEC CICS SEND
                MAP    ('IT2INQ1')
                MAPSET ('IT2INQ1')
      *         DATAONLY
                CURSOR
                END-EXEC.
           EXEC CICS RETURN
                TRANSID (LOCAL-TRAN-ID)
                COMMAREA (DFHCOMMAREA)
                LENGTH   (212)
                END-EXEC.

      *****************************************************************
       TRANSFER-CONTROL.
           EXEC CICS XCTL
                PROGRAM(PROGRAM-NAME)
                RESP(XCTL-RESP-CODE)
                END-EXEC

           move 'Program not found, &&&&&&&&' to MSG-LINES.
           inspect MSG-LINES replacing first '&&&&&&&&'
                                          by PROGRAM-NAME
           move -1 to REQNUMBL.
           go to ERR-RTN.
      *    exit.

      *****************************************************************
      * Delete all characters to the right of the first space then
      * right-adjust with zero fill. This routine works with a single,
      * twelve character field and does not require a work area.
      *****************************************************************
       Z-RIGHT-ADJUST-Z-WORK-12.
           inspect Z-WORK-12
                   replacing CHARACTERS by ' ' after initial ' '
           perform until Z-WORK-12(12:1) not = SPACE
               if  Z-WORK-12(12:1) = SPACE
                   add 11 to ZERO giving IX-12
                   perform 11 times
                       move Z-WORK-12(IX-12:1) to Z-WORK-12(IX-12 + 1:1)
                       subtract 1 from IX-12
                   end-perform
                   move ZERO to Z-WORK-12(1:1)
               end-if
           end-perform
           exit.

      *****************************************************************
       Z-GET-DATE-AND-TIME.
           accept WORK-DATE from DATE YYYYMMDD
           accept WORK-TIME from TIME

           move 'ccyy/mm/dd'   to SYSDATEO
           move WORK-DATE(1:4) to SYSDATEO(1:4)
           move WORK-DATE(5:2) to SYSDATEO(6:2)
           move WORK-DATE(7:2) to SYSDATEO(9:2)

           move 'hh:mm:ss:dd'  to SYSTIMEO
           move WORK-TIME(1:2) to SYSTIMEO(1:2)
           move WORK-TIME(3:2) to SYSTIMEO(4:2)
           move WORK-TIME(5:2) to SYSTIMEO(7:2)
           move WORK-TIME(7:2) to SYSTIMEO(10:2)

           exit.


Table of Contents Previous Section Next Section BMS Member, Item File Inquiry

The following (IT2INQ1.bms) is the BMS source code for the "Inquiry" screen map that is used to display the Item Master Record to a 3270 device.

***********************************************************************
*        This BMS Member is provided by SimoTime Technologies         *
*            (C) Copyright 1987-2019 All Rights Reserved              *
*              Web Site URL:   http://www.simotime.com                *
*                    e-mail:   helpdesk@simotime.com                  *
***********************************************************************
IT2INQ1 DFHMSD CTRL=(FREEKB),                                          -
               EXTATT=YES,                                             -
               LANG=COBOL,                                             -
               MODE=INOUT,                                             -
               STORAGE=AUTO,                                           -
               TIOAPFX=YES,                                            -
               TYPE=&&SYSPARM
*
IT2INQ1 DFHMDI SIZE=(24,80)
*
SYSPAGE DFHMDF ATTRB=(ASKIP,FSET,NORM),                                -
               LENGTH=8,                                               -
               POS=(1,1),                                              -
               INITIAL='IT2INQ1 '
        DFHMDF LENGTH=0,                                               -
               POS=(1,10)
        DFHMDF ATTRB=(ASKIP,BRT),                                      -
               LENGTH=29,                                              -
               POS=(1,25),                                             -
               INITIAL='Data Files and VSAM Data Sets'
* UPDATE-MAP-DATE
SYSDATE DFHMDF ATTRB=(ASKIP,NORM),                                     -
               LENGTH=10,                                              -
               POS=(1,69)
SYS-ID  DFHMDF ATTRB=(ASKIP,BRT),                                      -
               LENGTH=4,                                               -
               POS=(2,1)
        DFHMDF ATTRB=(ASKIP,BRT),                                      -
               LENGTH=24,                                              -
               POS=(2,28),                                             -
               INITIAL='Item File Inquiry Option'
* UPDATE-MAP-TIME
SYSTIME DFHMDF ATTRB=(ASKIP,NORM),                                     -
               LENGTH=11,                                              -
               POS=(2,68)
* Get New Item Number
        DFHMDF ATTRB=(ASKIP,BRT),                                      -
               LENGTH=11,                                              -
               POS=(4,9),                                              -
               INITIAL='New Item #:'
REQNUMB DFHMDF ATTRB=(BRT,FSET,IC,UNPROT),                             -
               LENGTH=12,                                              -
               POS=(4,21)
        DFHMDF LENGTH=0,                                               -
               POS=(4,34)
* Display Old Item Number
        DFHMDF ATTRB=(ASKIP,NORM),                                     -
               LENGTH=7,                                               -
               POS=(6,13),                                             -
               INITIAL='Item #:'
ITNUMB  DFHMDF ATTRB=(ASKIP,BRT),                                      -
               LENGTH=12,                                              -
               POS=(6,21)
* Display Item Description
        DFHMDF ATTRB=(ASKIP,NORM),                                     -
               LENGTH=12,                                              -
               POS=(8,8),                                              -
               INITIAL='Description:'
ITDESC  DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=48,                                              -
               POS=(8,21)
* Display Unit of Measure
        DFHMDF ATTRB=(ASKIP,NORM),                                     -
               LENGTH=16,                                              -
               POS=(9,4),                                              -
               INITIAL='Unit of Measure:'
ITUNIT  DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=16,                                              -
               POS=(9,21)
* Display Price
        DFHMDF ATTRB=(ASKIP,NORM),                                     -
               LENGTH=6,                                               -
               POS=(10,14),                                            -
               INITIAL='Price:'
ITPRCE  DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=18,                                              -
               POS=(10,21)
* Display Cost
        DFHMDF ATTRB=(ASKIP,NORM),                                     -
               LENGTH=5,                                               -
               POS=(10,41),                                            -
               INITIAL='Cost:'
ITCOST  DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=18,                                              -
               POS=(10,47)
* Display Quantity Onhand
        DFHMDF ATTRB=(ASKIP,NORM),                                     -
               LENGTH=16,                                              -
               POS=(12,4),                                             -
               INITIAL='Quantity Onhand:'
ITOHND  DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=7,                                               -
               POS=(12,21)
* Display Quantity Allocated
        DFHMDF ATTRB=(ASKIP,NORM),                                     -
               LENGTH=10,                                              -
               POS=(12,32),                                            -
               INITIAL='Allocated:'
ITALOC  DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=7,                                               -
               POS=(12,43)
* Display Quantity Available
        DFHMDF ATTRB=(ASKIP,NORM),                                     -
               LENGTH=10,                                              -
               POS=(12,54),                                            -
               INITIAL='Available:'
ITAVAI  DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=7,                                               -
               POS=(12,65)
* Display Last Activity Information
        DFHMDF LENGTH=19,                                              -
               POS=(17,1),                                             -
               INITIAL='Last Activity Date:'
ITLDATE DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=10,                                              -
               POS=(17,21)
        DFHMDF LENGTH=5,                                               -
               POS=(17,33),                                            -
               INITIAL='Time:'
ITLTIME DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=11,                                              -
               POS=(17,39)
        DFHMDF LENGTH=6,                                               -
               POS=(17,52),                                            -
               INITIAL='Token:'
ITTOKEN DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=3,                                               -
               POS=(17,59)
* UPDATE-ERROR-MESSAGE
SYSMSG1 DFHMDF ATTRB=(BRT,PROT),                                       -
               LENGTH=78,                                              -
               POS=(21,1)
        DFHMDF LENGTH=59,                                              -
               POS=(23,20),                                            -
               INITIAL='PF3=Menu                                       -
                   PF12=Esc'
        DFHMSD TYPE=FINAL
        END

Table of Contents Previous Section Next Section Record Structure, a COBOL Copy File

The following (ITEMCB01.cpy) is the source code for the COBOL Copy File that defines the record structure for the Item Master File.

      *****************************************************************
      *               ITEMCB01.CPY - a COBOL Copy File                *
      *        An Item Master File used by the Demo programs.         *
      * This is a VSAM Keyed-Sequential-Data-Set or Key-Indexed File. *
      *         Copyright (C) 1987-2019 SimoTime Technologies         *
      *                     All Rights Reserved                       *
      *              Provided by SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
      *
       01  ITEM-RECORD.
           05  ITEM-NUMBER              PIC 9(12).                      COL-A
           05  ITEM-DATA.
               10  ITEM-DESCRIPTION     PIC X(48).                      COL-B
               10  ITEM-QTY-ONHAND      PIC 9(7)            COMP.       COL-C
               10  ITEM-QTY-ALLOCATED   PIC 9(7)            COMP.       COL-D
               10  ITEM-UNIT-OF-MEASURE PIC X(16).                      COL-E
               10  ITEM-COST            PIC S9(7)V9(2)      COMP-3.     COL-F
               10  ITEM-PRICE           PIC S9(7)V9(2)      COMP-3.     COL-G
               10  ITEM-LADATE          PIC X(8).                       COL-H
               10  ITEM-LATIME          PIC X(8).                       COL-I
               10  ITEM-TOKEN           PIC X(3).
               10  ITEM-DISCOUNT        OCCURS 3 TIMES.
                   15  ITEM-D-CODE      PIC X.
                   15  ITEM-D-PERCENT   PIC S9(3)V9(4).
               10  FILLER               PIC X(375).
      *
      ***  ITEMCB01 - End-of-Copy File - - - - - - - - - - - ITEMCB01 *
      *****************************************************************
      *

Table of Contents Previous Section Next Section Summary

The purpose of this suite of program is to provide examples that use command level CICS in COBOL programs to access VSAM, Key-Sequenced-Data-Sets (KSDS) and display the information using standard BMS screen definitions to a 3270 terminal or terminal emulator. This document may be used as a tutorial for new programmers or as a quick reference for experienced programmers.

In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.

SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the  Contact or Feedback  section of this document.

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 CICS Connection for more examples of mainframe CICS coding techniques and sample code.

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 An Enterprise System Model that describes and demonstrates how Applications that were running on a Mainframe System and non-relational data that was located on the Mainframe System were copied and deployed in a Microsoft Windows environment with Micro Focus Enterprise Server.

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 Contact 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
Item Master, Record Inquiry, Access to a VSAM Data Set using CICS
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com