3845788 frequently asked questions for ims

Upload: eanandanbe4041

Post on 10-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 3845788 Frequently Asked Questions for IMS

    1/2

    Frequently Asked Questions for IMSWhat is the advantage of IMS over DB2?

    IMS is much faster than DB2, despite the improvements in DB2 since the mid 80's, and is stillused heavily for high-speed transaction processing - airlines, banks, and tracking systems. Thenumber of IMS installations throughout the world is still increasing.

    How can I tell if my IMS database is broken?Records in an IMS database are accessed by using pointers. There are forward and backwardpointers in the data portion of the database. During update, insert, delete transaction that abendsin-flight, pointers may become corrupted. An unload of the database using BMC Unload plus willtell you if you have pointer errors because this follows the forward pointer chain. To recover fromthis situation you will need to go back to your last good image copy and recover. CICS or batchprocessing will have to be rerun or recovered with logs to get the data back to the point before thein-flight transaction abended. An image copy does NOT indicate if a database has invalidpointers.

    What is the difference between an HDAM and HIDAM IMS database?A HIDAM database uses a separate index file based on the keyfield of the root segment. This filecontains the pointer information that points to the data record. An HDAM file has no separateindex file, however, the key field for each record is put thru a randomizer which puts the record toa specific location in the database.

    What does DBCTL do?DBCTL is an address space, which accesses IMS files on behalf of CICS Transactions. IMS files,PSBs, DBDs, and ACBs are genned into DBCTL for file access. When a CICS program issues anIMS call, the IMS processing is transferred to DBCTL to be executed with a result set being sentback.

    What is the purpose of a secondary index in IMS?A secondary index is an alternate path into you IMS database. Fields from an IMS segment areput together to form a key into that segment. A secondary index file may be used as a file itself toget pertinent data.

    I have an IMS program that currently reads and prints information from an IMS database. I now

    need to update the database from this program. What needs to be done apart from the programchanges?

    You need to request the DB group to change the segment sensitivity of the PSB. Also, if anydifferent segments on the database need to be processed, we need to know so that theappropriate access may be granted.

    Who could explain to me about IMS DB Calls (Function Codes and Call Format), Status Codes,SSA's, Command Codes, Boolean Qualification, and Relational Operators?

    Contact Database Management Group and ask for IMS DBA.

    Frequently Asked Questions for DB2Why do we need to code COMMITS in our batch programs?

    You want to have commit statements in your programs because when you COMMIT you release

    locks held for that unit of work and allow for a new unit of work to begin. If you didn't codecommits and your program abends well into the processing, instead of just trying to roll back afew inserts since the last commit it has to roll back all the inserts made during the entire run of theprogram. Usually figure about 2 to 2.5 times the amount of time to rollback that it took to get tothe point of abend. There are some exceptions to the above rule.

    How do I communicate with DB2?There are three methods of communicating with DB2. They are static SQL, embedded dynamicSQL, or the Call Level Interface (CLI).

  • 8/8/2019 3845788 Frequently Asked Questions for IMS

    2/2

    Static SQL: SQL statements, embedded within a program that are prepared during the programpreparation process (before that program is executed). After being prepared, the SQL statementdoes not change (although values of host variables specified by the statement might change).Dynamic SQL: SQL statements that are prepared and executed within an application programwhile the program is executed. In dynamic SQL, the SQL source is contained in host languagevariables rather than being coded into the application program. The SQL statement can changeseveral times during the application program's execution.CLI: A callable application program interface (API) for database access, which is an alternative tousing embedded SQL. In contrast to embedded SQL, DB2 CLI does not require the user toprecompile or bind applications, but instead provides a standard set of functions to process SQLstatements and related services at run time.

    What is a deadlock or timeout in DB2?A deadlock occurs when two separate processes compete for resources held by one another. Atimeout is caused by the unavailability of a given resource. The sqlcode for a deadlock is -911 or-913.

    What is DRDA?Distributed Relational Database Architecture (DRDA) is a connection protocol for distributedrelational database processing that is used by IBM and vendor relational database products.DRDA comprises protocols for communication between an application and a remote relationaldatabase management system (RDBMS), and communication between RDBMSs. DRDAprovides the connections for remote and distributed processing.

    How do I find SQL performance problems prior to migrating programs to production?SQL Performance analysis should start as early as possible in the development cycle.Performance problems can reside within the SQL statements itself as well as the access paths.Prior to moving to production, you should run an Explain on each program and the access pathsshould be checked for possible performance problems. The PLAN_TABLE identifies where workis being performed within each access path. You can also use Platinum's Plan Analyzer tool to dothe Explain and get an interpreted report back instead of looking at the PLAN_TABLE entries andinterpreting them manually.

    How can I tell if my SQL statement is using an index?Do an explain on the statement or program which will give details as to the access path theoptimizer has chosen.

    Why do we have to run runstats in our test environment?If you don't the catalog columns will have default values in them, which may not reflect the realpicture.By using the default values the DB2 optimizer will not pick the best access path.

    I need to load production size tables into a test region, should I have my indexes dropped before Iload the tables, then request the indexes be recreated?

    No. It is usually more efficient to define all indexes before using the LOAD utility. The LOAD utility

    uses an efficient algorithm to build the DB2 indexes.In QMF, I only want the top ten rows from my QMF Query. What is the easiest way to do this?

    Use the ROWLIMIT option on your RUN command: RUN queryname (ROWLIMIT=10

    In QMF, how can I see what the Global Variables are set to?Enter SHOW GLOBALS on the QMF command line.