Previous Topic Next topic Print topic


DB-FREE

DB-FREE releases file resources and:
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
  • Ends a sequential DB-OBTAIN browse.
  • Unlocks a held record (a record held by a DB-OBTAIN HOLD) when DB-OBTAIN is not followed by DB-MODIFY or DB-ERASE.

Target:

VSAM Online

Syntax:

DB-FREE REC recordname|ALL
... [VIEW keyname]
... [ENDBR] [UNLOCK] [REQID number]
... [SYSID systemname] [DDN ddname]

Syntax Rules:

  1. UNLOCK and ENDBR are default keywords. De-activate either one by:
    • Coding only ENDBR makes UNLOCK inactive
    • Coding only UNLOCK makes ENDBR inactive
  2. When ALL is coded and UNLOCK and ENDBR are active, a single DB-FREE call (located in a central paragraph) works for the entire program.

Parameters:

ALL

Process all subschema records. When coded with SYSID, all files must reside on the same region.

DDN ddname

Specify file ddname; can be a literal or data name defined as PIC X(8). Supply a value to the name option of CICS DATASET.

ENDBR

End active browse; generate CICS ENDBR command.

REC recordname

COBOL record to process.

REQID number

Unique browse identifier for performing a simultaneous browse on the same key; is a single integer (0 - 9). Assign &VS-ENDBR-CONTROL = "USER" in the AMB CNTL file APVSAMIN.

SYSID systemname

Remote system name (maximum 4 characters); can be a literal region name or a Working-Storage field.

UNLOCK

Unlock file; generate CICS UNLOCK command.

VIEW keyname

Specify primary or alternate key.

Examples:

Release a record held by a direct DB-OBTAIN; deactivate ENDBR.
DB-OBTAIN REC ORDR-RECORD
... WHERE ORDR-NUMBER = SCREEN-ORDR-NUMBER
... HOLD
DB-FREE REC ORDR-RECORD
... UNLOCK
Terminate a sequential DB-OBTAIN; specify the key used; deactivate UNLOCK.
DB-OBTAIN REC CUST-RECORD
... VIEW CUST-NUMBER
DB-FREE REC CUST-RECORD
... VIEW CUST-NUMBER
... ENDBR
Previous Topic Next topic Print topic