View previous topic :: View next topic
|
Author |
Message |
Phoenix
New User
Joined: 27 Feb 2007 Posts: 20 Location: Chennai
|
|
|
|
Hi All,
My requirement is to load (Initial load) an IMS database through an IMB(Type - 3) program via ISRT calls (Not through utility).
The database is a HDAM database and is having a unique key with a Secondary index (on some search fields other than the unique key field). And it has only root segment with no child segments( Not sure if it is a MSDB or a DEDB).
I am using simple ISRT calls by building the segmets in the IO-Area and inserting them into the database. Before that i am using a utility to build the Secondary index on the database.
But while during runtime its abending at the first ISRT call, throwing me U0826 with status code NI. I saw the manual it says:
"Open error on work file data set during DB load with secondary
indexes. The status code is 'NI'."
I am not sure as to why is it not recognizing the Index.
Jcl execution step is given below:
Code: |
//STEPNAME EXEC PGM=DFSRRC00,PARM='DLI,PGMNAME,PSBNAME,50,00'
//DFSRESLB DD DSN=IMS.RESLIB,DISP=SHR
//IMS DD DSN=IMS.P.DBDLIB,DISP=SHR
// DD DSN=IMS.P.PSBLIB,DISP=SHR
//IEFRDER DD DUMMY
//SYSUDUMP DD SYSOUT=*
//DATABAS3 DD DSN=ONL.DATABASE,DISP=SHR
//INDEX1 DD DSN=VSAM.SECONDARYINDEXFOR.DATABASE,DISP=SHR
//INPUTFL DD DSN=OUTPUT.TEST.DOWNLOAD.ONE,DISP=SHR
//DFSVSAMP DD *
IOBF=(4096,10)
IOBF=(8192,10)
2048,5
4096,5
/*
//CNTLPAGE DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
//
|
Any help would be greatly appreciated.
Cheers,
Phoenix. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Could this help? You have a duplicate in your SI while your DBD specified a unique. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
What option do you have coded in your PSB? An HDAM database? You must have an input file. Did you sort it first? Remember that unlike HIDAM, HDAM is not keyed sequential. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Sandy, as I read your post SI for HSAM would not be possible. I might have misunderstood your post so post this link anyway.
It says:
Quote: |
Secondary Indexes
The following database types support secondary indexes:
HISAM
HDAM
PHDAM
HIDAM
PHIDAM
Secondary indexes are indexes that allow you to process a segment type in a sequence other than the one defined by the segment's key. A secondary index can also be used to process a segment type based on a qualification in a dependent segment.
|
|
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Can you show us both database definitions along with the corresponding PSB? I may have misunderstood you. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
DBD for SI and HDAM.
It's all in the documentation |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
I know what the DBD fields are - I wanted to see his DBD def and PSB for his particular problem? |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Sandy Zimmer wrote: |
Can you show us both database definitions along with the corresponding PSB? I may have misunderstood you. |
Sorry.........thought you asked me to post some stuff You're right, let the guy post his DBD and PCB so we can help further. Sorry for the misunderstanding |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
That's OK - are these people in school or actually working? Sometimes, newcomers are so lost that you do not know the correct way to ask a question. I do agree, however, that you learn from mistakes. But, to learn from mistakes, you need the initial knowledge. When I learned IMS (seems like a million years ago), they sent me to school - for a very long time. I learned database design and could have gone into either tech or applications - I chose applications. I was 9 months pregnant with my second son in 1981 when I attended a weekend seminar with a guy that wrote a book titled "Effective Database Design". I still have that book after all of these years! When I say I loved IMS, I loved IMS and I feel that they will never replace it. There is nothing faster with all the builtin backup - backout capibilities. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello SandyZ,
At this time we have lots of folks who are students, freshers (a term i'll guess is new to you), and people who are "on the job". There is an entire new website under construction geared for students and freshers.
"Freshers" was a new term to me not so long ago. It refers to people who have started working, but are fairly unexperienced. You'll see it fairly often here.
Welcome to the forums |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Hi Dick,
It has been a few years since I did IMS. I miss it like hell and that is why I am here. I got married - then divorced and here I am! I want to get back into it, but many potential employers thought they I may have "
forgotten". I did not. I did not just execute "canned calls". I can still remember actual code that I did altho I do not have access to it. I never did just coding - I designed systems from inception - database design thru implementation. I worked at one of the most high tech IMS tech shops around - Corestates. The only time that the databases were down - offline - was for backup procedures for just a few minutes around 5am every morning. We were international. Corestates was the Camelot of creative thinking. Bipin Shah ran the show. If you knew him, you would know that you just did not make mistakes. I went back as a consultant a couple of times. |
|
Back to top |
|
|
Phoenix
New User
Joined: 27 Feb 2007 Posts: 20 Location: Chennai
|
|
|
|
Hi All,
Thanks for the prompt replies, but I think the problem has been solved.
Wow, i am lucky to have all the veterans helping me out, as for IMS, Sandy I share your passion for IMS too. You know what I love most about IMS, you don't do one thing right out of a million and you are in trouble and so out of those million you have to spot the loop hole, thats where all the fun is.
Anyways, back to business. Yes I am a little new to IMS, and would like to clarify further the problem.
It was one of the work files that I was missing in the jcl i.e. DFSURWF1 dd statement.
And the PROCOPT was "L " as i mentioned it was the initial load, and in the DBD the the search key for Secondary index was defined as unique as George said. But search key has time stamp as a field so i don't think there would be a duplicate.
And there is one more thing i was confused about, as Sandy mentioned:
Quote: |
You must have an input file. Did you sort it first? Remember that unlike HIDAM, HDAM is not keyed sequential. |
Why do I need to sort the file as it is a HDAM database, when the retrieval will be done by the Secondary index, once established?
And the Index DBD:
Code: |
DBD NAME=NAME,
ACCESS=(INDEX,VSAM)
DATASET DD1=DDNAME,SIZE=(4096)
SEGM NAME=SEGNAME,BYTES=48
FIELD NAME=(CONCATENATED FIELD,SEQ,U),BYTES=43,START=1
LCHILD NAME=(TARGET SEGNAME,TARGET DBD),INDEX=CONCATENATED FIELD
DBDGEN |
And the PSB:
Code: |
PCB TYPE=DB,DBDNAME=TARGET DBD,PROCOPT=L,KEYLEN=200
SENSEG NAME=TARGET SEGNAME,PARENT=0 |
Thanks again to all.
Cheers,
Phoenix. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
HDAM is not keyed sequential. If you load it with a file that is not sorted, you will run into problems - guess how I know.... HDAM is a faster access database than HIDAM - it is better for online, but not as good for reporting because it is not keyed sequential. When doing HDAM extracts, always remember that a sort will be needed. The BIG IMS place where I worked did not allow "search keys" as they were not efficient. When you do an "L" option, make sure that your database is "stopped".
Remember that the physical and logical views of a database can be different. When they differ, there are many rules that apply. I am tired - going to say goodnight! |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
I love this topic |
|
Back to top |
|
|
|