Joined: 09 Sep 2005 Posts: 124 Topics: 52 Location: Chicago
Posted: Wed Jul 19, 2006 3:58 pm Post subject: Segments in the database
Hi All,
Could any please let me know, whether there is any method from which i can know how many parent segments or child segments under a particular parent segment or total child segments... are existing in a database
If in your System you have access to the DBD Source Dataset which is generated after doing a DBDGEN process then that dataset would contain the physical structure of the Database.And in that you can look out for SEGM parameter which will list out all the segments in hierarchial way with the individual fields description .A sample code:
Code:
DBD NAME=ABCDEDBD, X
ACCESS=(HDAM,VSAM), X
RMNAME=(DFSHDC40,9,53,364)
DSGROUP0 DATASET DD1=ABCDEDBD, X
DEVICE=3330, X
SIZE=(4096), X
SCAN=3
SEGM NAME=ABCDSEGM, X
PARENT=0, X
BYTES=207, X
FREQ=500, X
PTR=(T), X
RULES=(,LAST)
FIELD NAME=(KEMS,SEQ,U), X
BYTES=6, X
START=1, X
TYPE=C
FIELD NAME=NEML, X
BYTES=30, X
START=7, X
TYPE=C
FIELD NAME=KDIV, X
BYTES=2, X
START=81, X
TYPE=C
SEGM NAME=EFGHSEGM, X
PARENT=((ABCDSEGM,SNGL)), X
BYTES=17, X
PTR=(T), X
RULES=(,LAST)
FIELD NAME=(KHCD,SEQ,U), X
BYTES=9, X
START=1, X
TYPE=C
FIELD NAME=CHCD, X
BYTES=8, X
START=1, X
TYPE=C
FIELD NAME=CDYN, X
BYTES=1, X
START=9, X
TYPE=C
SEGM NAME=PQRSSEGM, X
PARENT=((EFGHSEGM,SNGL)), X
BYTES=55, X
PTR=(T), X
RULES=(,LAST)
FIELD NAME=(KDMD,SEQ,U), X
BYTES=1, X
START=1, X
TYPE=C
FIELD NAME=CEMS, X
BYTES=2, X
START=5, X
TYPE=C
FIELD NAME=CCPS, X
BYTES=3, X
START=10, X
TYPE=C
...
Joined: 09 Sep 2005 Posts: 124 Topics: 52 Location: Chicago
Posted: Thu Jul 20, 2006 11:36 am Post subject:
Hi Shekar,
Thank you for ur response. Sorry, I think i didnt framed my question properly. Do we have any method (probably not writing a program with the Calls) that we can know the number of segment occurrences existing in a database, under a particular parent segment or under a particular child segment or total occurrences in a database and so on..
If you want to know all the segments as well as child segments under the parent as well as occurances and the entire occurances of a root ( whole structure ) then obviously you have to code programatically.
My assumptions for a new program to retrieve everything from entire database as a information for a particular employee:
1.Declare all the individual segments and its fields correspondingly in the database as a copy book and copy in the program.
2.Create a Qualified SSA.
3.Declare a PCB Mask.
4.Declare an IO-AREA quite sufficient.
5.Run a JCL which will execute the Proc by passing the parameter PSBNAME and in the SYSIN card specify the Employee Number.
6.The Proc which is executed should be executing the program DFSRRC00 passing parameters as Run Mode,New Program name and the PSBNAME.
Code:
//STEP010 EXEC PGM=DFSRRC00,REGION=0M,
// PARM='DLI,NEW PROGRAM NAME,&PSBNAME'
7.The PSBNAME should consist all of the Sensitive Segments to be accessed created by the process PSBGEN.
8.The call to the IMS database would be
Code:
CALL 'CBLTDLI' USING GU,PSB MASK,IO-AREA,SSA.
9.After getting the successful get Unique make use of Successful Parentage calls and go further processing to the down.
10.Check for the Status code GB finally when u complete scanning the DB.
Hope it helps.Experts please let us know any efficient solution for this requirement. _________________ Shekar
Grow Technically
Some info on DFSDDLTO.DFSDDLT0 is IBM supplied Testing Tool which is an IMS DL/I test program which executes the DLI Calls we specify for a given database.
Code:
DLT0...can be used to:
1. test DL/I calls without executing
your application program.
2. INSERT, REPLACE, DELETE records
on a database.
3. RETRIEVE (DUMP) records from
a database.
4. "DEBUG" an application program.
DLT0 JCL and control cards to REPLACE a segment on EMPLOYEE database:
//DLT0 EXEC PGM=DFSRRC00,PARM='DLI,DFSDDLT0,EMPLPSB'
//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
//IEFRDER DD DSN= (supply IMS log dataset here...)
//PRINTDD DD SYSOUT=A
// (other dd statements per your installation)
//SYSIN DD *
S 1 1 1 1 1 EMPLDB
L U GHU EMPLOYEE (EMPLID =79845231001)
L U REPL
L DATA (place your data to be replaced here...)
Joined: 09 Sep 2005 Posts: 124 Topics: 52 Location: Chicago
Posted: Fri Jul 21, 2006 11:22 am Post subject:
Hi Bithead, Shekar
Thank you for your valuable suggestions. I have a question regarding the data which you mentioned in the SYSIN DD card
Code:
//SYSIN DD *
S 1 1 1 1 1 EMPLDB
L U GHU EMPLOYEE (EMPLID =79845231001)
L U REPL
L DATA (place your data to be replaced here...)
I didnt understand the data which is mentioned in the SYSIN DD card as shown above, could you please provide me with the link or the manual i can go thru to understand these statements.
Thank you for all ur help. _________________ Tx
Digger
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum