I have open error issue while loading the records into GSAM FILE.
I am reading IMS database using GU and GN calls and then inserting the corresponding records into GSAM file. I am getting successful status code after reading the database. But when i am trying to insert those records into GSAM file , i am getting AI status codes which Database open error..
Please find DBD and PSB source
GSAM database:
DBD NAME=DBDGSAM,ACCESS=GSAM, *
PASSWD=NO
DATASET DD1=RPLDD1, *
RECFM=FB
DBDGEN
FINISH
END
Main database :
DBD NAME=RETADBD,ACCESS=(HIDAM,VSAM)
DATASET DD1=RETVSAM,DEVICE=3390,SIZE=4096
SEGM NAME=RETAIL,BYTES=5,PARENT=0,PTR=TB
LCHILD NAME=(RETIDX,RETAIDX),PTR=INDX
FIELD NAME=(ITEMNAME,SEQ,U),BYTES=5,START=01,TYPE=C
*
SEGM NAME=PURCHASE,BYTES=40,PARENT=RETAIL
FIELD NAME=(ORDERNO,SEQ,U),BYTES=05,START=01,TYPE=C
FIELD NAME=(BUYEADD),BYTES=30,START=06,TYPE=C
FIELD NAME=(QTYREQ),BYTES=02,START=36,TYPE=C
FIELD NAME=(UNITPR),BYTES=03,START=38,TYPE=C
*
SEGM NAME=BOOKING,BYTES=13,PARENT=PURCHASE,PTR=TB
* LCHILD NAME=(RETIDX,RETAIDX),PTR=INDX
FIELD NAME=(PAYTYPE,SEQ,M),BYTES=05,START=01,TYPE=C
FIELD NAME=(ADVAPAID),BYTES=03,START=06,TYPE=C
FIELD NAME=(BALAMT),BYTES=03,START=09,TYPE=C
FIELD NAME=(DELSLA),BYTES=02,START=12,TYPE=C
* XDFLD NAME=PAYMODE,SRCH=PAYTYPE
*
SEGM NAME=STOCK,BYTES=12,PARENT=RETAIL
FIELD NAME=(QTYPRST,SEQ,M),BYTES=04,START=01,TYPE=C
FIELD NAME=(TQTYREQ),BYTES=04,START=05,TYPE=C
FIELD NAME=(TOTQTYSH),BYTES=04,START=09,TYPE=C
*
SEGM NAME=SHIPPING,BYTES=37,PARENT=RETAIL
FIELD NAME=(SHIPMODE,SEQ,M),BYTES=06,START=01,TYPE=C
FIELD NAME=(SHIPDATE),BYTES=08,START=07,TYPE=C
FIELD NAME=(SHIPADDR),BYTES=15,START=15,TYPE=C
FIELD NAME=(DELDATE),BYTES=8,START=30,TYPE=C
DBDGEN
FINISH
END
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
Noticed the L procopt so may be your JCL for the DD-statment fails? And did you allocate the GSAM-file?
Quote:
AI
Explanation
A data management open error occurred. Some possible reasons are:
An error is in the DD statements.
Neither DD statements nor DFSMDA dynamic allocation members were provided for this database.
The data set OPEN request did not specify load mode, but the data set was empty. An empty data set requires the load option in the PCB.
The buffer is too small to hold a record that was read at open time.
No DD statements or DFSMDA members were supplied for logically related databases.
For an OSAM data set, the DSORG field of the OSAM DCB, DSCB, or JFCB does not specify PS or DA.
For an old OSAM data set, the BUFL or BLKSIZE field in the DSCB is 0.
The data set is being opened for load, and the processing option for one or more segments is other than L or LS.
The allocation of the OSAM data set is invalid. The allocation is probably (1,1), rather than (1,1) and this causes the DSORG to be P0.
The processing option is L, the OSAM data set is old, and the DSCB LRECL, BLKSIZE, or both, does not match the DBD LRECL, BLKSIZE, or both.
Incorrect or missing information prevented IMS™ from determining the block size or the logical record length.
A catalog was not available for accessing a VSAM database that was requested.
OS could not perform an OPEN, but the I/O request is valid. Either the data definition information is incorrect, or information is missing.
RACF® was used to protect the OSAM data set, and the control region has no update authorization.
If IMS returns message DFS0730I, you can determine the cause of the OPEN failure from this message in the job log.
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:
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.
Check the PSB and make sure that the appropriate processing options have been specified for each of the DB PCBs that your program uses.