1. What is difference between PSB and DBD? Which one is required for an IMS program?
The data base description block contains macros that specify the name of the data base description, the storage and access methods used for the data base, the physical or logical structure of the data base, and the names of key or search fields.
The program specification block contains the program communication block. It also contains macros that specify the program's logical view of the database, the processing options for segments within the data bases accessed, and the programming language(s) that can use the program specification block. Another major function of the program specification block is security. It decides which data bases can be accessed, as well as how each segment within the database can be processed.
And both PSB and DBD are required for an IMS application program.
2. How IMS identifies, which database to access in JCL for an application program?
When IMS program gets executed, Program Name and PSB name is provided as parameters into EXEC step of DFSRRC00 like below.
//G EXEC PGM=DFSRRC00,REGION=&RGN, PARM=(DLI,&MBR,&PSB,&BUF,&SPIE&TEST&EXCPVR&RST,&PRLD,&SRCH,&CKPTID,&MON,&LOGA,&FMTO,
&IMSID,&SWAP,&DBRC,&IRLM,&IRLMNM,&BKO,&IOB,&SSM,'&APARM',&LOCKMAX,&GSGNAME,&TMINAME)
Also PSBLIB and DBDLIB is provided for IMS DD name
//IMS DD DSN=dbdlib,DISP=SHR
// DD DSN=psblib,DISP=SHR
PSB contains PCB, one PCB for each database. For examplePCB2.
PCB TYPE=DB,NAME=DPSPERSP ………
SENSEG NAME=PSEMPLRR,PARENT=0,PROCOPT=G PCB1
SENSEG NAME=PSDEPMTR,PARENT=PSEMPLRR,PROCOPT=GI
PCB TYPE=DB,NAME=DPSPAYRP……….
SENSEG NAME=PSEMPLYR,PARENT=0,PROCOPT=G
SENSEG NAME=PSPAYCKR,PARENT=PSEMPLYR,PROCOPT=K PCB2
These PCBs needs to be listed in application program in LINKAGE section in same order and also must be specified in USING in same order. Lets say these PCB masks are PCB1 and
Now if program wants to update DPSPERSP, it should use PCB1 to update the same. from DDNAME , it will get DBD to access.Then it searches DPSPAYRP dbd in DBDLIB.
DBDlib example:
DBD NAME=DPSPAYRP, ACCESS= (HISAM, VSAM)
DATASET DD1= FPSPAYRP, OVFLW = FPSPAYRO
SEGM NAME= PSEMPLYR, PARENT =0, BYTES =50
FIELD NAME = (EMPLYCOD, SEQ), BYTES =9, X
START = 1, TYPE =C
SEGM NAME = PSPAYCKR, PARENT = PSEMPLYR, BYTES =50
FIELD NAME = (PAYDATE, SEQ), BYTES =6, X
START =1, TYPE =C
FIELD NAME =PAYAMT , BYTES =4,START =7, TYPE =P
From DBDLIB it gets the DDNAME of dataset in JCL, which needs to be accessed/updated.In this case, FPSPAYRP ddname in JCL will be accessed.
3. What is difference between Basic and symbolic checkpoint?
Basic Checkpointing:
All programs can use the Basic method, it is the only checkpoint method available to MPP?S, or online programs. The application program must provide its own method of restarting, because the extended restart call is not supported. Neither OS/VS nor GSAM files are supported with the Basic checkpoint method. It is your responsibility to provide an 8-character checkpoint ID and to increment it as processing dictates. A message is sent to the master console, as well as to the JES log, with the checkpoint ID and a date and time stamp. You will need this information, if a checkpoint restart becomes necessary. A major disadvantage of the Basic checkpoint method is that you cannot change anything in your program prior to restarting.
Thus, it can be used in DL/I, BMP and MPP program. IMS resources are released. Database changes are permanent. Programmer must provide restart logic to restore variables and database position.
Symbolic Checkpointing:
Only BMP and batch programs can use this method. Up to seven I/O areas can be saved with Symbolic checkpointing. Symbolic checkpointing uses the extended restart call. For information to be saved during execution, and then later restored upon restarting, the variables will be saved in the log file every time a checkpoint call is issued. Then, when the program is restarted with the extended restart (XRST) call, the variables will be restored from the log file created during the first execution.If a restart was requested, the XRST call automatically restores all of the variables you declared in the checkpoint area. It also restores the position in all data bases and GSAM files at the current position when that checkpoint was taken. (IMS does this by issuing internal GU calls).
No comments:
Post a Comment