COBOL Data Manipulation Language (DML) Statements

CA IDMS data manipulation language (DML) consists of statements that enable you to access the database management system (DBMS) and to request Logical Record Facility (LRF) and DC system services. The following table lists the DML statements by function.
idmscu
CA IDMS data manipulation language (DML) consists of statements that enable you to access the database management system (DBMS) and to request Logical Record Facility (LRF) and DC system services. The following table lists the DML statements by function.
 Consider the following items:
  • All DML operands are positional
  • (o) applies to online environment
  • (dcb) applies to DC-BATCH
  • (o,dcb) applies to online environment or DC-BATCH
DML Function
Description
Statements
Accept
Move special information such as database keys, storage addresses, and statistics from the DBMS to program variable storage.
  • ACCEPT DB-KEY FROM CURRENCY
    Saves the db-key of the current record of run unit, record type, set, or area.
  • ACCEPT DB-KEY RELATIVE TO CURRENCY
    Saves the db-key of the next, prior, or owner record relative to the current record of a set.
  • ACCEPT IDMS STATISTICS
    Returns system run-time statistics to the program.
  • ACCEPT BIND RECORD
    Returns the bind address of a record to the program.
  • ACCEPT PROCEDURE
    Returns information from the application program information block associated with a database procedure to the program
Control
  • Initiate and terminate processing.
  • Effect recovery.
  • Prevent concurrent retrieval and update of database records.
  • Evaluate set conditions.
  • BIND RUN-UNIT
    Signs on the application program to the DBMS.
  • BIND TASK
    Establishes a connection with the DC/UCF system from a batch program. Also allows certain online functions, such as writing to queues or printing to a printer controlled by the DC/UCF system (dcb).
  • BIND RECORD
    Establishes addressability in variable storage for one or more records that are included in the program subschema.
  • BIND PROCEDURE
    Establishes communication between the application program and a DBA-defined database procedure.
  • READY
    Prepares database areas for processing.
  • FINISH
    Commits changes that were made to the database through an individual run unit or through all database sessions that are associated with a task.
  • IF
    Evaluates the presence of records in a set or the membership status of a record. Also specifies what action to take based on the outcome.
  • COMMIT
    Commits changes that were made to the database through an individual run unit or through all database sessions that are associated with a task.
  • ROLLBACK
    Rolls back uncommitted changes that were made to the database through an individual run unit or through all database sessions that are associated with a task.
  • KEEP CURRENT
    Places an explicit shared or exclusive lock on a record that is current of run unit, record, set, or area.
Logical-record
Retrieve, modify, store, and erase logical records.
  • ERASE
    Deletes a logical record.
  • MODIFY
    Modifies a logical record.
  • OBTAIN
    Accesses a logical record.
  • STORE
    Stores a logical record.
Modification
Add new records to the database and modify and delete existing records.
  • STORE
    Adds a new record to the database.
  • MODIFY
    Changes the contents of an existing record.
  • CONNECT
    Links a record to a set.
  • DISCONNECT
    Removes a member record from a set.
  • ERASE
    Deletes a record from the database.
Program Management
  • Pass and return control from one program to another.
  • Load and delete programs and tables.
  • Define exit routines to perform before an abnormal program termination (abend).
  • Force an abend condition.
  • TRANSFER CONTROL (LINK)
    Passes control to another program with the expectation of receiving it back (o).
  • TRANSFER CONTROL (XCTL)
    Passes control to another program with no expectation of receiving it back (o).
  • DC RETURN
    Returns control to the next higher level calling program (o).
  • LOAD TABLE
    Loads a program or table into the CA IDMS system program pool (o).
  • DELETE TABLE
    Signals that a program has finished using a program or a table in the program pool (o).
  • SET ABEND EXIT (STAE)
    Establishes linkage to a program or routine that receives control when an abend occurs (o).
  • ABEND
    Abnormally terminates the issuing task (o).
Queue management
Create, delete, or retrieve records from the queue area.
  • PUT QUEUE
    Stores a queue record (o,dcb).
  • GET QUEUE
    Retrieves a queue record (o,dcb).
  • DELETE QUEUE
    Deletes a queue record (o,dcb).
Recovery
Perform the following functions relating to database, scratch, and queue area recovery when a system failure occurs:
  • Establish checkpoints in the journal file for database, scratch, and queue records that the issuing task is using.
  • Roll back user database, scratch, and queue areas to the last established checkpoint.
  • Establish an end-of-task checkpoint and relinquish control of all database, scratch, and queue areas that are associated with the issuing task.
  • Write user-defined records to the journal file.
  • COMMIT
    Commits changes that were made to the database through an individual run unit or through all database sessions that are associated with a task.
  • FINISH
    Commits changes that were made to the database through an individual run unit or through all database sessions that are associated with a task.
  • ROLLBACK
    Rolls back uncommitted changes that were made to the database through an individual run unit or through all database sessions that are associated with a task.
