Previous Topic Next topic Print topic


DBRMLIB

Enables generation of DBRMs containing the static SQL statements from COBOL programs, mimicking mainframe-style binding.

Syntax, Format 1:

DBRMLIB[=DBRMLIBName]

Syntax, Format 2:

NODBRMLIB

Parameters:

DBRMLIBName
A name for the DBRM library. The value provided must conform to the syntax for mainframe Partitioned Data Set names as follows:
  • Maximum length is 44 bytes.
  • Must specify one or more simple names separated by periods (‘.’). A simple name can be up to eight bytes in length, starts with a character, and is made up of a combination of alphabetic characters, digits, or the following special characters: @, #, $, -

Properties:

Default: DBRMLIB

This is the equivalent of DBRMLIB=DBRMLIB.

Dependencies:

Requires that DBMAN is set to ODBC.

Requires that the TARGETDB SQL directive be set to TARGETDB=MSSQLSERVER.

Automatically sets the CHECK SQL directive.

Mutually exclusive with both BIND and ACCESS.

Scope:

Used at compile time: Yes
Behavior at run time: Source file

See Scope - HCOSS SQL Compiler Directive Options for more information.

Advantages:

  • Mainframe deployment compatibility, meaning you can bind using existing JCL.
  • You can bind a DBRM multiple times using different parameters each time, such as different default qualifiers.
  • You can apply security separately to procedures and data so that application users can only access and update data via the application.
  • You can use the Manage Packages and Plans tool to manage DBRM binding and freeing.
  • Enables HCOSS to maintain mainframe-compatible metadata in the database for bound packages and plans.
  • DBAs can review SQL after binding by browsing stored procedures without having to access source code.

Comments:

If required to fully emulate your mainframe setup, you can also specify the MEMBER and VERSION directives.

Before running your application, use the DSN command or the Manage Packages and Plans tool to bind DBRMs to packages and/or plans in the database.

Packages and plans are stored as SQL Server stored procedures.

When DBRMLIB is set, the precompiler and runtime system process the following statements:
SET CURRENT PACKAGESET
SET CURRENT PACKAGE PATH 
SET APPLICATION PLAN

DBRMs are stored as XML files with an extension of .hcodbrm in the localHCOSSFiles\DBRMDataSets\DBRMLIBName directory, where localHCOSSFiles represents the value of the Local HCOSS Directory HCOSS option, and DBRMLIBName represents the value of the DBRMLIB directive.

DBRMLIB supports the following SET statements, with the runtime system processing them internally:
SET CURRENT PACKAGESET
VALUES INTO CURRENT PACKAGESET
SET CURRENT PACKAGE PATH
VALUES INTO CURRENT PACKAGE PATH

DBRMLIB enables use of the APPLICATION PLAN special register, that can be used in SET host-variableAssignment and VALUES INTO statements, and also supports the SET APPLICATION PLAN statement, which allows an application to set the application plan to be used when static SQL statements in DBRMs generated by the DBRMLIB directive are executed.

Previous Topic Next topic Print topic