• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Introducing the IMS Catalog - IMS UG May 2013 Philadelphia
 

Introducing the IMS Catalog - IMS UG May 2013 Philadelphia

on

  • 362 views

 

Statistics

Views

Total Views
362
Views on SlideShare
362
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • IBM IOD 2011 05/29/13 Prensenter name here.ppt 05/29/13 21:21
  • Prior to the implementation of the IMS catalog, metadata about all of the data contained in an IMS database is not defined within the DBD, only segment key fields and search fields are defined. To understand the data in a particular segment, the COBOL COPYBOOK or the PL/I INCLUDE must be reviewed. Sometimes, even the application code must be investigated to truly understand the database data.
  • ENCODING - Specifies the default encoding of all character data in the database defined by this DBD. The default is ENCODING=Cp1047, which specifies EBCDIC encoding. This value can be overridden in individual segments or fields. DATATYPE – (Note before the catalog this information was provided by the application program copybooks). An IMS provided or custom written data type converter routine transforms the binary data type stored by IMS to the data type specified on the DATATYPE parameter. ARRAY BINARY BIT BYTE CHAR DATE DECIMAL DOUBLE FLOAT INT LONG OTHER SHORT STRUCT TIME TIMESTAMP XML DFSMAP - You can define multiple alternative field maps for a single sequence of bytes in a segment definition. When an application program accesses a sequence of bytes in a segment instance that uses field mapping, the application program must evaluate the control field to determine which field map is in effect. Each field map in a segment definition is defined to IMS by coding a DFSCASE statement. The fields that make up a field map are defined by FIELD statements that specify the name of the map case on the CASENAME parameter. A set of map cases that map the same sequence of bytes in a segment share the same control field. In the segment definition, a DFSMAP statement links the set of related map cases to the control field. The map case definitions must specify the name of the DFSMAP statement on the MAPNAME parameter in the DFSCASE statement.
  • An optional alias for the PCB label or the PCBNAME= parameter. Java application programs use the external name to refer to the PCB.
  • The IMS catalog contains information about IMS program resources, database resources that an IMS system controls, and relevant application metadata that an IMS application controls. This will include all program and database-related information defined to the IMS database system including databases, fields, segments, data types, etc., Changes made to any of these resources such as when you create, alter, or delete any IMS resource information will be reflected in the catalog. The only way to update the IMS catalog is through integrated IMS processes: - Catalog Populate Utility - PSBGEN - DBDGEN - ACBGEN - Dynamic Database Change – Database Alter database definitions, program specifications Any changes to COPYBOOK or INCLUDE members will require DBDGEN and ACBGEN processes. As part of IMS’s growth strategy, the IMS catalog is a key component which will play an important role in: - Simplification - Integration
  • Steps: Initially populate of the Catalog with the Catalog Populate Utility (Only done once) Generate new DBD and PSB source with the IMS Explorer to incorporate application metadata Propagate the PSB and DBD source in the same manner as before into ACBLIB Note that the Catalog and ACBLIB are updated in the same unit of work. Key point…to change one field in one segment you will need an ACBGEN….tradeoff is that it is completely trusted Key point…to get the good stuff into the catalog requires a manual process of importing COBOL/PLI into the Explorer
  • Optional DBRC usage is provided for ease of catalog database management across test systems. The IMS Catalog Database is the only HALDB database for which DBRC is optional - it does not have to be defined in the RECONS. IMS can manage the allocation/creation of catalog database data sets. User must define the HALDB structure in the RECONs or in a definitional data set. The user must define recovery related options in the RECONs.
  • Source code for the catalog DBD and related PSBs are provided. Load modules for the catalog DBD and related PSBs are also provided. Users must generate the corresponding ACBLIB members for the PSBs before enabling, populating and using the IMS catalog. Catalog database management is required Review/adjust database buffer pool definitions Perform routine management and maintenance on the Catalog database Image Copy, Pointer Checker, Reorg, etc… Catalog database will need to be REORG’d If Catalog database is defined to the RECONs  HALDB OLR non-disruptive reorganization is supported If Catalog database is not defined to the RECONs  HALDB OLR can’t be supported and a reorg utility must be employed Existing recovery procedures that are used today for Image copy, recovery, backout utilities etc… can be used with the IMS Catalog Database. But, without DBRC enabled, Catalog database recovery is limited and the procedure will be similar to that used for a non-registered, full function database. DBA management of the Catalog database is required. Users will need to verify that properly sized buffers exist in or are added to the IMS DB bufferpool definitions in the DFSVSAMP and DFSVSMxx PROCLIB members. The database can also become disorganized and need reorganization. HALDB OLR (Online Reorganization) allows non-disruptive reorganization for the Catalog database. But if the Catalog database has not been defined in the RECONs, a batch reorganization utility must be used.
  • There is a segment available for ISV use at the first child level under both the DBD and PSB segments: DBDVEND and PSBVEND. Actually, anyone can use these segments! There is a secondary index segment (DFSCX000) which points to the DBDXREF segment. This secondary index could be used to cross reference DBDs to PSBs that reference them. There are some new DBD macros used to define extended database info/metadata. The Catalog database is comprised of four Data Set Groups (DSGs). The DBD definition specifies which segments reside in which DSGs. Root segment of the Catalog database is a generic resource header Indicates the type of resource  DBD or PSB A dependent of the Root and it’s Children are a complete DBD or PSB Multiple versions of a specific resource are supported Most resources are differentiated by their ACBGEN timestamp Logical DBDs and GSAM DBs are differentiated by their DBDGEN timestamp Catalog database segments typically correspond to macro statements in the DBD and PSB source. One segment at the first Child level under both the DBD and PSB segments is available for vendor/customer use: DBDVEND PSBVEND
  • Use the HALDB Index/ILDS Rebuild utility (DFSPREC0) to rebuild the primary index data set of a PHIDAM database and the indirect list data set (ILDS) of either a PHDAM or a PHIDAM database after a partition recovery or an offline partition reorganization that did not update the ILDS. An additional EXEC parameter, DFSDF, must be specified to use this utility with an IMS catalog database that is not registered in the RECON data set. DFSDF= specifies the 3-character suffix of the DFSDF xxx member of the IMS.PROCLIB data set that contains the names of your unregistered IMS catalog databases. The names are specified with the UNREGCATLG parameter of the DATABASE statement. For example: When used with an IMS catalog database that is not registered in the RECON data set, this utility can only perform batch image copies. Additionally, you must specify the Datain DD statement to identify the catalog HALDBs that are not registered in the RECON data set. Database Recovery utility (DFSURDB0) HALDB Partition Definition utility (%DFSHALDB)
  • IMS Version 12 includes the following new utilities for the IMS catalog: ACB Generation and Catalog Populate utility (DFS3UACB) Generates ACB members in an IMS.ACBLIB data set and creates the corresponding metadata records in the IMS catalog in a single job step. IMS Catalog Alias Names utility (DFS3ALI0) This utility takes a list of IMS catalog alias prefixes (4 characters each) and adds the names to the system DBD library. Defines multiple IMS catalog databases in an IMSPlex environment. Use this utility to define a complete list of catalog aliases to IMS. This definition list is required so that IMS can perform catalog name translation on behalf of your user database PCBs. IMS Catalog Copy utility (DFS3CCE0, DFS3CCI0) Copies IMS catalog database definitions and metadata between IMS systems. This utility can also migrate an IMS catalog database from a test environment to a production environment. Copy a production IMS catalog database to another installation for disaster recovery purposes (or for other similar purposes). IMS Catalog Partition Definition Data Set utility (DFS3UCD0) Creates and populates the IMS catalog partition definition data set, which stores information about IMS catalog database partitions when DBRC is not used to manage the database partitions. IMS Catalog Populate utility (DFS3PU00) Loads or inserts records into the IMS catalog database data sets. This utility also estimates the size of the IMS catalog data sets. IMS Catalog Record Purge utility (DFS3PU10) Removes unnecessary versions of IMS catalog records from the IMS catalog database based on criteria that you specify. The following utility programs are changed in IMS Version 12 to support the IMS catalog: Application Control Blocks Maintenance utility Database Description (DBD) Generation utility Program Specification Block (PSB) Generation utility
  • Use the HALDB Index/ILDS Rebuild utility (DFSPREC0) to rebuild the primary index data set of a PHIDAM database and the indirect list data set (ILDS) of either a PHDAM or a PHIDAM database after a partition recovery or an offline partition reorganization that did not update the ILDS. An additional EXEC parameter, DFSDF, must be specified to use this utility with an IMS catalog database that is not registered in the RECON data set. DFSDF= specifies the 3-character suffix of the DFSDF xxx member of the IMS.PROCLIB data set that contains the names of your unregistered IMS catalog databases. The names are specified with the UNREGCATLG parameter of the DATABASE statement. For example: When used with an IMS catalog database that is not registered in the RECON data set, this utility can only perform batch image copies. Additionally, you must specify the Datain DD statement to identify the catalog HALDBs that are not registered in the RECON data set. Database Recovery utility (DFSURDB0) HALDB Partition Definition utility (%DFSHALDB)
  • SAMPLE JCL and Control Cards Copy the DBDs and PSBs for the IMS catalog from the IMS.SDFSRESL data set to the IMS.DBDLIB and IMS.PSBLIB data sets. The catalog DBDs are called DFSCD000 and DFSCX000. The PSBs are called DFSCPL00, DFSCP000, and DFSCP001, DFSCP002, DFSCP003. Run the ACB Maintenance utility to generate the ACBs for the IMS catalog. Activate the ACB library that contains the IMS catalog ACBs.
  • Code the CATALOG section(s) of the DFSDF xxx member in the PROCLIB data set. The Catalog Definition user exit routine (DFS3CDX0) is provided as an alternative option for batch processing environments that do not use the DFSDF xxx member of the PROCLIB data set. The CATALOG and CATALOGxxxx sections of the DFSDFxxx member of the PROCLIB data set both use the same parameter list and syntax. For a single IMS system, always use the CATALOG section. In a multi-system environment, all IMS systems sharing this DFSDFxxx member use the options configured in the CATALOG section unless a CATALOGxxxx section is included for that specific IMS system. A DFSDFxxx member can contain any number of CATALOGxxxx sections, but only one CATALOG section. When you add a CATALOGxxxx section, replace "xxxx" with the IMSID of an IMS system that uses this DFSDFxxx member. CATALOG= Specifies if the IMS catalog is enabled or disabled. NO means the IMS catalog is disabled. This value is the default and is used if no CATALOG section is specified. YES means the IMS catalog is enabled. ALIAS= xxxx Specifies a 1- to 4-character alphanumeric name prefix that is used to address a catalog database. References to the alias name are dynamically replaced with the internal catalog database and catalog secondary index names (DFSCD000 and DFSCX000) at runtime. There is no default value, but DFSC is the recommended value, which is the standard catalog name prefix.
  • STORCLAS= xxxxxxxx Storage class for automatically generated, SMS-managed catalog data sets. Required for SMS-managed catalog data sets. DATACLAS= xxxxxxxx Data class for automatically generated, SMS-managed catalog data sets. MGMTCLAS= xxxxxxxx Management class for automatically generated, SMS-managed catalog data sets. IXVOLSER= xxxxxx Volume serial number for all primary and secondary catalog indexes. Important: This parameter is required when the catalog data sets are not managed by SMS. SMSVOLCT= nn Number of volumes created by the Catalog Populate utility for use by SMS-managed data sets. The valid range for this value is 1-20. The default is 1. SPACEALLOC=(PRIMARY= nnnn SECONDARY= nnnn ) This value is a percentage that is added to the IMS-computed size of the primary and secondary catalog data sets. The default for the primary dataset is 500% and the default for the secondary data set is 50%.
  • RETENTION= This optional statement specifies the retention schedule for metadata in the IMS catalog. By default, the IMS catalog stores 2 versions of DBD and PSB metadata that is currently being used in the IMS system. If a previous version exists in the database, it is replaced when a newer version is created. Specify different values to maintain multiple versions of IMS catalog metadata. MAX= nnn Specifies the maximum number of versions of the catalog metadata to store in the IMS catalog. When the number of versions exceeds this value, the oldest version (based on the ACBGEN timestamp) is removed in favor of the newest version. This value is a decimal value from 1 to 255. The default is 2. PERIOD= nnn Specifies the retention period of metadata in the IMS catalog in days. When the age of a version of the catalog metadata exceeds this value, it is removed from the IMS catalog the next time a new version of the catalog metadata is added. This parameter does not automatically delete all versions of the catalog metadata that are older than the specified retention period. It makes them available for removal only when new versions of the same DBD or PSB are added to the IMS catalog. This value is a decimal from 0 to 999. Specifying 0 (the default) disables this feature.
  • Define the HALDB master and partitions of the IMS catalog. This information must be defined either to DBRC or with the Catalog Partition Definition Data Set utility (DFS3UCD0) for IMS systems that do not use DBRC. The IMS™ catalog is a HALDB (high availability large database) database, a partitioned, IMS full-function database type. Prior to loading records into an IMS catalog, you must define the partitions to IMS. The HALDB partition definitions for the IMS catalog are typically registered in the RECON data set by DBRC. DBRC provides support for database recovery, data sharing, automatically generating JCL control statements, log and data set management, and other database tasks. The IMS catalog, however, does not have to be registered with DBRC. You can define the IMS catalog database partitions with the IMS catalog partition definition utility (DFS3UCD0) instead of using DBRC. The DFS3UCD0 utility stores the catalog partition information in the catalog partition definition data set. This option is not available for other HALDBs. When the IMS catalog partition definition data set is used, the IMS catalog is not registered with DBRC. The database protection support provided by DBRC, including backup and recovery support, is unavailable to the IMS catalog when a IMS catalog partition definition data set is used. The HALDB Partition Data Set Initialization utility (DFSUPNT0) is not compatible with an unregistered catalog database. The Catalog Populate utility (DFS3PU000) provides analogous support for registered and unregistered catalog databases. The IMS catalog database does not support a HALDB Partition Selection exit routine (DFSPSE00). The catalog database uses the high-key selection method exclusively.
  • The DBRC utility can be used to define the Catalog database structure to the RECONs. If alias prefix names were defined in the DFSDFxxx member, those alias named catalog databases must be defined.
  • If you choose not to use DBRC for the Catalog database, you will have to use the Catalog Partition Definition Data Set Utility, DFS3UCD0, to build/populate a Catalog Partition Definition data set with the HALDB database structure information – HALDB, PART, DSN Prefix, KEY info. DFSHDBSC is the DDNAME for the Catalog Partition Definition data set.
  • You might need to define multiple alias name databases as UNREGCATLG.
  • You can create a Dynamic Allocation member for the Catalog Partition Definition data set. DFSHDBSC is the DDNAME used for the Catalog Partition Definition data set.
  • The populate utility reads the ACB members and creates the corresponding metadata entries in the catalog. The members of the IMS.ACBLIB data set must be generated by a version 12 or later IMS system. The members of the IMS.DBDLIB and IMS.PSBLIB can be generated by IMS systems earlier than IMS version 12; however, the resulting records in the IMS catalog will not include certain metadata segments. You can include multiple ACB libraries as input to the utilities that populate the IMS catalog. The data sets for the input ACB libraries can be specified in separate ddnames, in a concatenation for a single ddname, or using a combination of these. When duplicate ACB members are encountered, the duplicates are not processed. The DFS3PU00 utility considers ACB members to be duplicates of each other if both their ACB member names and timestamps are identical. The DFS3PU00 utility does not load data into the catalog from an ACB member that is either a duplicate of another ACB member read as input from another ACB library or of an ACB member from which data has previously been loaded into the IMS catalog. If an input ACB member has the same name as a previously read ACB member, but has a different timestamp, the data from both ACB members is loaded into the IMS catalog. Note: When the input data sets for multiple ACB libraries are concatenated in a single DD statement, ACB members that have the same member name as a member from a data set earlier in the concatenation are completely ignored, even if the timestamps are different. Only the first instance of an ACB member with a given name in the list of concatenated data sets is passed to the utility as input. Consequently, if you need to load the data from ACB members that have the same name but different timestamps into the IMS catalog, specify the applicable ACB libraries by using separate DD statements.
  • The first two sections provide statistics about the segments that would be inserted in the IMS catalog if it were loaded from the current input ACB libraries. The rest of the sections provide the storage estimates.
  • Use the ACB Generation and Catalog Populate utility (DFS3UACB) to generate ACB members in an IMS.ACBLIB data set and create the corresponding metadata records in the IMS™ Catalog in a single job step. Populating the IMS catalog in the same job step as the generation of the ACB members ensures that the proper ACB library is used to populate the IMS catalog. If you do not need to generate the ACB library members and populate the IMS catalog in the same job step, you can run the ACB maintenance utility and then the IMS Catalog Populate utility (DFS3PU00) in separate jobs or job steps. The DFS3UACB utility can populate the catalog in load mode or in update mode. When load mode is used, any existing records in the IMS catalog are discarded. If you are updating an existing IMS catalog, consider creating an image copy of the IMS catalog data sets. If the IMS catalog is registered with DBRC, you can use the DBRC command GENJCL.IC to backup the catalog. If you have defined the IMS catalog in an IMS Catalog partition definition data set, you must use standard image copy JCL.
  • ACBGEN has been enhanced to create the catalog metadata at the same time we create the ACB member. This keeps them in sync. Both will have the timestamp of the ACBGEN. The catalog dataset name is in the DFSDFxxx PROCLIB member. Using this, we can allocate the catalog datasets. The ACBGEN process will invoke the ACB decoder and put the member back into a format that the builder will create records to be inserted into the catalog database. //IMSACB DD Defines the IMS.ACBLIB data set. Restriction: This data set is modified and cannot be shared with other jobs. //IMSACB01 DD Defines an ACB library data set that contains the ACB members that are used to populate the IMS catalog. This DD statement is required. This DD statement must specify the same data set defined in the IMSACB DD statement. To ensure that the same data set is referenced, code this DD statement with an asterisk as the high-level qualifier, as shown in the example: //IMSACB01 DD DSN=*.ACBLIB,DISP=OLD
  • In this example, there are 3 members in the ACBLIB; DB1, DB2 & DB3. There is a timestamp in each ACBLIB member and the timestamp is from when each ACB member was created. In the example it is represented by TS0. In this scenario, the application programmer makes changes to DB3. The DBA does a DBDGEN followed by an ACBGEN. The ACBGEN will create an updated DB3 member in the ACBLIB. The new ACBLIB member will have a new time stamp, TS1. As part of the ACBGEN, a member is created in the catalog that corresponds to the updated ACB member. This catalog member will have the same timestamp as the ACB member. This allows us to keep them in sync. The member in the catalog has the name DB3 and the timestamp TS1. The changes and testing are done in the user test environment.
  • The IMS catalog database is accessible to standard IMS DB application programs when it is enabled for your IMS system. The IMS catalog database stores application and database metadata in a format that is accessible to standard IMS DB application programs. This information includes database definitions, program specifications, and user comments. Any application program can read this information, but the catalog database is write-protected and can be updated only by authorized system utilities such as the IMS catalog populate utility (DFS3PU00). By default, the IMS catalog is named DFSCD000. The DFSC prefix is replaced with an alias prefix if one is defined to IMS. The IMS catalog secondary index contains a single segment type, DBDPSB. It is logically linked to the DBDXREF segment type in the IMS catalog database, which is included in all catalog records for IMS PSBs. You can use the catalog secondary index to determine which IMS programs reference a specific user database without processing the entire IMS catalog. By default, the IMS catalog is named DFSCX000. The DFSC prefix is replaced with an alias prefix if one is defined to IMS. IMS does not require user PSBs to contain a PCB for the IMS catalog database or secondary index. The catalog PSBs DFSCP000, DFSCP002, and DFSCP003 are dynamically attached to any user PSB that makes a DL/I call to the catalog database or issues an INT DB QUERY call. Each PSB is intended for use by a different type of application program. Restriction: The IMS catalog PSBs are not dynamically attached to generated PSBs or GSAM-only PSBs. You might need to increase the size of your storage pools, up to the maximum size of the catalog PSB in each pool multiplied by the number of user PSBs that concurrently access the catalog. IMS automatically increases the space to attach the catalog PSB with user PSB: 96 bytes of additional space are allocated for each user PSB in the PSB CSA storage pool. The catalog PSB occupies 12kb in the DLIPSB pool and 500 bytes CSAPSB pool for each user PSB that is using the catalog PSBs. GUR – This call functions like a GU followed by a series of GNP calls and is provided to reduce the number of processing steps required to retrieve a complete catalog record for a DBD or PSB. Data returned in the form of a single XML instance document for a particular catalog record. You can also issue other DL/I read calls to process the catalog database in the same way as any other IMS database.
  • SSA processing is enhanced. Instead of requiring a field name in a qualification statement, it will instead be possible to provide the position and length of the field. This will allow non-DBD defined fields to be included in segment search arguments when accessing HDAM, HIDAM, PHDAM, PHIDAM, DEDB. Command Code “O” is not supported for FP Secondary Index DBs and will return an “SD” status code if used. To qualify an SSA, you must specify the field position. The field position is either a field, the sequence field of a virtual child or a position and a length. A qualified SSA describes the segment occurrence that you want to access. This description is called a qualification statement and has three parts. The following table shows the structure of a qualified SSA. The field position and the field value are connected by a relational operator which tells IMS how you want the two compared. The field value contains the data that you want IMS to use as the comparative value. When the field position specifies a field name then the field value must be the same length as the field specified by field name. When command code “O” is specified the field name can be replaced with a position and length. When the field position specifies a position and then the field value must be the same length as the length specified in the qualification. The position and length apply to the physical segment layout. SSA component Field length Segment name 8 * 1 Command code Variable ( 1 Field position 8 Relational operator 2 Field value variable ) 1
  • IMS can only search on fields that are defined in the DBD – sequence/key or search fields. As a result, the Universal Drivers cannot support an SQL predicate containing columns that are not defined in a DBD. The following is an example exception message users may receive upon issuing a SQL query containing columns not defined by a DBD: java.sql.SQLException: com.ibm.ims.drda.base.DrdaException: com.ibm.ims.dli.SSAConversionException: An error occurred converting the SSA for segment : com.ibm.ims.dli.SSAQualificationConversionException: The field in database segment is not a searchable field. IMS has been enhanced to allow a search based on offset and length. This removes the requirement that fields need to be defined in the DBD. The Universal drivers have been enhanced to allow SQL predicates containing columns that are not defined in the DBD by internally converting to an offset and length.
  • The IMS Catalog is new in IMS 12. It contains information about IMS program resources, database resources, and relevant application metadata that IMS controls. It is a High Availability Large Database (HALDB) that can be accessed by DL/I calls or SQL statements to look at data in the catalog in the same way that you retrieve data from any other HALDB. It is a trusted source of metadata which is derived from the database descriptions (DBDs) and program specification blocks (PSBs). Additionally, the ability to code the elements described by an application program metadata in a DBD provides the ability to consolidate the data requirements of your application programs into the IMS Catalog. You can populate the IMS Catalog when you generate the ACB members or you can populate the IMS catalog in a separate job after the ACB generation process is complete. IMS ensures that the catalog contains accurate information.
  • IMS Social Community is expansive. Follow us on Facebook, LinkedIn, Twitter. New IMS Newsletters Very active user group community. Demos available on YouTube.

