MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Segments in the database

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS
View previous topic :: View next topic  
Author Message
MFdigger
Beginner


Joined: 09 Sep 2005
Posts: 124
Topics: 52
Location: Chicago

PostPosted: Wed Jul 19, 2006 3:58 pm    Post subject: Segments in the database Reply with quote

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

Rolling Eyes
_________________
Tx
Digger
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Wed Jul 19, 2006 11:23 pm    Post subject: Reply with quote

MFdigger,

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                                                   
...

_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
MFdigger
Beginner


Joined: 09 Sep 2005
Posts: 124
Topics: 52
Location: Chicago

PostPosted: Thu Jul 20, 2006 11:36 am    Post subject: Reply with quote

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..

Hope I'm clear.
_________________
Tx
Digger
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Thu Jul 20, 2006 12:55 pm    Post subject: Reply with quote

MFdigger,

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
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Jul 20, 2006 1:20 pm    Post subject: Reply with quote

Look into using DFSDDLT0. This can dump all child segments for a given parent.
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Thu Jul 20, 2006 1:45 pm    Post subject: Reply with quote

MFdigger,

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...)

_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
MFdigger
Beginner


Joined: 09 Sep 2005
Posts: 124
Topics: 52
Location: Chicago

PostPosted: Fri Jul 21, 2006 11:22 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
MFdigger
Beginner


Joined: 09 Sep 2005
Posts: 124
Topics: 52
Location: Chicago

PostPosted: Fri Jul 21, 2006 11:43 am    Post subject: Reply with quote

Got the link

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFSP20F3/APPENDIX1.4?DT=20020906094838

Thank you
_________________
Tx
Digger
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group