Engineering Data Support


Chapter 3. Batch programs

The batch programs supplied with CEDS are described in this chapter. The sample JCL to run these programs can be found on the TFG2000 Base Product tape.

Note: This chapter documents Diagnosis, Modification, and Tuning Information, which is provided to help the customer do diagnosis, modification, and tuning of CEDS

Warning!
Do not use this Diagnosis, Modification, and Tuning Information as a programming interface.

This chapter describes the following programs:
Program Description
EMTBBMWI Initializes BOMWORK database
EMTBBOM Unloads bill of material in PDI Format
EMTBEXIT Controls synchronization of accesses to CEDS interface files
FTPSECUR Ensures a CEDS interface or feedback data set can be allocated by the FTP

The information is presented in the following format:

Purpose
Briefly describes the program's use within CEDS and its relationship with a transaction or with other programs when the program is used as an external subroutine.

Reference data
Provides formal program reference material, such as:

Database access chart shows the database segments accessed by the program's PSBs and whether the access is for reference only or for updating. This chart lists the following:

Note: For more information on the database access chart, see Appendix A. "How to use the charts", of this manual.

Input control record chart
Shows the details of the input control records that are required for the batch programs. This chart lists the following:

Note: For more information on the input control record chart, see Appendix A. "How to use the charts", of this manual.

Output produced
Describes the output that results from the running of the program.

Report field/database field cross-reference chart
Describes the relationship between report field names and database field names for a program. This chart lists the following:

Note: For more information on the Report Field/Database Field Cross-Reference Chart, see Appendix A. "How to use the charts", of this manual.

Additional information
Provides additional descriptive comments to help you when reading the program source code. In general, these comments expand the explanation of the main functions supported and, in certain cases, describe processing techniques used.

Outline of program flow
Provides a high-level description of the logic used in the program, including the major procedure names and database calls used.


EMTBBMWI: Initialize BOMWORK database

Purpose

This program initially loads the BOMWORK database to create a control record with default values.

Reference data

PSB Name
EMTPBWE

Loaded Program
ENVTABLE

Database Access

Database Segment Segment Description Mode
EMTDB0E BOMWORK Bill of material work R/W

Outline of program flow

Main program flow


EMTBBOM: Unload bill of material in PDI format

Purpose

This program reads the Product Definition Database, then creates records for items and bills of material in the PDI format.

Reference data

PSB Name
EMTPBBx (x = environment)

Copybooks

DATEOS ENGCHGS ENVTABLE FIELDOS1
FUNCTINS ITEMIDS ITMDATS ITMTXTS
PCB1 PCB2 PCB3 PCB4
PROCERR PRODSTS STDATAS STDXIDS

Loaded Program
ENVTABLx (x = environment)

Database Access

Database Segment Segment Description Mode
PRDEFDB ITEMID Item identification R/O
PRDEFDB ITMDAT Item data R/O
PRDEFDB ITMTXT Item comments R/O
PRDEFDB ENGCHG Engineering change R/O
PRDEFDB PRODST Product structure R/O
DDXDT0E STDIX Text identification R/O
DDXDT0E STDATA Standard text data R/O

Output produced

The program creates a status report that reveals the success of the run and the number of items processed or unloaded.

Fields passed from TFG2000 to Product Data Interface (PDI)


Product Definition Database
EUOEB600 object
Segment
Field
Attribute name
ENGCHG
MECNC
ID
ENGCHG
MESEN
INIATOR
ENGCHG
MEDES
DESCRIPTION
ENGCHG
MEENG
DESIGN_ENGR
ENGCHG
MESTC
STATUS
ENGCHG
MEDAT
INIT_DATE
ENGCHG
MERSN
REASON

Product Definition Database
EUOEB700 object
Segment
Field
Attribute name
ENGCHG
MECNC
IL_EC_NUMBER
ITEMID
MITEM
IL_ITEM_NUMBER
ENGCHG
MEEFF
EFF_DATE

