IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Database status code AI when inserting records


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Tue Nov 27, 2007 11:03 am
Reply with quote

Hi All,

When i try to insert data into database it says AI( status code). Can anyone guide me how to solve this Error???
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Nov 27, 2007 11:09 am
Reply with quote

Anirudh,

Did you bother to refer manual? From QW -

Quote:
Programmer Response: These kinds of problems often require the help of a
system programmer or system administrator. But before you go to one of
these specialists, some things you can do are:

o Check the DD statements. Make sure that the ddname is the same as the
name specified on the DATASET statement of the DBD. The segment name
area in the DB PCB (call level), or in the DIB (command level) has the
ddname of the data set that could not be opened.

o Check the PSB and make sure that the appropriate processing options
have been specified for each of the DB PCBs that your program uses.
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Tue Nov 27, 2007 11:22 am
Reply with quote

I did check the manuals. But cidnt trace the error. I guess my DD names are correct in my DBD. I have given PROCOPT = A in my PSB.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Tue Nov 27, 2007 11:52 am
Reply with quote

Hope you made sure that the DB vsam files are fine. Do a verify on those files. Even in this case, we end up in AI status code sometimes.
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Tue Nov 27, 2007 12:12 pm
Reply with quote

Yeah will check that out. Thanks!
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 27, 2007 3:40 pm
Reply with quote

Can you post the DFS0730I message from the job log?
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Tue Nov 27, 2007 4:46 pm
Reply with quote

Bitneuker wrote:
Can you post the DFS0730I message from the job log?



DFS0730I UNABLE TO OPEN DATA SET WITH DDNAME DBDAPL FOR REASON I,08, DATAB
ASE DBDAPL TRN APPL001 .

and the reason is as follows:
I,08

Explanation: An attempt was made to open a VSAM data set for which there was no DD statement, or for dynamically allocated data sets, the data set is not yet allocated. The message indicates the ddname associated with the data set that was opened.
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Tue Nov 27, 2007 4:49 pm
Reply with quote

Bitneuker wrote:
Can you post the DFS0730I message from the job log?


DBDAPL is my database name.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 27, 2007 4:55 pm
Reply with quote

anirudh1985 wrote:
Bitneuker wrote:
Can you post the DFS0730I message from the job log?


DBDAPL is my database name.


I assume this is a new defined VSAM-file. Did you ever initiate it; causing an EOF mark to be written? May be done using IDCAMS repro with input dummy.

I also notice the TRN APPL001; is it an MPP? Did you perform the ACBGEN?
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Tue Nov 27, 2007 5:17 pm
Reply with quote

Bitneuker wrote:
anirudh1985 wrote:
Bitneuker wrote:
Can you post the DFS0730I message from the job log?


DBDAPL is my database name.


I assume this is a new defined VSAM-file. Did you ever initiate it; causing an EOF mark to be written? May be done using IDCAMS repro with input dummy.

I also notice the TRN APPL001; is it an MPP? Did you perform the ACBGEN?


I have created VSAM file using IDCAMS utility. Regarding Trans ID it is an MPP i have done ACBGEN also...
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 27, 2007 5:23 pm
Reply with quote

Just defining the VSAM-file using IDCAMS is not enough. You have to open/close is before you can use it.
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Tue Nov 27, 2007 5:29 pm
Reply with quote

Bitneuker wrote:
Just defining the VSAM-file using IDCAMS is not enough. You have to open/close is before you can use it.


How do i do that? IS it thru COBOL program??? IT would be helpful if u could explain..
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 27, 2007 5:35 pm
Reply with quote

Use IDCAMS