Introducing the IMS Catalog - IMS UG May 2013 Philadelphia Introducing the IMS Catalog - IMS UG May 2013 Philadelphia Presentation Transcript

  • Philly IMS User GroupIntroducing the IMS Catalog:Open Access to IMS DB MetadataNancy SteinIBM IMS ATSngstein@us.ibm.comMay 15, 2013
  • Acknowledgements and Disclaimers:© Copyright IBM Corporation 2013. All rights reserved.– U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP ScheduleContract with IBM Corp.IBM, the IBM logo, ibm.com, System z, zEC12, z196, z10EC, zBX, zIIP, zAAP, ICF, SAP, SoftwareXcel, zOS, IMS,InfoSphere, DB2, CICS, RACF and WebSphere, are trademarks or registered trademarks of International BusinessMachines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are markedon their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered orcommon law trademarks owned by IBM at the time this information was published. Such trademarks may also be registeredor common law trademarks in other countries. A current list of IBM trademarks is available on the Web at “Copyright andtrademark information” at www.ibm.com/legal/copytrade.shtmlOther company, product, or service names may be trademarks or service marks of others.Availability. References in this presentation to IBM products, programs, or services do not imply that they will be availablein all countries in which IBM operates.The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views.They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal orother guidance or advice to any participant. While efforts were made to verify the completeness and accuracy of theinformation contained in this presentation, it is provided AS-IS without warranty of any kind, express or implied. IBM shallnot be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any othermaterials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties orrepresentations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable licenseagreement governing the use of IBM software.All customer examples described are presented as illustrations of how those customers have used IBM products and theresults they may have achieved. Actual environmental costs and performance characteristics may vary by customer.Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activitiesundertaken by you will result in any specific sales, revenue growth or other results.2
  • 3Agenda• IMS Metadata• Local File Metadata vs. IMS Catalog Metadata• IMS Catalog Database• Enablement and Implementation of the IMS Catalog• Application Programming with the Catalog
  • 4IMS Metadata• Databases partially defined in the IMS DBD• Only key/searchable fields needed by applications• Remaining segment data is not defined• Remaining database segment definition is within Applications• COBOL COPYBOOKs and PL/I INCLUDEs map all the segment data• Applications can have different mappings for one segmentPSBLIB DBDLIBACBLIBCOBOL/PLIsourceDBD sourcePSB sourceIMS User maintainedDL/I model utilityJava classesIMS Metadata
  • 5DBD + PSB = IMS DB SchemaDA BB DCa b c de f j k lAB Dh iCDBD, PCB,CopybooksDBD/PCB SchemaPhysical Disk DataIMS HierarchyProgram I/O AreaA B Cg
  • 6IMS MetadataDefined inDBDDefined inAppl Copylibs(IMS Java)Defined inXML Schema:Local file orIMS Catalog010101001011110101010000100111010010111110110110010001010011010111011100011001001001<PurchaseOrder number=“ ”><lastName> </lastName><firstName> </firstName><date> </date><payment type=“ ”> </payment>10100010111001010110101011011001010100101010010101010100001110111011001010111010100000101010111011000100110101110101001001101100000101001001101011101011001001001001ord# lastName firstName payment type dateINT CHAR CHAR CHAR CHAR DATE113246IBMIMS04/26/1968MC 5414 2263 4895 1145
  • 7Changes to DBD Statement• DBD• ENCODING=• Specifies default encoding of all character data in the database defined by this DBD• Value can be overridden in individual segments or fields• SEGM• EXTERNALNAME=• Optional alias for NAME= parameter used by Java application programs to refer to segment• FIELD• CASENAME=• Name of the map case when alternative mappings are defined for fields in a segment• DATATYPE=• Specifies the external data type of the field• EXTERNALNAME=• Optional alias for the NAME= parameter used by Java application programs to refer to field• DFSMARSH• Specifies the DATATYPE converter routine to transform binary data to external data format• DFSMAP• Defines alternative field mappings in a segment• DFSCASE• Defines a map case for a segment type that uses DFSMAP alternative field mapping• REMARKS=• Optional user comments: 1- to 256-character field added to DBDGEN statement
  • 8Data Types• Data types have multiple metadata elements• Application data type• Universal drivers use application data type to present data to clients• Physical data type• Universal drivers use physical data type to marshal/unmarshal data to and from thedatabase• Example• Application data type is DECIMAL(10,2) [decimal with precision 10 and scale 2]• Physical data type is a signed packed decimal (AD community doesn’t need to knowthis)• New data type support• Structs (nested n levels with no constraint on element data types)• Accessed via SQL and DLI• Arrays (nested n levels with no constraint on element data types)• Accessed via SQL and DLI• User-defined• Name of UDT can be defined to the catalog and intended to be used at runtime byUniversal drivers to marshal/unmarshal data• Can be part of a Struct or Array element
  • 9Changes to PSB PCB Statement• PCB• EXTERNALNAME=• Optional alias for the PCB label or the PCBNAME= parameter• Java application programs use the external name to refer to the PCB• REMARKS=• Optional user comments: 1- to 256-character field added to PSBGENstatements
  • 10DBD sourceLocal File for IMS Java MetadataLocalFilePSB sourceIMS ExplorerPSBNAMEDataBaseView.jar IMS Explorer parses DBD, PSB and COBOL or PL/I source code• Generates PSBNAMEDataBaseView.java and .class files• Export as .jar file to file system where application is deployed Key points• Metadata deployed to multiple file locations• Metadata offline and not guaranteed to be current
  • 11IMS Catalog for IMS Java MetadataContains IMS program & database resources, and relevant application metadataDatabase Definitions Segments FieldsIMS Catalog MetadataExtendedPSB sourceCOBOL & PLIsourceIMS ExplorerApplication Program Specifications Arrays and Structures Field data types and data type conversion Field redefines Alternative Field maps for a segmentExtendedDBD sourceACBLIBDBDGEN / PSBGEN / ACBGENPSB & DBDsource
  • 12ExtendedDBD sourceIMS Catalog LifecycleCatalogExtendedPSB source PSBLIB++DBDLIB++PSBGENDBDGENACBGENIMS Explorer DFS3PU00DB Client RouteACBLIB++PSBLIBDBDLIBACBLIB ACBGEN will populate ACBLIB and catalog in same UOW• Populates ACBLIB with standard ACB info and extended info• Populates the catalog with extended info Key points• Trusted, online, IMS metadata stored in the IMS catalog• Only way to update catalog is via the Populate Utility or ACBGEN process• Extended info is acquired via the IMS Explorer• Extended info stored in ACBLIB members for recoverabilityPopulate Utilitywill populatecatalog fromACBLIB
  • 13The IMS Catalog Database• Contains metadata related to an IMS system’s databases & programs• DBD and PSB and Application information• IMS PHIDAM/OSAM HALDB database• Defined with 4 Data Set Groups (DSGs)• One Secondary Index• Unique feature –> “Unregistered Catalog Database”• DBRC use is optional for the IMS Catalog database• Only HALDB that isn’t required to be defined to DBRC• IMS can manage allocation/creation of catalog database• Done via parameters in the “CATALOG” section of DFSDFxxxPROCLIB member
  • • IMS provides the DBD and PSB source code and object code for theCatalog database• PHIDAM DBD name is DFSCD000• PSINDEX DBD name is DFSCX000• Used to connect DBDs to PSBs that reference them• PSBs provided to access the Catalog database• Initial load process - DFSCPL00• Used by the Catalog Populate Utility• Update access - DFSCP001• Used by the new ACBGEN Utility• Read access - DFSCP000 (COBOL/HLASM), DFSCP002 (PL/I), andDFSCP003 (PASCAL)• Default catalog PCB is DFSCAT00• ACBGEN required for all catalog PSBsThe IMS Catalog Database14Let’s look at the IMS Catalog database physical structure...
  • Physical Catalog Record StructureHEADER(RESOURCE HEADER)SS(SENSEG)PCBPSBSF(SENFLD)PSBVENDPSBRMK(REMARKS)PCBRMK(REMARKS)SFRMK(REMARKS)SSRMK(REMAKRS)XDFLDLCHILDAREA CAPXDBD SEGMDSET(DATASET)DBDMAP(DFSMAP)DBDRMK(REMARKS)CAPXSEGMCASE(DFSCASE)LCHRMK(REMARKS)SEGMRMK(REMARKS)CMAR(DFSMARSH)CPROP(PROPERTIES)CFLD(FIELD)DBDVENDCFLDRMK(REMARKS)CMARRMK(REMARKS)DBDXREFDSETRMK(REMARKS)AREARMK(REMARKS)FLD(FIELD)MAR(DFSMARSH)FLDRMK(REMARKS)PROP(PROPERTIES)MARRMK(REMARKS)MAPRMK(REMARKS)CASERMK(REMARKS)RESERVED RESERVEDLCH2IDX(INDEX NAME)XDFLDRMK(REMARKS)…RESERVEDDSG A DSG B DSG DDSG CDFSCX000SecondaryIndex15Key value: DBDbbbbbdbdname1 Key value: PSBbbbbbpsbname1
  • 16Supported by Existing Database Utilities• HALDB Index/ILDS Rebuild utility (DFSPREC0)• HD Reorganization Unload utility (DFSURGU0)• HD Reorganization Reload utility (DFSURGL0)• Batch Backout utility (DFSBBO00)• Database Recovery utility (DFSURDB0)• Database Image Copy utility (DFSUDMP0 / DFSUDMT0)• Only batch image copies for an unregistered Catalog
  • 17New Utilities for the IMS Catalog• IMS Catalog Populate utility (DFS3PU00)• Loads or inserts records into the IMS catalog• Estimates the size of the IMS catalog data sets• ACB Generation and Catalog Populate utility (DFS3UACB)• Generates the ACBLIB members and loads the IMS catalog metadata in one unitof work• IMS Catalog Alias Names utility (DFS3ALI0)• Defines a complete list of catalog aliases to IMS• IMS Catalog Copy utility (DFS3CCE0, DFS3CCI0)• Copies IMS catalog database definitions and metadata between IMS systems• Migrate an IMS catalog database from a test to production environment• Copy a production IMS catalog database to another installation for system cloning or DRpurposes (etc…)• IMS Catalog Partition Definition Data Set utility (DFS3UCD0)• When DBRC is not used to manage the catalog database: creates the IMScatalog partition definition data set and populates it with information about theIMS catalog HALDB partitions• IMS Catalog Record Purge utility (DFS3PU10)• Removes unnecessary versions of IMS catalog records from the IMS catalogdatabase based on criteria that you specify
  • 18IMS Batch Processing with the Catalog• Enabling the IMS catalog for IMS batch processing• Specify DFSDFxxx member on job EXEC parm• Requires JCL change to implement• Exit Routine (DFS3CDX0)• Optional Catalog Definition user exit routine• Alternative to specifying DFSDFxxx member through job JCL• Available if users cannot or choose not to modify job JCL
  • IMS Catalog Enablement• Add catalog DBDs and PSBs to your DBDLIB, PSBLIB & ACBLIB• Copy DBD and PSB object code from SDFSRESL to your DBDLIB and PSBLIB• ACBGEN the catalog DBD and PSB resources into your ACBLIB//CPYCMEM EXEC PGM=IEBCOPY//SDFSRESL DD DSN=SDFSRESL,DISP=SHR//DBDLIB DD DSN=MYIMS.DBDLIB,DISP=OLD//PSBLIB DD DSN=MYIMS.PSBLIB,DISP=OLD//SYSIN DD *COPY OUTDD=DBDLIB,INDD=((SDFSRESL,R)),LIST=YESSELECT MEMBER=(DFSCD000,DFSCX000)COPY OUTDD=PSBLIB,INDD=((SDFSRESL,R)),LIST=YESSELECT MEMBER=(DFSCPL00,DFSCP000,DFSCP001,DFSCP002,DFSCP003)//CATACB EXEC PGM=DFSRRC00,PARM=UPB//STEPLIB DD DSN=SDFSRESL,DISP=SHR//DFSRESLB DD DSN=SDFSRESL,DISP=SHR//IMS DD DSN=MYIMS.DBDLIB,DISP=SHR// DD DSN=MYIMS.DBDLIB,DISP=SHR//IMSACB DD DSN=IMS.ACBLIB,DISP=OLD//SYSIN DD *BUILD PSB=(DFSCPL00)BUILD PSB=(DFSCP001)BUILD PSB=(DFSCP000)N.B. The MODBLKS resources for the Catalog databases and programs do not need to be defined !19
  • IMS Catalog Enablement• Modify DFSDFxxx PROCLIB Member• New CATALOG section(s) for catalog related parameters• Single section format <SECTION=CATALOG>• Multiple section format <SECTION=CATALOGimsid>• Multiple IMS systems sharing one DFSDFxxx PROCLIB member• imsid suffix must be a four character IMS ID• CATALOG section parameters• CATALOG=N | Y• Catalog is disabled or enabled• If enabled, IMS automatically creates catalog DDIR & PDIRs at IMS startup• ALIAS=DFSC | xxxx (no default value)• Specifies any 1-4 alphanumeric value used as a Catalog database name prefix• Enables use of non-shared, Catalog databases within an IMSplex• Use in a data sharing environment where each IMS has its own Catalogdatabase and all are registered in a single set of RECONs• At runtime, the alias Catalog database names are dynamically replacedwith internal database names DFSCD000 and DFSCX000• For standalone IMS system – use ‘‘DFSC’’ which is the standard Catalogdatabase name prefix  DFSCD000 and DFSCX00020
  • IMS Catalog Enablement• DFSDFxxx PROCLIB Member• CATALOG section parameters (continued)• Information used by Catalog Populate Utility to automaticallyallocate the Catalog database data sets• DATACLAS• Optional data class for SMS managed data sets• MGMTCLAS• Optional management class for SMS managed data sets• STORCLAS• Required storage class for SMS managed data sets• IXVOLSER• Volume serial number for primary and secondary catalog indices• Required for non-SMS managed data sets• SPACEALLOC• Free space % (0 to 9999) added to the IMS-computed size of the primary& secondary data set allocations• SMSVOLCT• Number of volumes (1-20) created by the Catalog Populate utility forSMS-managed21
  • IMS Catalog Enablement• DFSDFxxx PROCLIB Member• CATALOG section parameters (continued)• RETENTION=(MAX=2 | nnn) or RETENTION=(PERIOD=0 | nnn)• Specifies retention schedule for metadata in the IMS catalog• By default IMS keeps only two copies of the DBD or PSB in catalog• MAX=2 | nnn• Maximum number of versions of a DBD or PSB to be stored before theyare replaced first-in first-out• PERIOD=0 | nnn• Maximum number of days a version of a DBD or PSB is to be storedbefore it can be replaced• Metadata versions older than the specified retention period are notautomatically deleted, but available for removal when new versionof metadata is added• Default value of “0” disables this feature22
  • 23IMS Catalog Enablement• Definition of the HALDB structure• Partitioning of the catalog is the users responsibility• Minimum of 1 partition is required• Last partition must be able to contain the highest-key PSB record• Catalog HALDB uses the high-key selection method• No use of Partition Selection Exit allowed• Catalog Database Definition• For systems that use DBRC• Catalog database can be defined to the RECONs with the DBRCutility and commands• For systems that do not use DBRC• Catalog database must be defined to the Catalog PartitionDefinition data set using the Catalog Partition Definition Data Setutility, DFS3UCD0• If an ALIAS is used in the CATALOG sections of the DFSDFxxxmember, each alias Catalog database must be defined
  • IMS Catalog Enablement• Using DBRC DSPURX00 utility and commands to definethe Catalog database to the RECONs• If using a catalog alias prefix, replace DFSC in the database and partitionnames for the catalog and the catalog secondary index with the fourcharacter ALIAS name prefix• You might need to define multiple alias name databases to the RECONs//DEFCAT EXEC PGM=DSPURX00//STEPLIB DD DSN=IMS.SDFSRESL,DISP=SHR//SYSPRINT DD SYSOUT=*//IMS DD DSN=IMS.DBDLIB,DISP=SHR//SYSIN DD *INIT.DB DBD(DFSCD000) TYPHALDB SHARELVL(3)INIT.PART DBD(DFSCD000) PART(DFSCD01) –DSNPREFX(dsnprefix.DFSCD000) –BLOCKSZE(4096) –KEYSTRNG(XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)INIT.DB DBD(DFSCX000) TYPHALDB SHARELVL(3)INIT.PART DBD(DFSCX000) PART(DFSCX01) –DSNPREFX(dsnprefix.DFSCX000) -KEYSTRNG(XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) /*24
  • IMS Catalog Enablement• Using the Catalog Partition Definition Data Set utility, DFS3UCD0, to definethe Catalog database (for systems that do not use DBRC)• Catalog Partition Definition data set is populated with the information specified in theHALDB and PART control cards• RECON-like information for catalog database partition definition and structure• The name DFSCD000 in the HALDB and PART statements contains the default catalogprefix DFSC. If your catalog uses an alias name prefix, substitute it in the JCL//S1 EXEC PGM=DFS3UCD0,REGION=0M//STEPLIB DD DSN=IMS.SDFSRESL,DISP=SHR//DFSRESLB DD DSN=IMS.SDFSRESL,DISP=SHR//DFSHDBSC DD DSN=...,DISP=//SYSPRINT DD SYSOUT=*//IMS DD DSN=IMS.DBDLIB,DISP=SHR//SYSIN DD *HALDB=(NAME=DFSCD000)PART=(NAME=DFSCD000,PART=partitionname,DSNPREFX=dsnprefix,KEYSTRNG=keystring)HALDB=(NAME=DFSCX000)PART=(NAME=DFSCX000,PART=partitionname,DSNPREFX=dsnprefix,KEYSTHEX=FFFFFFFFFFFFFFFF) /*UnregisteredCatalog database25
  • IMS Catalog Enablement• After Catalog database is defined in Catalog Partition Definition Data Set• Identify unregistered Catalog database names• UNREGCATLG parameter in the DATABASE section of the DFSDFxxx member• If using an alias name prefix, replace DFSC in the UNREGCATLG database nameswith the four character alias name prefix• Limitations of using an unregistered Catalog database• NO IMS Data Sharing support• NO OLR support• NO partition definition change support• User must rebuild catalog partitions• Manual recovery required for unregistered Catalog databases/******************************************************************//* Database Section *//******************************************************************/<SECTION=DATABASE>UNREGCATLG=(DFSCD000,DFSCX000) /* Unregistered IMS catalog DB *//******************************************************************//* *//******************************************************************/26
  • IMS Catalog Enablement• After Catalog database is defined in Catalog PartitionDefinition Data Set• Create a new DFSMDA dynamic allocation member for the Catalog PartitionDefinition data set• dsn is the name of the Catalog Partition Definition data set• Catalog Partition Definition data set was allocated in theDFS3UCD0 utility on the DFSHDBSC DD• Dynamically allocate Catalog Partition Definition data set in any IMS job step//DYNALOC JOB//*//STEP EXEC IMSDALOC//SYSIN DD *DFSMDA TYPE=INITIALDFSMDA TYPE=CATDBDEF,DSNAME=dsnDFSMDA TYPE=FINALEND/*27
  • 28IMS Catalog Members After Populate UtilityCatalogPopulate UtilityDFS3PU00DB1 TS0DB2 TS0DB3 TS0DB1 TS0DB2 TS0DB3 TS0• Start with 3 members in an ACBLIB• Run the Catalog Populate Utility, DFS3PU00• Created catalog members will contain timestamp TS0• This is the same timestamp from the ACB memberCatalogACBLIB
  • 29Catalog Populate Utility ReportCATALOG DFSCD000PARTITION DFSCD01NUMBER OF SEGMENTS INSERTED INTO THE CATALOGINSERTED AVERAGESC SEGMENT SEGMENTS DSG PARENT SEGS/PARENT1 HEADER 4228 A2 DBD 2530 A HEADER 0.63 CAPXDBD 7 D DBD 0.05 DSET 2599 D DBD 1.07 AREA 139 D DBD 0.19 SEGM 16337 B DBD 6.510 CAPXSEGM 1 D SEGM 0.012 FLD 16426 C SEGM 1.014 MAR 16426 C FLD 1.017 LCHILD 2687 B SEGM 0.220 XDFLD 134 B LCHILD 0.033 PSB 1840 A HEADER 0.435 PCB 9190 B PSB 5.037 SS 75274 B PCB 8.239 SF 1105 B SS 0.041 DBDXREF 8886 D PSB 4.8SEGMENT within existing header duplicates not insertedDBD 71 0PSB 72 0ESTIMATED SPACE REQUIREMENT TO HOLD INSERTED SEGMENTSDSG BLKSIZE BLOCKSA 4096 596B 4096 9343C 4096 8214D 4096 236DSG RECORDSL 8886X 4230SECONDARY INDEX RECORDSDFSCX000 8886
  • Adding IMS Catalog Metadata• New ACB Generation - DFS3UACB• Replaces existing ACBGEN Utility, DFSUACB0 (if IMS catalog enabled)• Generate ACBLIB member and populate/create catalog metadata in a single job step• Phase 1 - ACBGEN• DBDLIB and PSBLIB members used as input• Validation is unchanged• ACB member is written to ACBLIB with new ACBGEN timestamp• Phase 2 – IMS catalog update• Generated ACB is decoded, converted to catalog segments , loaded into thecatalog• DBD and PSB metadata created and inserted• Corresponding ACB member timestamp saved as timestamp in catalog DBD andPSB segments– ensures validity and consistency of ACBLIB and catalog• New ACBGEN, DFS3UACB, and new Catalog Populate, DFS3PU00, utilities arethe only updaters of the IMS catalog• IMS online and IMS batch regions will never update catalog data• IMS online and IMS batch regions will only retrieve data from the catalog30
  • 31PSBLIBDBDLIBACBGEN &CAT POPDFS3UACBCatalogACBLIBLogsDFSDFxxxPROCLIBMemberIMS Catalog Additions: New ACBGENSYSPRINTRECONs• New integrated ACBGEN process includes update to the IMS catalog• DFSDFxxx PROCLIB member has the catalog information• DFSMDA member used to dynamically allocate the catalog datasets//IMSACB DD//IMSACB01 DDDFSMDA
  • 32ACBLIB and Catalog After New ACBGENACBGEN &CAT POPDFS3UACBDB1DB2DB3DB1 TS0DB2 TS0DB3 TS1DB1 TS0DB2 TS0DB3 TS0CatalogACBLIBDBDLIBDB3 TS1DB3 TS0Phase 1Phase 2PSBLIB• User makes a change to DB3 and runs ACBGEN1. Creates updated DB3 ACB member with new timestamp2. Creates new DB3 member in the catalog with the newtimestamp
  • 33Catalog Member TimestampsActiveCatalog• Application request is made to read DB31. IMS determines active DB3 member has timestamp TS02. Internal DL/I call issued to retrieve member DB3 from IMS catalog3. IMS retrieves metadata from catalog member DB3 with timestamp TS0DB1 TS0DB1 TS0DB2 TS0DB3 TS0CatalogACBLIBBDB3 TS1DB2 TS0DB3 TS1DB1 TS0ACBLIBADB2 TS0DB3 TS0InactiveIMSDMBpoolDB3 TS0
  • 34Catalog Member TimestampsCatalog• Initiate OLC to switch from ACBLIBA to ACBLIBB• Activates DB3 ACB with timestamp TS1• Application request is made to read DB31. Internal DL/I call issued to retrieve member DB3 from IMS catalog2. IMS determines active DB3 member has timestamp TS13. IMS retrieves metadata catalog member DB3 with timestamp TS1DB1 TS0 DB1 TS0DB2 TS0DB3 TS0CatalogACBLIBBDB3 TS1DB2 TS0DB3 TS1DB1 TS0ACBLIBADB2 TS0DB3 TS0InactiveActiveIMSDMBpoolDB3 TS1
  • IMS2IMS1IMS4IMS3ACBLIBAMultiple IMSes, Cloned ACBLIBs, Shared CatalogSharedCatalogACBLIBBACBLIBAACBLIBBACBLIBAACBLIBBACBLIBAACBLIBBShared CATALOG DBShared DFSDFxxxALIAS=DFSCDFSDF000 Member:<SECTION=CATALOG>CATALOG=YALIAS=DFSCRECON1RECON2SPARE35
  • IMS2IMS1IMS4IMS3ACBLIBAMultiple IMSes, Shared ACBLIBs, each IMS has it’s own CatalogACBLIBBDFSDF000 Member:<SECTION=CATALOGIMS1>CATALOG=YALIAS=CAT1<SECTION=CATALOGIMS2>CATALOG=YALIAS=CAT2<SECTION=CATALOGIMS3>CATALOG=YALIAS=CAT3<SECTION=CATALOGIMS4>CATALOG=YALIAS=CAT4CAT1CatalogCAT2CatalogCAT4CatalogCAT3CatalogNon-Shared CATALOG DBsShared DFSDFxxxSeparate <SECTION=CATALOGimsid>ALIAS=xxxxRECON1RECON2SPARE36
  • IMS2IMS1IMS4IMS3ACBLIBAMultiple IMSes, Shared ACBLIBs, each IMS has it’s own CatalogACBLIBBDFSDF001 Member :<SECTION=CATALOG>CATALOG=YALIAS=CAT1DFSDF003 Member :<SECTION=CATALOG>CATALOG=YALIAS=CAT3DFSDF002 Member :<SECTION=CATALOG>CATALOG=YALIAS=CAT2DFSDF004 Member:<SECTION=CATALOG>CATALOG=YALIAS=CAT4CAT1CatalogCAT2CatalogCAT4CatalogCAT3CatalogNon-Shared CATALOG DBsNon-Shared DFSDFxxxALIAS=xxxxRECON1RECON2SPARE37
  • 38Application Programming with IMS Catalog• IMS catalog PSBs resident for application programs• DFSCP000 - High-level assembler and COBOL applications• DFSCP002 - PL/I applications• DFSCP003 - PASCAL applications• PCBs included to support different catalog processing models:• DFSCAT00 - Primary PCB to access all data in the catalog database• DFSCATSX – Used access the catalog database via the catalog 2ndindex• DFSCATX0 – Used to access the catalog 2ndindex as a database• All catalog processing is performed with PROCOPT=G• New “GUR” DL/I call to access Catalog DB records• Application programs can use the GUR call
  • 39NEW “GUR” DL/I Call• Get Unique Record• Retrieves an XML formatted Catalog database “record”• Restricted to use with the IMS Catalog database• Functions like a GU followed by a series of GNP calls• Less overhead than issuing GU & GNP to retrieve all the metadata for acatalog member• Returns the entire database DBD or PSB record in one call• Using an AIB token, the call can be continued if the I/O area is too small forthe entire catalog database record• Data returned in XML format• The XML schemas are included in the IMS.ADFSSMPL data set:• DFS3XDBD.xsd (for DBD records)• DFS3XPSB.xsd (for PSB records)• Support added for DFSDDLT0 and IMS REXX
  • 40• New SSA command code “O”• Non-key field definitions not required in the DBD• Allows fields defined in database metadata to be used• Search by position and length vs. field name• 4 byte position, hex value• 4 byte length, hex value• Valid for HDAM, HIDAM, PHDAM, PHIDAM and DEBD databases• Valid for GU, GHU, GN, GNP, GHNP, ISRT calls• Plays well with other command codes• “GE” status code returned if field not found• Support for DFSDDLT0 and IMS REXX• Performance will be the same as non-key field searchIMS 12APAR PM65139PTF UK81837 orPTF UK81838SSA Command Code “O”: Qualify by Position
  • 41SSA with command code, position and length0 1 2 3123456789012345678901235678901234567LAST1 FIRST1 555-1111 1999999LAST2 FIRST2 555-2222 2999999LAST3 FIRST3 555-3333 3999999Database SegmentsField Offset LenLASTNAME 1 10DBDCOBOL CopybookGU TELEBOOK*--(LASTNAME=LAST2 )GU TELEBOOK*O-(000000010000000A=LAST3 )GU TELEBOOK*O-(0000000B0000000A=FIRST1 )Field Offset LenLASTNAME 1 10FIRSTNME 11 10EXTENSIN 21 10ZIPCODE 31 7Offset Length‘bb‘ Status Code: segments returned successfully• SSA with “O” command code, position and length(Offset is relative to 1 vs. zero)
  • 42• Support for IMS Universal Drivers• Allows users to issue queries qualified on non-searchablefields and have a field’s position and length generatedautomatically in the qualified SSA• SQL• Universal Drivers will detect a non-searchable field in the whereclause based on database metadata and will internally convertthe SSAList qualification• DLI• Universal Drivers will detect a non-searchable field in theSSAList based on database metadata and will internally convertthe SSAList qualificationIMS12APAR PM69378PTF UK81917SSA Command Code “O”: Qualify by Position
  • 43IMS Universal Driver Additional Enhancements• Variable length segment support• VL segments contain a two byte length (LL) field that identify size ofthe segment instance• Universal Drivers are now sensitive to the LL field of a VL segmentand will manage the IO area of the segment instance on all CRUDcalls
  • 44Mapping Support• A Map is metadata that describes how a field, or set of fields, aremapped for a particular segment instance• Various mapping cases are captured in the metadata• defines the set of fields to be used for each case• Maps can be defined in the IMS catalog• Example:• Insurance segment mapped multiple ways depending on value of a‘Policy Type’ fieldPolicyTypePropertyTypeRooms Value Address Make Model Year Value ColorM - - - - Ford Escort 1989 2K RedH SingleFamily 5 500K555 DiskDrive Way,95141- - - - -
  • 45IMS Catalog Benefits• Trusted, online source for IMS metadata• Direct access to IMS metadata in the catalog• Leveraged by the Universal Database Drivers• No need for “local” Java metadata classes
  • 46Summary• IMS Catalog• Contains information about IMS program resources, database resources,and relevant application metadata• New ACBGEN• Used to auto-populate the catalog• The IMS Catalog: The Next Step in Simplification and Enterprise Integrationhttp://www-01.ibm.com/software/sw-events/teleconference/D108305C25358T22.html• IMS Enterprise Suite Explorer for Development• Generates DBD/PSB source used to populate the catalog• Enables IMS metadata discovery• IMS Enterprise Suite Explorer: The new face of IMShttp://www-01.ibm.com/software/sw-events/teleconference/T929253D59548D24.html
  • 47Two New IMS White Papers!!Download it today at ibm.com/imsDownload it today at ibm.co/PQ5Hdo
  • 48Become Part of Our Community!bit.ly/IMS_YouTubetwitter.com/IBM_IMS imsmadesimple.tumblr.comfacebook.com/IMSFansimslistserv.bmc.comibm.co/IMS_dWBlogslinkd.in/IBM_IMSwww.slideshare.net/ibmimsibm.com/vrm/newsletter/11069ibm.co/IMS_RUGs
  • 49