Functions of DML Statements

The data manipulation language enables you to access the database management system (DBMS) and to request LRF and DC/UCF services from your Assembler program. The DML statements can be grouped into 14 categories by function:
idmscu
Data manipulation language (DML) statements enable you to access the database management system (DBMS) and to request LRF and DC/UCF services from your Assembler program. The DML statements can be grouped into 14 categories by function:
  • Control
    statements perform the following actions:
    • Initiate and terminate processing
    • Effect recovery
    • Prevent concurrent retrieval and update of database records
    • Evaluate set conditions
  • Retrieval
    statements locate records in the database and make them available to the application program.
  • Modification
    statements add new records to the database and modify and delete existing records.
  • Accept
    statements allow you to move special information such as database keys, storage addresses, and statistics from the DBMS to the application program's variable storage.
  • Logical-record
    statements allow you to retrieve, modify, store, and erase logical records that are created through Logical Record Facility.
  • Program management
    statements perform the following actions:
    • Pass and return control from one program to another
    • Load and delete programs and tables
    • Define exit routines to be performed before an abnormal program termination (abend)
    • Force an abend condition
  • Storage management
    statements allocate and release variable storage.
  • Task management
    statements perform the following actions:
    • 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
  • Time management
    statements obtain the time and date and set up time-related events. These events include:
    • Placing the issuing task in a wait state for a specified time
    • Posting a user-specified ECB after a specified interval
    • Initiating a new task after a specified interval
  • Scratch management
    statements create, delete, or retrieve records from the scratch area.
  • Queue management
    statements create, delete, or retrieve records from the queue area.
  • Terminal management
    statements transfer data between the application program and a terminal or printer.
  • Utility function
    statements perform the following actions:
    • 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 dictionary
    • Send a specified message to one or more users or logical terminals
    • Collect, retrieve, and write DC/UCF system statistics on a transaction basis
    • Establish long-term database locks and monitor access to database records used across tasks in a pseudo-conversational transaction
  • Recovery
    statements perform functions relating to database, scratch, and queue area recovery if there is a system failure. These functions perform the following actions:
    • Establish checkpoints on the journal file for database, scratch, and queue records used by the issuing task
    • Roll back user database, scratch, and queue record areas to the last checkpoint established
    • Establish an end-of-task checkpoint and relinquish control of all database, scratch, and queue record areas associated with the issuing task
    • Write user-defined records to the journal file