//indd dd dummy
//outdd dd dsn=yourvsamfile,disp=shr
//sysin dd *
repro infile(indd) outfile(outdd)
/*

This causes the vsamfile to be opened/closed and write an EOF mark. Yust a verify won't write the EOF.

I will be out for the afternoon; check later on
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Nov 28, 2007 10:25 am
Reply with quote

Bitneuker wrote:
Use IDCAMS

//indd dd dummy
//outdd dd dsn=yourvsamfile,disp=shr
//sysin dd *
repro infile(indd) outfile(outdd)
/*

This causes the vsamfile to be opened/closed and write an EOF mark. Yust a verify won't write the EOF.

I will be out for the afternoon; check later on


I have opened and closed the database as per ur JCL but still the same story... icon_sad.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Nov 28, 2007 3:02 pm
Reply with quote

What is displayed when you type:

Code:

/DIS DB DBDAPL


If is tells INVALID your database is not defined in the online DLI-region.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Nov 28, 2007 3:48 pm
Reply with quote

Here a part of the stage-step we use for the definition:

Code:
//STEP4    EXEC PGM=ASMA90,REGION=0M,                     
//            PARM=(OBJECT,NODECK,NODBCS,NOLIST,NOTERM,   
//            'SIZE(MAX,ABOVE)',NOUSING,FLAG(NOPUSH))     
//SYSLIB   DD DSN=SYS.IMS.V810.OPTIONS,DISP=SHR           
//         DD DSN=SYS.IMS.V810.ADFSMAC,DISP=SHR           
//         DD DSN=SYS1.MACLIB,DISP=SHR                     
//         DD DSN=SYS1.MODGEN,DISP=SHR                     
//SYSLIN   DD DISP=OLD,                                   
//         DSN=SYS.IMS.V810.OBJDSETJ(DFSDDIRJ)             
//SYSPRINT DD SYSOUT=X,                                   
//         DCB=(BLKSIZE=605),                             
//         SPACE=(605,(100,50),RLSE,,ROUND)               
//SYSUT1   DD UNIT=SYSDA,DISP=(,DELETE),                   
//         DCB=BLKSIZE=13024,                             
//         SPACE=(CYL,(72,15))                             
//SYSIN    DD *                                           
        DFSDMD DAGENTE,0000,1                             
        DFSDMD DAUPREM,0000,1                             
        DFSDMD DBHDMNL1,0000,3                             
        DFSDMD DBHDMNL2,0000,3                             
        DFSDMD DBHDMNL5,0000,3                             
        DFSDMD DBHISTNL,0000,3                             
        DFSDMD DBHPOLNL,0000,3                             
        DFSDMD DBNLAGT,0000,3                             
        DFSDMD DBNLBGEG,0000,3                             
        DFSDMD DBNLBND,0000,3                             
        DFSDMD DBNLHIHO,0000,3                             



Check with your DBA if he staged the databases.
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Nov 28, 2007 4:02 pm
Reply with quote

Bitneuker wrote:
What is displayed when you type:

Code:

/DIS DB DBDAPL


If is tells INVALID your database is not defined in the online DLI-region.


We get the following

DATABASE TYPE TOTAL UNUSED TOTAL UNUSED ACC CONDITIONS
DBDAPL DL/I UP NOTOPEN, ALLOCS
*07332/160016*
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Nov 28, 2007 4:12 pm
Reply with quote

Code:

/STA DB DBDAPL


What happens next?
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Nov 28, 2007 4:26 pm
Reply with quote

Bitneuker wrote:
Code:

/STA DB DBDAPL


What happens next?


/sta db dbdapl

DFS058I 16:25:23 START COMMAND IN PROGRESS
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Nov 28, 2007 4:27 pm
Reply with quote

anirudh1985 wrote:
Bitneuker wrote:
Code:

/STA DB DBDAPL


What happens next?


/sta db dbdapl

DFS058I 16:25:23 START COMMAND IN PROGRESS


this is from joblog


.DFS058I 16.25.23 START COMMAND IN PROGRESS NODE TCP00329.
DFS0488I STA COMMAND COMPLETED. DBN= DBDAPL RC= 0.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Nov 28, 2007 4:38 pm
Reply with quote

Any change when you type

Code:

/DIS DB DBDAPL
?
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Nov 28, 2007 5:10 pm
Reply with quote

Bitneuker wrote:
Any change when you type

Code:

/DIS DB DBDAPL
?


no change
do u have a gmail id??
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Nov 28, 2007 5:25 pm
Reply with quote

I will investigate further and get back to you. You may use PM to contact me.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Nov 29, 2007 6:01 am
Reply with quote

Well..........IDCAMS dummy repro doesn't do the trick as it appears.



Quote:
I take it this is an ESDS? It needs to be initially loaded with PROCOPT=L.
An open/close for EOF-mark using IDCAMS repro (dummy) is not sufficient.

If you have an HD load utility from one of those other companies, you can "initialize" it first by running it with a DUMMY input. After that, you can do an ISRT with PROCOPT=A.

An initial load with PROCOPT=L or initializing it with a load utility does things like set up the bit map. Without that, you get an AI on an ISRT if PROCOPT is not L.


Talk to your DBA and take advantage of this quote icon_wink.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Fri Nov 30, 2007 12:12 am
Reply with quote

Or check for this:
Quote:
If you have the BMC utilities, you can define the input data set as DD DUMMY and it will properly initialize the data set. Unfortunately, the IBM Load lacks that extremely useful functionality.

Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Job completes in JES, but the status ... IBM Tools 1
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top