Product Definition Database
EUOSB211 object
Segment
Field
Attribute name
ENGCHG
MECNC
IL_EC_NUMBER
ITEMID
MITEM
IL_ITEM_NUMBER
ITEMID
MTYPN
ITEM_TYPE
ITEMID
MUTMS
UNIT_OF_MEASURE
ITEMID
MPDSC
DESCRIPTION

Product Definition Database
EUOSB291 object
Segment
Field
Attribute name
ENGCHG
MECNC
IL_EC_NUMBER
ITEMID
MITEM
IL_ITEM_NUMBER
MEDNO
MEDNO
IL_REFERENCE_ID

Product Definition Database
EUOSB271 object
Segment
Field
Attribute name
ENGCHG
MECNC
IL_EC_NUMBER
ITEMID
MITEM
IL_ITEM_NUMBER
ITMDAT
MWEIGHT
WEIGHT
ITMDAT
MWUM
IL_WEIGHT_UNIT
ITMDAT
MHEIGHT
HEIGHT
ITMDAT
MDUM
IL_HEIGHT_UNIT
ITMDAT
MLENGTH
LENGTH
ITMDAT
MDUM
IL_LENGTH_UNIT
ITMDAT
MBREAD
BREADTH
ITMDAT
MDUM
IL_BREADTH_UNIT
ITMDAT
MBREAD
DIAMETER
ITMDAT
MDUM
IL_DIAMETER_UNIT

Product Definition Database
EUOSB151 object
Segment
Field
Attribute name
ENGCHG
MECNC
IL_EC_NUMBER
ITEMID
MITEM
IL_ITEM_NUMBER
ITMTXT
PPCOMMT
IL_TEXT

Product Definition Database
EUOSB111 object
Segment
Field
Attribute name
ENGCHG
MECNC
IL_EC_NUMBER
ITEMID
MITEM
IL_ITEM_NUMBER

Product Definition Database
EUOSA121 object
Segment
Field
Attribute name
ENGCHG
MECNC
IL_EC_NUMBER
ITEMID
MITEM
IL_ITEM_NUMBER
PRODST
SPCOMP
IL_COMP_ITEM_NUMBER
PRODST
SPSUFFIX
IL_COMP_SEQ_NM
PRODST
SPQTY
MEASUR_OBJ
ITEMID
MTUMS
MEASUR_OBJ_UNIT
PRODST
SPCAT
FEATURE
PRODST
SPVAL
VARIANT
PRODST
SPACT
ACTION_CODE
PRODST
SPPHAN
MFG_PLANNING_CODE
ITEMID
MPDSC
DESCRIPTION
PRODST
SPSQNO
DISPLAY_SEQ_NUM
ITEMID
MYYPN
ITEM_TYPE
PRODST
SPRATE
USAGE_PROBABILITY

Outline of program flow

Main Program Flow
  1. Perform Initialization-Routine.
  2. Perform Create-Admin-Start-Routine.
  3. Perform Write-EREC-Routine.
  4. Perform Write-ERAI-Routine.
  5. Perform Write-Item-Objects-Routine.
  6. Perform Write-BOM-Objects-Routine.
  7. Perform Write-Promote-Objects-Routine.
  8. Perform Report-Processing-Routine.

Initialization-Routine
  1. Open PRINT datafile.
    • If unable to open PRINT datafile perform Error-Routine.
  2. Open PARAMETER file.
    • If unable to open PARAMETER file, perform Error-Routine.

      Else
       
      Perform Process-Parameter-Record.
  3. Load Environment Table.
  4. Open PDI datafile.
    • If unable to open PDI datafile perform Error-Routine.
  5. Open VSAM workfiles.
    • If unable to open VSAM workfiles perform Error-Routine.
  6. Load translate table from Standard Text database.

Process-Parameter-Record
  1. Read parameter record.
    • If unable to read parameter record perform Error-Routine.
  2. Process parameter information.

Create-Admin-Start-Routine
  1. Loop through all Items in Product Definition database.
    • Loop through all ENGCHG segments for this item.
      • Create a VSAM-1 workfile containing EC information with EC number.
  2. Create and write the Admin Header, Data Dictionary, and CIP objects.