The following table groups the DML statements by function and gives a brief description of each command.
DML Statements Grouped by Function
Function
DML statement
Description
Control Statements
@BIND SUBSCH
Signs on the application program to the CA IDMS/DB database management system
@BIND REC
Establishes addressability in variable storage for one or more records that are included in the program subschema
@BIND PROC
Establishes communication between the application program and a DBA-defined database procedure
@READY
Prepares database areas for processing
@FINISH
Commits changes that are made to the database through an individual run unit and terminates the run unit
@IF
Evaluates the presence of records in a set and specifies an action that is based on the outcome
@COMMIT
Commits changes that are made to the database by an individual run unit
@ROLLBAK
Rolls back uncommitted changes that are made to the database through an individual run unit
@KEEP
Places locks on record occurrences
Retrieval Statements
@FIND/OBTAIN DBKEY
Accesses a record by using a db-key that is previously saved by the program
@FIND/OBTAIN CURRENT
Accesses a record by using established currencies
@FIND/OBTAIN WITHIN SET/AREA
Accesses a record by either 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 by using its CALC-key value
@FIND/OBTAIN USING SORT KEY
Accesses a record in a sorted set by using its sort-key value
@GET
Moves all data that is associated with a previously located record into program variable storage
Modification Statements
@STORE
Adds a new record to the database
@MODIFY
Changes the contents of an existing record
@CONNECT
Links a record to a set
@DISCON
Removes a member record from a set
@ERASE
Deletes a record from the database
Accept Statements
@ACCEPT DBKEY FROM CURRENCY
Saves the db-key of the current record of run unit, record type, set, or area
@ACCEPT DBKEY RELATIVE TO CURRENCY
Saves the db-key of the next, prior, or owner record relative to the current record of a set
@ACCEPT PAGE INFORMATION FOR A GIVEN RECORD
Saves the page information for a record current record of a set
@ACCEPT STATS
Returns system runtime statistics to the program
@ACCEPT BIND
Returns the bind address of a record to the program
@ACCEPT PGINFO
Returns page information for a given record to the program
@ACCEPT PROC
Returns information in the application program information block that is associated with a database procedure to the program
@RETURN
Retrieves a database key of a record entry that has been indexed under integrated indexing.
Logical Record Facility (LRF) Statements
@OBTAIN logical-record
@MODIFY logical-record
@STORE logical-record
@ERASE logical-record
Retrieves a logical record
Modifies a logical record
Stores a new logical record
Deletes a logical record
Program Management Statements
#LINK
Passes control to another program with the expectation of receiving it back
#RETURN
Returns control to the next higher level calling program
#LOAD
Loads a program or table into the program pool
#DELETE
Signals that the program has finished using a program or table in the program pool
#STAE
Establishes linkage to a program or routine that receives control if an abend occurs
#ABEND
Abnormally terminates the issuing task
#XCTL
Passes control to another program with no expectation of having it returned
Storage Management Statements
#GETSTG
#FREESTG
Allocates variable storage from a DC/UCF storage pool
Frees all or part of a block of variable storage
Task Management Statements
#ATTACH
Attaches a new task within the DC/UCF system
#CHAP
Changes the dispatching priority of the issuing task
#ENQ
Acquires a resource or a list of resources
#DEQ
Releases a resource
#WAIT
Relinquishes control to the system while awaiting the completion of an event
#POST
Posts an event control block
Time Management Statements
#GETIME
Obtains the time and date from the system
#SETIME
Defines a timed event
Scratch Management Statements
#PUTSCR
#GETSCR
#DELSCR
Stores a scratch record
Retrieves a scratch record
Deletes a scratch record
Queue Management Statements
#PUTQUE
#GETQUE
#DELQUE
Stores a queue record
Retrieves a queue record
Deletes a queue record
Terminal Management (Basic Mode)
#TREQ
Transfers data and device-dependent information to or from the terminal, or establishes a terminal request block (TRB) for use by subsequent #TREQ operations. The #TREQ statement can be used to communicate in an SNA network environment
Terminal Management (Line Mode)
#LINEIN
Requests a synchronous data transfer from the terminal to the issuing program
#LINEOUT
Requests a synchronous or asynchronous data transfer from the issuing program to the terminal
#LINEEND
Terminates the current line I/O session
Terminal Management (Mapping Mode)
#MREQ
Requests a transfer of data either from the issuing program to the terminal or from the terminal to the issuing program
#MAPINQ
Obtains information or tests conditions concerning the previous map operation
#MAPMOD
Requests modifications of mapping options for a map
#STRTPAG
Begins a map paging session and specifies options for that session
#ENDPAG
Terminates a map paging session
Terminal Management (Print Mode)
#PRINT
Transfers data from a task to a terminal defined as a printer.
Utility Functions
#ACCEPT
Retrieves task-related information
#SNAP
Requests a memory dump of selected parts of storage
#SENDMSG
Sends a message to a user, logical terminal, list of users, or list of logical terminals
#TRNSTAT
Requests or terminates statistics collection; retrieves transaction statistics into program storage
#KEEP
Enables database locks or database monitoring for records, sets, or areas or terminates a prior #KEEP request
#WTL
Retrieves a message from the dictionary and sends it to a predefined destination
Recovery Statements
#COMMIT
Commits changes that are made to the database through an individual run unit or through all database sessions that are associated with a task
#FINISH
Commits changes that are made to the database through an individual run unit or through all database sessions that are associated with a task
#ROLLBAK
Rolls back uncommitted changes that are made to the database through an individual run unit or through all database sessions that are associated with a task
#PUTJRNL
Writes user-defined records to the journal file