Page 1 of 1

DBD Name and IMS DB JCL

PostPosted: Fri May 03, 2013 12:50 pm
by maragatham pp
I am a beginner and have started to learn IMS with simple ESDS Load Program and it throws SOC4 at DLI Call for ISRT.
I have couple of clarificatins:

1)
My JCL is as below:
//IMS DD DSN=D125211.IMS.PSBLIB,DISP=SHR
// DD DSN=D125211.IMS.DBDLIB,DISP=SHR

How does the exact DBD or PSB member identified in these libraries?
Is it through the DBD Name specified inthe PARM Parameter?

2) Can I have a sample JCL to run IMS DB?

Re: DBD Name and IMS DB JCL

PostPosted: Fri May 03, 2013 2:25 pm
by NicC
1 - nothing was "thrown" it "failed with a"
2 - that is ony part of your JCL for that step - we would need the entire JCL but as theses things tend to be tailored you should go and ask your DBA/IMS support or the person sitting next to you.
3 - you can have a sample JCL - there is probably one in the manual but it will not work at your site except by a huge coincidence.

Re: DBD Name and IMS DB JCL

PostPosted: Fri May 03, 2013 6:54 pm
by Anuj Dhawan
The way you've posted your question, that leaves a lot more to be asked for.

For a COBOL-IMS program, you don't execute it like PGM=PGMNAME instead you call DFSRRC00 -- which is "IMS in batch" and in turn, DFSRRC00 -- communicates with the COBOL. Having said that - every COBOL-IMS will have it's own PSB which you'll pass as one of the parameter to DFSRRC00 and that's where COBOL program knows about the PSB.

One PSB can have one or many PCBs and these PCBs will refer to the Data-base/s (or GSAMs) and those Data-bases are defined in DBD. And that's how the PSBs and DBDs are identified...

And if you follow at least one of the points from Nic, you can be a better programmer, going forward.

Hope this helps.

Re: DBD Name and IMS DB JCL

PostPosted: Sat May 11, 2013 1:47 am
by pmartyn
I have provided example JCL for running a DLI job but I am concerned that it is not your problem. Please make sure that the dataset was initialized properly by inserting then deleting a record with the procopt of L and no other PCB's in the PSB are using that Database. If the database was not properly initialized and you are trying to ISRT with a Procopt of A (for example) you will still wind up with an OC4. If what I just said does not make sense to you contact your DBA. The DBA already has the JCL for that purpose. Then you can load (via ISRT).

Additionally remember that when running a DLI job DBRC is turned off. This means that you should (must?) backup the database before running your job. This provides a 'fall back' in case your job abends. If you are thinking that you do not need to back it up because it is empty, remember that the data structure must be initialized before the load and this way you will have a clean starting point without bothering the DBA.

Anyway here is the 'sample' JCL. Be reminded that we are not in your shop and do not know your standards so modification of this JCL is proper.
Batch program does not access IMS program directly. JCL invokes DLI executable module DFSRRC00, which loads application program and required DLI modules.
 
//SAMPLE    JOB (ACCOUNTING), ‘yourname’,MSGLEVEL=(1,1),MSGCLASS=3,
//          NOTIFY=&SYSUID
//STEP01    EXEC PGM=DFSRRC00,PARM=(DLI,Program,PSB NAME, , ,)
//STEPLIB   DD DSN=IMS.RESLIB,DISP=SHR
//IMS       DD DSN=IMS2.PSBLIB,DISP=SHR
//          DD DSN=IMS2.DBDLIB,DISP=SHR
//DDCARD    DD DSN=DATASET,DISP=(OLD,KEEP)
//DFSVSAMP  DD DUMMY
//IMSLOGR   DD DUMMY
//IEFRDER   DD DUMMY
//SYSPRINT  DD SYSOUT=*
//SYSUDUMP  DD SYSOUT=*
//IMSERR    DD SYSOUT=*


Best of luck,
pm