datacom l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Datacom PowerPoint Presentation
Download Presentation
Datacom

Loading in 2 Seconds...

play fullscreen
1 / 31

Datacom - PowerPoint PPT Presentation


  • 550 Views
  • Uploaded on

Datacom. An Introduction. What is Datacom?. Datacom is a Database Manager developed by Computer Associates for MVS Data is stored in the form of databases, which can have one or more keys Access is through ‘embedded” datacom calls in high level languages, or through dataquery. Datacom.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Datacom' - libitha


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
datacom

Datacom

An Introduction

what is datacom
What is Datacom?
  • Datacom is a Database Manager developed by Computer Associates for MVS
  • Data is stored in the form of databases, which can have one or more keys
  • Access is through ‘embedded” datacom calls in high level languages, or through dataquery
datacom3
Datacom
  • This is NOT a Relational Database Manager or even a sophisticated database manager
  • This is a filing system, for better organization of data
  • It has the basic features of a filing system - keys, indexes etc.
  • It has locking features, to prevent “lost updates”
  • It does not have features such as referential integrity
databases
Databases
  • Databases are known by a user name

E.g. FED-PROFILE

  • Internally, in the system, they are referred to by a 3 character id

E.g. F11

  • It is important to remember the 3-character ID - that is how datacom knows this database
database structure
Database structure
  • Each database consists of records (Rows)
  • Each Record has Fields (Columns)
  • One or more fields can combine in several ways to form several keys
  • There is no concept of a primary key or alternate keys - all keys are “on par”
datacom with cobol
Datacom with COBOL
  • The structure (definition) of the databases used must be declared in the program
  • This is done by a “COPYDD” statement, which “embeds” a COBOL declaration of the database structure
  • The embedded item may be a view, defined with a particular structure, and a key, for a specific purpose
copydd
COPYDD
  • The COPYDD statement looks like

01 A01A0 COPYDD COMPANY.A01A0(PROD),2,N.

  • The first item is the required level of the structure
  • The next item is the group name
    • If this is left blank, the default name is taken
  • Then next is the dataview to be used
  • A pattern can be given here, to prefix all elements

01 *R2- COPYDD FED-PROFILE.A13A0(PROD),2,N.

  • In this case, all elements will have a R2- prefix
passing values
Passing values
  • The next step is to fill up the desired values to the call interface
  • The interface consists of
    • User ID
    • Request area
    • The “embedded” structure
    • The element list
calling interface
Calling interface
  • The user id is either the ID of the User, or that of the program ID
    • These Ids need to be authorized by the database Admin, for accessing this database
  • The request area contains
    • The command name (Commands are in a later slide)
    • The name of the file - 3 characters
    • The name of the KEY used
    • The value(s) of the LOW key (mandatory), and High key (if applicable)
the db call
The DB Call
  • The database access call is in the form of the following command

CALL ‘DBNTRY’ USING USER-ID

F11-REQ-AREA

F11F0

F11-ELEMENT-LIST

declaration
Declaration

01 USER-ID.

05 PROGRAM-NAME PIC X(08) VALUE 'ICS3000 '.

05 FILLER PIC X(24) VALUE SPACES.

01 A20-REQ-AREA.

05 A20-REQ-COMMAND PIC X(05) VALUE SPACES.

05 A20-REQ-FILENAME PIC X(03) VALUE 'A20'.

05 A20-REQ-KEYNAME PIC X(05) VALUE SPACES.

05 A20-REQ-RETURNCD PIC X(02) VALUE SPACES.

05 A20-REQ-DBID PIC X(02) VALUE SPACES.

05 A20-REQ-REC-ID PIC X(07).

05 A20-REQ-KEY-VALUE PIC X(180).

declaration13
Declaration

01 A20-WORK-AREA.

05 A20-WORK-AREA-0 PIC X(274).

05 A20-WORK-AREA-6 PIC X(300).

01 A20-ELEMENT-LIST.

05 A20-ELM-1 PIC X(05) VALUE 'A20A0'.

05 FILLER PIC X(01).

05 A20-ELM-2 PIC X(05) VALUE 'A20A6'.

05 FILLER PIC X(01).

05 FILLER PIC X(05) VALUE SPACES.

declaration14
Declaration

01 A20A0-A20A6.

03 A20A0 COPYDD BRANCH.A20A0(PROD),2,N.

03 A20A6 COPYDD BRANCH.A20A6(PROD),2,N.

01 *BILL- COPYDD BRANCH.A20A0(PROD),2,N.

assigning values
Assigning values

MOVE WS-NEXT-KBRANCHCD TO A20-REQ-KEY-VALUE.