Write-EREC-Routine.
  1. Loop through VSAM-1 file.
    • Create a VSAM-2 workfile containing all ECs with key of effectivity date and EC number.
    • Setup and write the EUOEB600 object.
  2. Create and write a dummy EUOEB600 object if none written.

Write-ERAI-Routine
  1. Loop through all Items in Product Definition database.
    • Loop through all ENGCHG segments of ITEMID.
      • Build a VSAM-3 file containing all ECs for this Item with key of effectivity date and EC sequence number.
    • Loop through all entries in VSAM-3.
      • Setup and write the EUOEB700 object.
    • Create and write a dummy EC EUOEB700 object if no ECs exist.

Write-Item-Objects-Routine
  1. Loop through all Items in Product Definition database.
    • Create and write the EUOSB211 object.
    • Create and write the EUOSB271 object.
    • Create and write the EUOSB291 object.
    • Create and write the EUOSB151 object, if ITMTXT exists.

Write-BOM-Objects-Routine
  1. Loop through all Items in Product Definition database.
    • Loop through all ENGCHG segments for this ITEMID.
      • Build a VSAM-3 file containing all ECs for this Item with key of effectivity date and EC sequence number.
    • Loop through all entries in VSAM-3.
      • Scan PRODST of ITEMID for match against this VSAM-3 entry.
      • If match
        Create and write the EUOSB111 object, if none written for this item.
        Create and write the EUOSA121 object.
    • Delete VSAM-3.

Write-Promote-Objects-Routine
  1. Create and write the Admin Header and Data Dictionary.
  2. Loop through all entries of VSAM-2.
    • Create and write the EUOSA001 object.

Error-Routine
  1. Obtain error message.
  2. Print message.
  3. Close any open files.
  4. Stop program processing.

Report-Processing-Routine
  1. Print summary information.
  2. Close any open files.
  3. Stop program processing.


EMTBEXIT: Control access to CEDS interface files

Purpose

This program controls the synchronization of accesses to CEDS interface files (EMTVMKx, EMTVEKx, EMTVDKx, EMTV1KE, and EMTV1EE). The program is called from batch program FTPSECUR upon open or close of a file. It establishes exclusive control over the CEDS interface files by placing a flag in the file EMTVIKE. The flag must be reset before other programs can access the file. In addition to controlling access to the files, the program also cleans up after the transmission of feedback data. The program deletes all records in the feedback files after the feedback data is transmitted.

Outline of program flow

Main program flow

100-EXTRACT-FILE-NAME

130-REPLACE-FILE-NAME

200-PROCESS

If CEDS file, then perform 210-PROCESS-ILOCK.

210-PROCESS-ILOCK

310-OPEN-FEEDBACK

320-READ-FEEDBACK

330-DELETE-FEEDBACK

340-CLOSE-FEEDBACK

 
If static PES feedback file, then close static PES file.

Else
 

 
If static PDI feedback file, then close static PDI file.

Else
 

 
If dynamic PES feedback file, then close dynamic PES file.

Else
 

 
If dynamic PDI feedback file, then close dynamic PDI file.

 
If not successful, then:

400-PROCESS-INTERLOCK

410-OPEN-INTERLOCK.

420-READ-WRITE-INTERLOCK

423-WRITE-INTERLOCK

430-CLOSE-INTERLOCK


FTPSECUR: Allocate interface or feedback data

Purpose

This program is a modified version of the FTPSECUR program provided by FTP. It was modified for CEDS users to ensure that CEDS interface or feedback data set can be allocated by FTP. It sets a flag in an interlock file by calling EMTBEXIT to prevent CEDS from accessing either interface or feedback files. It then attempts to open the file. If the program cannot open the file, the program waits up to 10 minutes for the file to become available. It then returns control to the FTP to send or receive the file. After sending the file, it resets the flag in the interlock file by calling EMTBEXIT to allow CEDS access to the feedback or interface files.

If you have an existing FTPSECUR program, the changes described above must be integrated into the existing FTPSECUR functions.

Note: This program is written in assembler language.

Reference data

Called to Programs
EMTBEXIT

Outline of program flow

Main program flow

Exit

OPEN FILE


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]