Retrieval
Locate records in the database and make them available to the application program.
  • FIND/OBTAIN DB-KEY
    Accesses a record using a db-key that the program previously saved.
  • FIND/OBTAIN CURRENT
    Accesses a record using previously established currencies.
  • FIND/OBTAIN WITHIN SET/AREA
    Accesses a record based on its logical location within a set or its physical location within an area.
  • FIND/OBTAIN OWNER
    Accesses the owner record of a set occurrence.
  • FIND/OBTAIN CALC/DUPLICATE
    Accesses a record using its CALC-key value.
  • FIND/OBTAIN USING SORT KEY
    Accesses a record in a sorted set using its sort-key value.
  • GET
    Moves all data that is associated with a previously located record into program variable storage.
  • RETURN
    Retrieves the database key and symbolic key of an indexed record entry.
Scratch management
Create, delete, or retrieve records from the scratch area.
  • PUT SCRATCH
    Stores a scratch record (o).
  • GET SCRATCH
    Retrieves a scratch record (o).
  • DELETE SCRATCH
    Deletes a scratch record (o).
Storage management
Allocate and release variable storage.
  • GET STORAGE
    Allocates variable storage from a CA IDMS system storage pool (o).
  • FREE STORAGE
    Frees all or part of a block of variable storage (o).
Task Management
  • Initiate a new task.
  • Change the dispatching priority of the issuing task.
  • Enqueue and dequeue system resources.
  • Signal that a task is to wait pending completion of an event.
  • Post an event control block (ECB) indicating completion of an event.
  • ATTACH
    Attaches a new task within the CA IDMS system (o).
  • CHANGE PRIORITY
    Changes the dispatching priority of the issuing task (o).
  • ENQUEUE
    Acquires a resource or a list of resources (o).
  • DEQUEUE
    Releases a resource (o).
  • WAIT
    Relinquishes control to the CA IDMS system while awaiting completion of an event (o).
  • POST
    Posts an event control block (ECB) (o).
Terminal Management
(Basic Mode)
Transfer data between the application program and the terminal.
  • READ TERMINAL
    Requests a synchronous or asynchronous data transfer from the terminal to program variable storage (o).
  • WRITE TERMINAL
    Requests a synchronous or asynchronous data transfer from program variable storage to the terminal buffer (o).
  • WRITE THEN READ TERMINAL
    Requests a synchronous or asynchronous data transfer from program variable storage to the terminal buffer and, upon an operator signal, back to variable storage (o).
  • CHECK TERMINAL
    Ensures that a previously issued asynchronous I/O operation is complete (o).
Terminal Management
(Line Mode)
Transfer data between the application program and the terminal.
  • READ LINE FROM TERMINAL
    Requests a synchronous data transfer from the terminal to the issuing program (o).
  • WRITE LINE TO TERMINAL
    Requests a synchronous or asynchronous data transfer from the issuing program to the terminal (o).
  • END LINE TERMINAL SESSION
    Terminates the current line I/O session (o).
  • WRITE PRINTER
    Requests transmission of data from a task to a printer (o,dcb).
Terminal Management
(Mapping  Mode)
Transfer data between the application program and the terminal.
  • BIND MAP
    Identifies the location of the map request block (MRB) and initializes the MRB fields (o).
  • MAP IN
    Requests a transfer of data from the terminal to program variable storage (o).
  • MAP OUT
    Requests a transfer of data from program variable storage to the terminal (o).
  • MAP OUTIN
    Requests a transfer of data from program variable storage to the terminal and, upon an operator signal, back to variable storage (o).
  • INQUIRE MAP
    Obtains information or tests conditions concerning the previous map operation (o).
  • MODIFY MAP
    Requests modifications of mapping options for a map (o).
  • STARTPAGE
    Begins a map paging session and specifies options for that session (o).
  • ENDPAGE
    Terminates a map paging session (o).
Time Management
Obtain the time and date, and define time-related events. These events include:
  • Placing the issuing task in a wait state for a specified duration of time.
  • Posting a user-specified ECB after a specified interval.
  • Initiating a new task after a specified interval.
  • GET TIME
    Obtains the time and date from the system.
  • SET TIMER
    Defines a time-delayed event (o).
Utility function
  • Request retrieval of task-related information.
  • Request a memory dump of selected parts of storage.
  • Retrieve and send a predefined message that is stored in the data dictionary.
  • Send a specified message to one or more users or logical terminals.
  • Collect, retrieve, and write CA IDMS statistics on a transaction basis.
  • Establish long-term database locks and monitor access to the database records that are used across tasks during a pseudo-conversational transaction.
  • ACCEPT
    Retrieves task-related information (o).
  • SNAP
    Requests a memory dump of selected parts of storage (o).
  • SEND MESSAGE
    Sends a message to a user, logical terminal, or list of users or logical terminals (o).
  • BIND TRANSACTION STATISTICS
    Defines the beginning of a transaction for the purpose of collecting transaction statistics (o).
  • ACCEPT TRANSACTION STATISTICS
    Returns the contents of the transaction statistics block (TSB) to program variable storage (o).
  • END TRANSACTION STATISTICS
    Defines the end of a transaction (o).
  • KEEP LONGTERM
    Modifies a prior KEEP LONGTERM request, or enables database long-term locks or database monitoring for records, sets, or areas.
  • WRITE JOURNAL
    Writes user-defined records to the journal file.
  • WRITE LOG
    Retrieves a message from the data dictionary and sends it to a predefined destination (o).