Professional Documents
Culture Documents
1. Define Database.
4. Describe IMS.
A. Segment is the smallest block of data, the DL/I can access from
the database (referred hereafter ‘DB’).
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.
A. 15 levels.
13. Discuss the three IMS Processing modes. – Batch (DLI), BMP, MPP.
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
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).
SENSEG NAME=EMPDATA,PARENT=0,PROCOPT=K
concatenated Key of all segments.
SENSEG NAME=WORKDATA,PARENT=EMPDATA,PROCOPT=G
END
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.
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.
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.
25. Describe the use of Command code field in a SSA. What are various
command codes in use?
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’
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.
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.
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.
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?
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.
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.
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:
‘GE’ – DL/I could not find the segment asked for. It could happen
after a GU, GN or GNP call.
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.
39. Explain the BMP program. Why and what was Check Pointing used?
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.
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. 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 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.
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.
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?
Where ‘DFSRRC00’ is the name of the IMS Batch module from IBM. The
‘pgmname’ is the name of the application program. The ‘psbname’ is the
name of the PSB for your application program.
Your installation may have a Model IMS Program Execution JCL,
which contains the standard IMS Libraries, So ask your DBA or Technical
Support person.
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:
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.
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.
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’.
51. Explain the IMS Region control program execution step along with all
possible parameters.
A. //RUN EXEC
PGM=DFSRRC00,PARM=(DLI,Pgmname,PSBname, , ,N00000, , , , , D, I, , B)
DBD
No.
No.
62. How can you identify a Online from Batch IMS program?
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.
Q. Specify the main Control cards often used in the JCL to run the IMS
application program.
//*
before any DLI call
//*
//STEPLIB DD DSN=IMSVS.RESLIB,DISP=SHR
//IMS DD DSN=IMSVS.PSBLIB,DISP=SHR
// DD
DSN=IMSVS.DBDLIB,DISP=SHR
//EMPLDB DD DSN=EMPLOYEE.MASTERDB,DISP=OLD
//PRINTDD DD SYSOUT=A
//SYSIN DD *
S 1 1 1 1 1 EMPDB
L U REPL
/*
//*
Q. Give a Sample JCL used to run the IMS Program NVUP99 in the BMP
mode.
/*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
//*****************************************************************
//*****************************************************************
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE RNN.GALAXY.UT93.BRIJC
DELETE RNN.ALERT.UT93.BRIJC
SET MAXCC = 0
//********************************************************************
//*****************************************************************
// PARM=(BMP,NVP99999,WRANP00B,,,N00000,,,,1,,,,CC10)
//IMS DD DSN=RNN.PRODIMSP.PSBLIB,DISP=SHR
// DD DSN=RNN.PRODIMSP.DBDLIB,DISP=SHR
//WRAPARM DD *
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
// PARM='NVP99999 ABENDED'
//WTOOUT DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//********************************************************************
//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.
EJECT
01 RACTL.
COPY RACTLV9.
EJECT
LINKAGE SECTION.
01 IO-PCB.
01 CDB-PCB.
sensitive to */
01 WS-RAP01-SSA1.
01 WS-RAP01-SSA1.
01 WS-RACTL-SSA.
01 WS-RAP03-SSA1.
01 WS-RAP03-SSA2.
01 WS-RAP22E-SSA.
EJECT
CDB-PCB - PSB
RACTL - IO-Area
WS-RAP01-SSA - Unqualified
SSA1
WS-RACTL-SSA - Unqualified
SSA2
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.