1. Define Database.
A. A Database
is a concept or a way of organizing Data using specialized software (called
DBMS) to resolve some of the problems found in conventional File Processing.
2. What are the various problems solved by using a database?
A. It solves the
following problems: Duplication of data and effort. Programmers need to know
the exact file structure. People looking at files to which they should not have
access to. Need for change in program during the data reorganization (organized
differently).
3. What are the main goals of building a Database?
A. Increase
Data Independence.
Maintain Data
Integrity.
Reduce Data Redundancy and
Increase data security.
4. Describe IMS.
A. It is an
acronym for Information Management System. It is a software product for
creating and managing the physical storage and retrieval of Data that is
organized using the Hierarchical Data Structure. However to access IMS
database, we need to use the Database Manager Interface Language - DL/I.
5. What are the basic components of Hierarchical Database Structure?
A. Segment is
the smallest block of data, the DL/I can access from the database (referred
hereafter ‘DB’).
Field is the
smallest unit of information in the Database. Segments are made up of fields.
Key fields are
used to sequence the segments because of this they are not allowed to be
changed. In contrast the search fields may be changed as needed, depending on
the program requirements.
6. How many Segment types are allowed to be defined under IMS?
A. 255
different segment types. i.e. 255 segments are allowed to be defined under a
single database.
7. How many levels of segments are allowed under IMS?
A. 15 levels.
8. How many occurrences are allowed for each Segment?
A. Can have
as many occurrences of each segment as needed, as long as storage medium can
handle. Multiple occurrence of a segment are referred to as Twins
9. Describe IMS Database record.
A. A Database
record is made up of only one occurrence of the Root segment ( Segment with no
parents) and all of its dependent segments (where the dependent segments are
the Child segments, Child of the child segments …, their twins and siblings
(segments with the same parent are siblings).
10. What is DL/I?
A. Data
Language I, referred to as DL/I is not a procedural language like COBOL, or
PL/I … DL/I is a set of IMS program modules that exist external to the
application program. DL/I allows the application program to retrieve the (data
fields in the) data segments from the database sequentially or directly.
11. What are the various IMS systems?
A. IMS
supports user written batch processing and telecommunication applications. The
IMS ‘Database Management Services’ will support multiple applications using the
common database. The database services system is called as IMS/DB System. The ‘Database
Communication Management services’ supports multiple terminal oriented
application programs to access a common database, called the IMS/DC System. The
combination of the two systems make the IMS DB/DC system.
12. Describe the process flow through various components of the IMS environment.
A. The
Process flow through various components for the Batch processing mode -
Application Program - DB PCB – DLI - IMS Database – DLI – DB PCB – Application
Program. Flow in the Online Processing mode is Terminal – IMS DC IO PCB –
Application Program – DB PCB – DLI – IMS Database –DLI – DB PCB – Application
Program – IO PCB – IMS DC - Terminal.
B. Application
Programs – The programs written in Languages such as COBOL, PLI by using the
standard calls to DL/I modules (rather than read and write through File
declares). DB PCB – It is the Program Communication Block that enables the
program to communicate with DL/I to get information from the database. DL/I –
It is a set of program modules that performs operations on the IMS database
when called by the Application programs. IMS Database – The heart of the IMS
system that contains all the data and usually resides on the Direct Access
Storage. I/O PCB - It allows the IMS/DC system to read or write information to
and from a terminal. IMS/DC is a set of programs that permit application
programs to communicate with other programs and/or remote terminals through the
standard calls.
13. Discuss the three IMS Processing modes. – Batch (DLI), BMP, MPP.
A. Batch
DL/I: No Data communication services or terminals are used. Transactions are
batch generated and saved in standard files. Application Program Run’s are
initiated by using JCL. Processing output is in a hard copy format. Databases
are accessed in the Off-line.
B. BMP mode –
A combination of Batch and Online Processing. There are two kinds of BMP ’s.
Transaction oriented: Access the online message queues. Process Input from and
output to OS/VS files and Databases. Batch Oriented: Access online databases in
batch mode, can send messages to the message queue, are scheduled by the
operator by using a JCL.
C. Teleprocessing
Program mode also called as Message Processing Program mode – Transactions are
entered at the terminal, transactions are put in the message queue file, IMS
scheduler immediately schedules the appropriate program to process the
transaction. Processing output may be in the form of hard copy format or back
as a screen message to the original or an alternate terminal. Databases are
accessed online.
14. What type of database structure is considered other than the Physical Database.
A. Logical Database - Represents the sequence of segments from one or more physical databases required by an application program, to process the DB. These segments are combined to create a new hierarchical structure. The Physical Database is described by using the DBD, the Logical Database is defined by PSB.
15. Describe the process of the creation of the Physical Database (Database Description Generation).
A. The
Physical database is usually defined by the DBA based on the following
information received from the database design team: The hierarchical structure
(the segment layout), the key fields, the search fields. DBA initiates a
process called DBDGEN to describe the physical structure of the database and
then create a DBD. In theory this
process need to be done only once. But in practice, as the Database evolves,
new segments are added, existing segments are expanded, by the addition or
modification of key fields or search fields. All these events require the new
DBDGEN process.
16. Give an example of a DBDGEN coded. Also explain the key fields of the code.
A. DBD NAME=EMPLOYEE,ACCESS=HIDAM Name of
the database is EMPLOYEE
DSGROUP0 DATASET
DD1=DDEMP,DEVICE=3380,SIZE=4096,FRSPC=(10,10) Physical
storage location of DB is DDEMP
SEGM NAME=EMPDATA,PARENT=0,BYTES=100 Root segment of 100
bytes long
FIELD NAME=(EMPID,SEQ,U),BYTES=11,START=1,TYPE=C SEQ Defines the field to be the key
field
FIELD NAME=EMPLNAME,BYTES=20,START=12,TYPE=C It’s a search field, as only name
is specified
FIELD NAME=EMPFNAME,BYTES=20,START=32,TYPE=C
SEGM NAME=WORKDATA,PARENT=EMPDATA,BYTES=200
FIELD NAME=(DEPTID,SEQ,U),BYTES=5,START=1,TYPE=C U Defines the field to be unique
FIELD NAME=DEPTNAME,BYTES=15,START=6,TYPE=C
SEGM … … … …
… … … …
…
DBDGEN Indication
to initiate the DBDGEN process
FINISH
END
DBDGEN is processed only by the DBA, but a programmer need to know about the code for determining the key fields and search fields available on the various segments of the Database. If you use Access method HDAM, then you need to specify randomizer as RMNAME=(DFHDC40,r,mmmm,nnnn), where r is # of RAP’s (root anchor point) per block (say 3), mmmm (say 5000) > nnnn (say 1000). nnnn - # of blocks per RAA (Root addressable area).
17. Understand the purpose and recognize the components of PSBGEN. Define the process.
A. The Design
team (Analysts and Programmers) decides what logical structure is needed by
each program to access the database. A PSB is a Control Block made up of one or
more PCB’s that defines the Logical data structure, the Program uses to access
the DB. PSBGEN Process produces a Load
module called PSB stored in the PSBLIB Library. While, many applications can
share the same PSB, But each application Program can use only one PSB.
B. The
Program Specifications Block (PSB) supplies IMS with a description of what
database information (which database segments) may be accessed by the
application program. The Program Communication Block defines, which segments in
database, a Program is sensitive to (can access). PCB also specifies how the Program is allowed to process
segments, which is done via process options (PROCOPT).
18. Explain the various Process options (PROCOPT ‘s) available.
A. G – Get (Read). I – Insert. R – Replace. D – Delete. A – For all options (GIRD)
{D & I needs
a G}. O – Only (used with the option G
to indicate that the get Hold calls are not allowed).
K – access only
to Key field. L –
Load (initial data load), LS – load HIDAM P – Path Calls.
19. Give an example of a PSBGEN for the creation of PCB ‘s in the PSB to create Logical Database.
>A. PCB TYPE=DB,DBDNAME=EMPLOYEE,KEYLEN=16 The
Keylen parameter specifies the length of longest
SENSEG NAME=EMPDATA,PARENT=0,PROCOPT=K concatenated Key of all
segments.
SENSEG NAME=WORKDATA,PARENT=EMPDATA,PROCOPT=G
> PSBGEN LANG=COBOL,PSBNAME=EMPPSB1 PSBNAME is
usually same as main application name.
END
20. When Coding an IMS application program, what makes it different from the Non-IMS programs?
A. The major
difference lies in the way of the IMS components are coded. The IMS components
coded in general are Entry variable’s statement, Function Codes, Segment Search
Argument, Input/Output Area, Program Communication Block mask, Exit Statements,
DL/I call Statements, and Status Code check.
21. Explain the purpose of the I/O Area definition in a program.
A. I/O Area holds the
standard Record Description, which holds the database segments for
manipulation, used by DL/I to pass segment data to your programs. It can be
used by programs to add or replace data. In some cases multiple segments in a
parent child relationship can be retrieved or inserted together, in which case
the I/O area should be large enough to hold the largest concatenation of these
segments for path calls.
22. Explain Program Communication Block Mask defined in the IMS Programs.
A. The PCB
Mask is the area common to the (COBOL) Application program and DL/I. It is used
to pass information about each DLI call back to the program. You need to code
one PCB Mask with unique 01 level name for each Database being accessed by the
program,
23. Explain the purpose of the Segment Search Argument (SSA). Define it.
A. SSA are used to
let the IMS know the name of the segment type you want to retrieve, Description
of specific segment (key or search fields), one or more Command codes to
qualify the DL/I Call even more.
B. A SSA is a
declared structure used to identify the segments to be accessed for the program
process. It’s an optional DLI call parameter used to specify a particular
segment or a segment occurrence. SSA always follows the I/O area parameter.
There may be one to fifteen SSA ’s specified in the Hierarchical order of the
Segment type in a Call statement. SSA contains information of the Segment name
to be retrieved, or segment name and segment key with a specific value or name
and search field with a value.
24. What are the different types of SSA’s ?
A. Unqualified
SSA – Searches for a specific Segment type. It specifies only the Segment name
(as defined in logical DB) (followed by blank) as argument. Calls made
using this SSA will access data Sequentially.
B. Qualified
SSA – Searches for a specific Occurrence of a specific segment. It specifies
the segment name and the Key or Search field with a field value along with
relational operator to retrieve the necessary Segment type occurrences. It
allows access to the database segment directly.
25. Describe the use of Command code field in a SSA. What are various command codes in use?
A. Through the info in SSA, we inform what Segments are to be
accessed. Command code in SSA is used to define the action to be performed by
the DLI for segment retrieval. The initial value of a command code is ‘*-‘ .
The ‘-‘ indicates a null command code. Other codes used are D – Retrieve a
Path, F - access First Segment Occurrence, L - access last segment occurrence,
U - Maintain current position at this level, V - Maintain current position at
this and higher levels, N – Do not replace this segment, C – use a concatenated Key, P – establish parentage at this
level, - - Null or ignore. Command codes can be useful to go to certain
occurrences of the segment and avoid some coding in a program.
26. What are the various parameters / arguments used to interpret the DL/I call requirements?
A. The Four Parameters passed by
using the DL/I calls are in the following order. Note that some of the
parameters may repeat, but should always follow the order. (One function code,
One PCB Mask and One I_O Area Per Call. One or multiple SSA’s as needed to
retrieve the desired segments).
‘CALL CBLTDLI
USING Function_Code PCB_Mask
I_O_Area SSA’
27. Explain the purpose of Function Code.
A. A Function Code is
Four Character field that tells the DL/I the necessary action to be taken on
the segment (referred to by using the information passed through other Call
Parameters). Function codes used mostly are: GU, GN, GNP (Get Next within
Parent), GHU, GHN, GHNP, ISRT, DLET and REPL.
28. Explain the purpose of the Function codes GU, GN and GNP.
A. GU – It is used to
retrieve a segment directly or position itself on the database by using the
qualified SSA‘s. If SSA is not specified, the GU call will position itself at
the 1st root segment and returns its contents to I/O area.
B. GN – It is used to
sequentially access segments in a DB. DLI uses the current segment position set
by the previous call as the starting point of the search for the requested
segment. So, you can use GN with a qualified SSA, or unqualified SSA or even
with No SSA. With an unqualified SSA, the GN call would retrieve the next
occurrence of the segment type specified in the SSA. A GN with a qualified SSA
starts at the current DB Position and does an implied GU for the SSA. With GN
and GNP the DLI will build unqualified SSA’s for the missing levels defined
through the SSA’s used by the call.
C. GNP – Get Next
within Parent is used to access Dependent segments of an established Parent
segment. We need to establish the Parentage by a GU or a GN call, prior to a
GNP. You can also use the ‘P’ Command code in the GU, GN, or a GNP call to
establish the parentage.
29. Explain the Status Code Field in the PCB Mask. Which are the most widely found status codes.
A. The value of the
(two alphanumeric) Status code in the PCB Mask reflects the Status (success) of
the DLI call. It also contains specific code for each type of unsuccessful
calls. ‘ ‘ (blank) indicates a
successful call, ‘GE’ indicates the segment specified through SSA could not be
found on DB, ‘GB’ Specifies that the End of DB has been reached. ‘DA’ – issued
for a REPL call as Tried to change the Key field by REPL call. ‘RX’ – Violated
the replace rule such issued GU instead of GHU prior to REPL call. ‘II’ issued
after a ISRT call indicating the Segment already exists. ‘DJ’ – Get Hold not
issued before a DLET, ‘DX’ – The DLET call violated delete rule defined for the
segment in the DBD.
30. How do you retrieve a wanted segment and all of its Higher Level Segments into the I/O area without having a need to call for each Segment? Give an example. Explain.
A. By Issuing a PATH
CALL. A Path Call is created by issuing the ‘D’ (Path) Command code in the SSA.
In order to allow the Path Calls the DBA must modify the PSB to add
‘PROCOPT=P‘.
Ex. GN SEGMENTA *D(AKEY
=1) (Defined
through SSA1)
SEGMENTB *D(BKEY=2) (Defined
through SSA2)
SEGMENTC *-(CKEY=5) (Defined
through SSA3).
31. What is the primary reason for using a Get Hold Function code in a DLI Call before modifying data?
A. For Maintaining
the Data integrity. The GH call puts a lock from any other Update-Intent by
other programs. The Hold is released the next time a call is made to the same
PCB Mask again. So, the next call after a successful GET HOLD call should be a
REPL or DLET else the delete or replace will fail.
32. Are SSA’s need to be defined in a REPL call.
A. SSA’s are not
normally used with the REPL Function call, as DL/I gets this information from
the I/O area, which gets the information, from the previous Get Hold call.
However when the ‘N’ command code (for ignore – Do not replace segment command
code) is to be used with REPL call (after GHU Path call), SSA’s are to be
defined on REPL DL/I call.
33. What is the difference between the Load Mode and Insert Mode?
A. We define the
whether the Mode of addition of data is through ‘Load’ or ‘Insert’ through the
PROCOPT (‘L’ or ‘I’) of the PSB Definition. The Two PROCOPT allowed in Load
mode are L and LS. LS is preferred, as the Load is specified to be done in
Ascending Sequence. The PROCOPT allowed in Insert mode are I and IS. IS PROCOPT
is used to indicate that the Add of new segment is only through the Ascending
Sequence. Segments can be added to all Database types except HSAM.
34. Explain the Sequence of steps followed during the Insert Process of a segment.
A. The Segment to be
inserted must first be built in the I/O area. Use the SSA’s to define the Path
to a call. In order to insert the Path of all segments use the ‘D’ Command
code. Use an unqualified SSA at segment levels where the insertion will occurs.
Rest of the SSA’s are to be qualified, if segments exist.
B. New Segments added
to an existing DB are inserted based on the Segment Key field. Segments with
Key field can be inserted in Key Sequence. Segments with non-unique key will be
inserted in accordance to the Insert rules specified in the DBD. Note that
there is no need for Get Hold Call before ISRT.
35. Explain the Insert rules options in a DBD.
A. FIRST – Tells the
DL/I to place the segment First, i.e. the first occurrence of the segment type.
LAST – Tells the
DL/I to place the segment Last in the twin chain (last occurrence of this
segment type). HERE – Tells the DL/I to place the segment before the Current
segment occurrence position; If the current position is not established, the
segment is placed first on the twin chain of the segments.
36. Do you have to specify SSA’s for a DLET call.
A. Normally a SSA is
not specified with a DLET call. However you may have a situation to have a Path
call using the Get Hold Function code. In this instance you nee to specify only
one unqualified SSA, to delete the segment mentioned and all it’s Dependants.
Note that No command codes apply to a DLET call.
37. Explain the way Status Codes of DLI calls are handled in an IMS Program.
A. Your program
should always check the status code after a DLI call, to verify whether the
call is successful. There are over 100 status codes of which only a few are
used most often used, which are:
‘GA’ – The DL/I
has returned a Segment, but that is at a higher level in hierarchy than the
last returned segment. It is issued only for unqualified ‘GN ‘ call.
‘GB’ – End of
Database reached. Therefore could not return a segment thru’ I/O area to the
program.
‘GE’ – DL/I could
not find the segment asked for. It could happen after a GU, GN or GNP call.
‘GK’ – DL/I
returned a segment that satisfies as unqualified ‘GN’ or ‘GNP’ call, but is a
different segment type than the last segment that was returned (but at the same
level).
When you receive
an un expected Status code you should send the control to a Error routine,
which ensures to save the important information needed to aid in determining
the problem. Based on your shop policy you may have to Abend or just suspend
the current application after roll back of unwanted data.
38. What are the better methods to be followed for the IMS Segment Access.
A. The four Key areas
to consider in accessing the segments efficiently are during the ISRT calls,
Segment Search Argument, Hierarchical Access, and Search Fields. ISRT CALLS –
Instead of issuing a ISRT call after the Get Unique call to position on the
database, it is better to just call the ISRT with appropriate SSA’s without the
GET call. Hierarchical Access – Take the advantage of the Hierarchical
structure while retrieving data, by coding the D/I calls in a manner consistent
to record and segment relationships. Know your Current Position, Know that
segment is the parent and then access segments in DB by using the Top to Bottom
and then Left to Right. Qualified SSA’s are to be used wherever possible. The
fewer DLI calls your program makes the more efficient it will be. If you want
to retrieve based on fields other than Key fields then Define and use Search
fields, instead of using multiple calls and IF’s.
39. Explain the BMP program. Why and what was Check Pointing used?
A. A BMP is a Batch
application program running under the control of the On-Line control region.
The advantage of BMP over the Batch processing mode is the High availability of
the DB. The disadvantage of BMP over Batch processing is the more complicated
process of Restart procedures. This needs check pointing. A Check point call is
the means by which the programs indicate to IMS the synchronized points. This
is the point where the application program commits the data it has modified or
created, ensuring that it is consistent and complete.
40. Why do we use the Check Point Calls and Restart?
A. The Check Point
(‘CHKP’) call is issued for data release to DB and setup a new Sync point for
data recovery. XRST call is issued to restart a Call from the last Sync Point
on DB, in the event of ABEND.
41. Define the various steps that happen as a result of Checkpoint (‘CHKP’) Call.
A. IMS commits
database updates and send messages which had been previously stored in the
buffer. The Database position is reset
to the beginning of the DB.
A new
synchronization point is set for backing out database changes and sending
messages.
42. What are the two different types of Check Point calls? Explain.
A. They are
BASIC and SYNBOLIC. Both the Check point calls include: The DLI Call function code ‘CHKP’. The name of the I/O PCB, The
name of the I/O area with the Checkpoint ID.
In addition to
the above three, the Symbolic call allows you to save as many as seven data areas
in your program. The length and name of each data area you want saved are
passed to DL/I as additional parameters of the Checkpoint call.
In Batch, Check pointing is mostly used for long running Jobs. The Check pointing frequency may after updating a certain number of segments (set by DBA) or usually varies between 15 minutes to 1 hour. For allowing more or less M/C time used respectively. And For allowing less or more Recovery time needed in case of ABEND respectively.
43. Explain the IMS Batch Program Preparation process, after coding it.
A. Compile the Batch
Application program by using the Language Compiler. Then we need to Link-Edit
it by using the IMS Supplied Interface Modules ‘DFSLI000’, to the
batch program that has been compiled. You can also use IBM supplied Procedure,
that Link-Edits the interface module with your program. Most installations
provide TSO Panels and CLISTs to make this process transparent. Now your
program is actually a subroutine that calls other subroutines, and which is called
by IMS, …
44. Explain the reason why the Compiled and Link-Edited IMS program is considered to be a Subroutine.
A. There are two ways
to tell the operating system, that your program is a Subroutine.
1. PROCEDURE
DIVISION USING PCB1,PCB1
2. An Entry Statement (With a Pointer to PCB as
in COBOL with ‘ENTRY DLITCBL USING PCB1,PCB2’).
All the IMS
Programs ends with ‘RETURN’ when written in PLI or with ‘EXIT PROGRAM’ in
COBOL.
45. What does a IMS Program Exec JCL Step looks like?
A. //STEP1 EXEC PGM=DFSRRC00,PARM=(DLI,pgmname,psbname)
46. How do you test an IMS Program?
A. Your installation
may have special Testing tools, such Client customized tools or ‘SmartTest’.
However IBM
supplies a testing tool called ‘DFSDDLT0’. DLT0 as it is called
in short is a DL/I test program, which executes the DL/I calls you specify for
a given Database. DLT0 can be used test DL/I calls without running the
application program. It can be used to Insert, Replace or Delete records in DB.
DLT0 can also be used for Retrieve (DUMP) records from a DB. Debug an
application program. However for using DLT0, you will need a PSB.
47. What are the different Control statements used to tell DLT0 about the DL/I calls to be executed?
A. To tell DLTO the DL/I call you want to
execute, you can use four types of control statements as:
1. STATUS - establishes print options for DLTO’s
output, and selects the DB PCB.
2. COMMENT - allows comments for documentation
purposes.
3. CALL - indicates the call you want to
execute, any SSAs you want to use with the CALL,with how many times you want
the call executed.
4. COMPARE - tells DLTO to compare results of
the CALL with the results you supply here.
5. In addition to the above four control
statements, there is a DATA Statement that provides IMS with the Segment
information for ISRT and REPL Calls.
48. What Kind of errors could you have that caused by the code (or failed)?
A. By using
the DEBUG Process we can determine the reason for the unwanted process by the
Code.
They could
be an unexpected status code, A program ABEND, or an incorrect segment
retrieval.
49. What information does IMS provide to DEBUG the IMS Program code.
A. We can use the PCB mask to identify the reason for the Program
failure. Refer to CDB_PCB coded latter.
50. What other methods are used to DEBUG a program in addition to the checking of the PCB mask.
A. One can also use
‘STAT’ Call to request the stats for # of Reads and Writes by the program. Or
by using DLITRACE – Control card that
executes on any IMS program with the Trace program ‘DFSDLTR0’.
DLITRACE needs a control statement DFSVSMP dataset in
your execution JCL, to show you exactly what DL/I calls your IMS application
program made.
51. Explain the IMS Region control program execution step along with all possible parameters.
Where D –
DBRC indicator, I – IRLM indicator, B -
Back-out indicator, which could have the values of Y or N or space for
null. Note: The # of Parameters passed along with the IMS Region
Controller Module DFSRRC00 contains 13 commas.
52. What is the Physical Nature of a Database called?
DBD
53. Is it necessary that all segments in a DLI have key fields?
No.
54. Is it necessary to define all the Key fields as Unique?
No.
55. What is a Key field in IMS?
A field used to Maintain the segments in
Ascending order.
56. What is a Root?
A segment at the top of Hierarchy with
no Parent is Root.
57. What is the Acronym for RAP?
Root Anchor Point.
58. What is a database record in IMS?
Single occurrence of Root and all its
dependent Segments.
59. What are twins?
Occurrences of segment types as child under single parent.
60. Define a Parent.
Segment that has one or more segments
(dependent) directly below it.
61. What is a segment type?
Loosely speaking a Segment type is a
Segment in a DL/I Hierarchy.
62. How can you identify a Online from Batch IMS program?
By looking for the declaration of
IO-PCB.
63. Which DLI Function is used in CICS-IMS Program?
‘PCB ‘ to initiate and ‘TERM’ to
terminate.
64. What is Hierarchy Chart?
A. A Hierarchy chart is a pictorial representation of the total of a DL/I database starting from the root, giving all the parent child relationships that exist within the database
65. What steps are involved in the REORG operation
of a HDAM IMS database when Root anchor points are changed?
A. 1. Unload data
using the current DBD into a dataset. 2.
Delete and Defined the underlying dataset of DBD. 3. Reload Data using the newly defined DBD with new RAP’s. 4.
Rebuild any secondary indexes.
66. What is a PSB?
A. Program specification block.
Information about how a specific program is to be access one or more IMS DB. It
consist of PCB(Program Communication Block). Information to which a segment in
DB can be accessed, what the program is allowed to do with those segment and
how the DB is to be accessed.
67. Define ACB.
A. Access
Control Blocks are generated by IMS as an expansion of information contained in
the PSB in order to speed up the access to the applicable DBD's.
Q. Specify the main Control cards often used in the JCL to run the IMS application program.
Q. Give a Sample dlt0 JCL with control cards to REPLACE a segment on EMPLOYEE database:
//*
Q. Give a Sample JCL used to run the IMS Program NVUP99 in the BMP mode.
//NVUP99 JOB (NVUP99,'BRIDGE MODULE
'),'2428',MSGLEVEL=1,MSGCLASS=A,CLASS=C
/*JOBPARM S=SW92
//PROCS JCLLIB
ORDER=(RNN.ALERT.PROCLIB,RNNS01.ALERT.PROCLIB)
//*----------------------------------------------------------*
//JOBLIB DD
DISP=SHR,DSN=SYS1.RUN.PLI
// DD
DISP=SHR,DSN=SYS1.RUN.COBOL
// DD
DSN=RNN.GALAXY.PREMIUM.LINKLIB,DISP=SHR
//*****************************************************************
//*
DELETE DATASETS FROM PREVIOUS JOBS
*
//*****************************************************************
//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE RNN.GALAXY.UT93.BRIJC
DELETE RNN.ALERT.UT93.BRIJC
SET MAXCC = 0
//********************************************************************
//*
RUN NVP99999. PURPOSE: CONVERT ACXIOM FILE TO NOVA/ALERT INPUT FILES
*
//*****************************************************************
//PROPRUN EXEC PGM=DFSRRC00,REGION=4096K,
// PARM=(BMP,NVP99999,WRANP00B,,,N00000,,,,1,,,,CC10)
//IMS DD DSN=RNN.PRODIMSP.PSBLIB,DISP=SHR
// DD DSN=RNN.PRODIMSP.DBDLIB,DISP=SHR
//WRAPARM DD *
1 NVP99999 A WRANP00B
RNN N
PARMROC=RNN
//*
//INPUTI DD DSN=RNN.REGION.CALITV.INPUT(0),DISP=SHR
//EXTRCTO1 DD
DSN=RNN.ALERT.UT93.BRIJC,DISP=(,CATLG,DELETE),SPACE=(80,(100,100)),
//
DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=0),UNIT=DISK
//EXTRCTO2 DD
DSN=RNN.GALAXY.UT93.BRIJC,DISP=(,CATLG,DELETE),SPACE=(534,(100,100)),
//
DCB=(DSORG=PS,RECFM=VB,LRECL=534,BLKSIZE=0),UNIT=DISK
//WRAMSGS DD SYSOUT=A
//SYSABEND DD SYSOUT=A
//SYSABOUT DD SYSOUT=A
//SYSOUT DD SYSOUT=A
//PLIDUMP DD SYSOUT=A
//WTOOUT DD SYSOUT=A
//* CHECK NVP99999 *
//ABEND EXEC PGM=U0016,COND=(12,GT,PROPRUN),
//
PARM='NVP99999 ABENDED'
//WTOOUT DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//* LOAD NOVA FILE TO PU330 JOB *
//LPU330 EXEC PU330LIN,INDD='RNN.GALAXY.UT93.BRIJC'
//* CREATE GDG FOR ALERT FILE *
//ALERTGDG EXEC PGM=IEBGENER
//********************************************************************
//SYSPRINT DD SYSOUT=X
//SYSUT1 DD
DISP=SHR,DSN=RNN.ALERT.UT93.BRIJC
//SYSUT2 DD DSN=RNN.ALERT.UT93B(+1),DCB=(DSORG=PS,RECFM=FB,LRECL=80),
// UNIT=DISK,DISP=(,CATLG,DELETE)
//SYSIN DD DUMMY
/*
//*
Q. Give an example of a Sample W-S Section and DLI calls covering IMS related identification code.
A. WORKING-STORAGE
SECTION.
01 RAP01. RAP03. RAP22E.
COPY RAP01V9. COPY RAP03V9. COPY RAP22EV9.
EJECT
01 RACTL.
COPY
RACTLV9.
EJECT
LINKAGE SECTION.
01
IO-PCB.
05 FILLER PIC
X(08).
05 IO-PCB-SEGNO PIC X(02).
05 IO-PCB-STATUS PIC X(02).
01
CDB-PCB.
05 FILLER PIC
X(08). /* DBDNAME */
05 CDB-PCB-SEGNO PIC X(02). /* last Segment level,successfully retrieved*/
05 CDB-PCB-STATUS PIC X(02). /* Status Code */
05 CDB-PCB-PROCOPT PIC X(04). /* Proc Options */
05 FILLER PIC X(04). /*
IMS Address (reserved for internal use*/
05 CDB-PCB-SEGNAME PIC X(08). /* Last Segment name */
05 CDB-PCB-KEYL PIC S9(09) COMP. /*
max key length of all segments accessed */
05 CDB-PCB-NUM-SEG PIC S9(09) COMP. /* # of Segment types the program is
sensitive to */
05 CDB-PCB-KEY-FB-AREA. /* Segment Keys from Root
key*/
10 CDB-PCB-POLICY PIC X(15).
10 FILLER PIC X(13).
01 WS-RAP01-SSA.
05 FILLER PIC
X(09) VALUE 'RAP01 *'.
05 WS-RAP01-SSA-CMD1 PIC
X(01) VALUE '-'.
05 WS-RAP01-SSA-CMD2 PIC
X(01) VALUE '-'.
05 WS-RAP01-SSA-CMD3 PIC
X(01) VALUE '-'.
05 FILLER PIC
X(01) VALUE ' '.
01 WS-RAP01-SSA1.
05 FILLER PIC X(09) VALUE 'RAP01 *'.
05 WS-RAP01-SSA-CMD1 PIC
X(01) VALUE '-'.
05 WS-RAP01-SSA-CMD2 PIC
X(01) VALUE '-'.
05 WS-RAP01-SSA-CMD3 PIC
X(01) VALUE '-'.
05 FILLER PIC X(08) VALUE ' '.
01 WS-RAP01-SSA1.
05
FILLER PIC X(09)
VALUE 'RAP01 *'.
05
WS-RAP01-SSA2-CMD1 PIC X(01)
VALUE '-'.
05 WS-RAP01-SSA2-CMD2 PIC X(01) VALUE '-'.
05
WS-RAP01-SSA2-CMD3 PIC X(01)
VALUE '-'.
05 WS-RAP01-SSA2-LPAREN PIC X(01)
VALUE '('.
05 FILLER PIC
X(08) VALUE 'PLCY '.
05 WS-RAP01-SSA2-OP1 PIC
X(02) VALUE 'EQ'.
05 WS-RAP01-SSA2-PLCY PIC
X(15) VALUE SPACES.
05 WS-RAP01-SSA2-RPAREN PIC
X(01) VALUE ')'.
01 WS-RACTL-SSA.
05 FILLER PIC
X(09) VALUE 'RACTL *'.
05 WS-RACTL-SSA-CMD1 PIC X(01) VALUE '-'.
05 WS-RACTL-SSA-CMD2 PIC X(01) VALUE '-'.
05 WS-RACTL-SSA-CMD3 PIC X(01) VALUE '-'.
05 FILLER PIC X(01) VALUE ' '.
01 WS-RAP03-SSA1.
05
FILLER PIC X(09)
VALUE 'RAP03 *'.
05
WS-RAP03-SSA1-CMD1 PIC X(01)
VALUE '-'.
05 WS-RAP03-SSA1-CMD2 PIC X(01)
VALUE '-'.
05
WS-RAP03-SSA1-CMD3 PIC X(01)
VALUE '-'.
05 FILLER PIC
X(01) VALUE ' '.
01 WS-RAP03-SSA2.
05
FILLER PIC X(09)
VALUE 'RAP03 *'.
05
WS-RAP03-SSA2-CMD1 PIC
X(01) VALUE '-'.
05 WS-RAP03-SSA2-CMD2 PIC
X(01) VALUE '-'.
05
WS-RAP03-SSA2-CMD3 PIC X(01)
VALUE '-'.
05 WS-RAP03-SSA2-LPAREN PIC
X(01) VALUE '('.
05 FILLER PIC
X(08) VALUE 'ADDDT '.
05 WS-RAP03-SSA2-OP1 PIC
X(02) VALUE 'EQ'.
05 WS-RAP03-SSA2-P03ADDT PIC
S9(05) COMP-3 VALUE 99999.
05
WS-RAP03-SSA2-RPAREN PIC X(01) VALUE ')'.
01 WS-RAP22E-SSA.
05 FILLER PIC X(09)
VALUE 'RAP22 *'.
05 WS-RAP22E-SSA-CMD1 PIC X(01) VALUE '-'.
05 WS-RAP22E-SSA-CMD2 PIC X(01) VALUE '-'.
05 WS-RAP22E-SSA-CMD3 PIC X(01) VALUE '-'.
05 FILLER PIC X(08)
VALUE 'DROPDT '.
05 WS-RAP22E-SSA-OP1 PIC X(02) VALUE 'EQ'.
05 WS-RAP22E-SSA-P22EDPDT PIC S9(05) COMP-3 VALUE 99999.
05 WS-RAP22E-SSA-BOOL1 PIC X(01) VALUE '&'.
05 FILLER PIC X(08)
VALUE 'PROPTP '.
05 WS-RAP22E-SSA-OP2 PIC X(02) VALUE '= '.
05 WS-RAP22E-SSA-KEY1 PIC X(02) VALUE 'A '.
05 WS-RAP22E-SSA-RPAREN PIC X(01) VALUE ')'.
EJECT
PROCEDURE DIVISION USING
IO-PCB CDB-PCB.
CALL 'CBLTDLI' USING WS-GU-FUNC - Function
CDB-PCB - PSB
RACTL - IO-Area
WS-RAP01-SSA - Unqualified SSA1
WS-RACTL-SSA - Unqualified SSA2
CALL
'CBLTDLI' USING WS-GU-FUNC CDB-PCB RAP01
WS-RAP01-SSA1
Result after this call: Set the pointer to the first occurrence of
RAP01 in the Database. 1ST Time use unqualified SSA and then onwards
use a qualified SSA.
CALL
'CBLTDLI' USING WS-GNP-FUNC
CDB-PCB RAP22E WS-RAP03-SSA2 WS-RAP22E-SSA