MOVE 'BRNCH’ TO A20-REQ-KEYNAME.

MOVE 'REDKY’ TO A20-REQ-COMMAND.

MOVE A20-REQ-AREA TO LKBO099-DB-REQ-AREA.

Here, the command name is “REDKY” - read key exact

The keyname used is BRNCH, and the value of the key comes from the WORKING-STORAGE variable

the db call16
The DB Call

CALL 'DBNTRY’ USING USER-ID

A20-REQ-AREA

A20-WORK-AREA

A20-ELEMENT-LIST.

Thus the data required for the DB call is filled up, and the database access is completed.

datacom commands
Datacom Commands

Command Description

ABEND Abnormal Termination Command

ADDIT Add Record

CLOSE Close User Requirements Table

CNTKR Count For Key Value Range

CNTKY Count For Equal Key Value

CNTTB Count For Table

COMIT Commit Transaction

datacom commands18
Datacom Commands

Command Description

DELET Delete Record

GETIT Retrieve Next Sequential Record

GETPS Get Next Physical Sequential Record

GSETL Set To Starting Key

GSETP Set Physical Sequential Record

INQIN Inquire CA

datacom commands19
Datacom Commands

Command Description

LOCBR Locate Backwards

LOCKG Locate Key Equal Or Higher

LOCKI Test For Logical Intersections Of Two

Keys

LOCKL Locate Key Equal Or Lower

LOCKR Locate a Record in a Specified Range

LOCKX Locate Key Exact

LOCKY Locate Key Equal Or Higher

datacom commands20
Datacom Commands

Command Description

LOCNE Locate Next Equal Key Value

LOCNK Locate Next Key

LOCNR Locate Next Record in Specified Range

LOCNX Locate Next

LOGCP Checkpoint the Task

LOGCR Log Checkpoint With Release

LOGDR Log Directed Read

LOGDW Log Directed Write

datacom commands21
Datacom Commands

Command Description

LOGIT Add Data To Log Area

LOGLB Read Back a LOGIT Record

LOGTB Back Out Transactions

NOOPS No Operation

OPEN Open User Requirements Table

datacom commands22
Datacom Commands

Command Description

REDBR/RDUBR Read Backwards

REDID/RDUID Read Record By Id

REDKG/RDUKG Read Record Greater Than /

EqualTo Key

REDKL/RDUKL Read Record Less Than /

Equal To Key

REDKR/RDUKR Read Record in a Specified

Range

datacom commands23
Datacom Commands

Command Description

REDKX/RDUKX Read Key Exact

REDKY/RDUKY Read Key Exact

REDLE/RDULE Read Located Entry

REDNE/RDUNE Read Next Equal Key Value

REDNK/RDUNK Read Record With the Next

Sequential Key Value

REDNR/RDUNR Read the Next Record in a

Specified Range

datacom commands24
Datacom Commands

Command Description

REDNX/RDUNX Read Next

RELES Release Record

RELFL Release Table

ROLBK Rollback Transaction

SELCN Continue Set Record Selection

SELFR Select Set And Return First

Record

SELNR Select Next Record

datacom commands25
Datacom Commands

Command Description

SELPR Release Set

SELSM Select Same Record

SELST Stop Set Record Selection

TEST Test Option Command

UPDAT Update Record

what is dataquery
What is Dataquery?
  • Dataquery is a query tool to access the contents of the databases directly
  • It uses a language called dataquery language (DQL)
  • Structured Query Language (SQL) is also supported.
dataquery28
Dataquery
  • Dataquery runs as an application under CICS
  • It has a menu-driven interface
  • It allows creating / modifying queries, viewing public queries etc.
  • It also allows query execution in batch, by setting up a JCL header and an environment
components
Components
  • The components of a query are
    • The VERB (FIND, ERASE etc.)
    • The Database / dataview name
    • The condition(s) (WHERE clause)
    • The columns to be included in the output, with column titles if required
    • The title for the overall query
query creation execution
Query creation / execution
  • You can create a new query / edit an existing query
  • The query editor will show up
  • You can enter the qurery data and press PF4 to save it
  • It you are editing an existing query, press PF9 to save it
  • PF3 is for execution, PF2 is EXIT
an example31
An Example

FIND AGY-DISB-MTHD-2 WHERE N-A-CODE-SFX = '3102'

PRINT YEAR N-A-CODE-SFX 'N&A' PROFILE-DISB 'PD'

TITLE “Agency Disbursement Methods”

This query has a database name, condition, fields to be printed, and headings for those fields.

There is also an overall title for the query results