[MAINFRAME, IBM MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS] Package, Plans and Collections

225 views
Skip to first unread message

Quasar Chunawala

unread,
Oct 20, 2013, 6:36:25 AM10/20/13
to mainfr...@googlegroups.com
When we write a program that needs data from DB2 tables, we code SQL statements in the source program. SQL statements are guest to the host Cobol program. The SQL statements are enclosed by EXEC SQL and END-EXEC delimiters. Between the delimiters, we also code the INCLUDE dclgen (which is similar to coding Cobol COPY). For each table referenced in the SQL query, we must code INCLUDE dclgen. The DCLGEN has the definition of the table, just how the table looks in DB2. The DCLGEN also has host Cobol variables, that are a warehouse for the rows delivered from SQL query.
Pre-process SQL
Once the program is written, this source program containing SQL code blocks is passed through the DB2 pre-compiler. The DB2 pre-compiler extracts the SQL and creates a Database Request Module(DBRM) containing all the SQL in the program. A modified source program is also created with the SQL commented out and calls to DB2 substituted. 'Catie' - the modified source program and 'Danny' - the DBRM are twins born out of pre-processor.

References:

--
Posted By Quasar Chunawala to MAINFRAME, IBM MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS at 10/20/2013 04:06:00 PM

Quasar Chunawala

unread,
Oct 20, 2013, 6:40:42 AM10/20/13
to mainfr...@googlegroups.com


When we write a program that needs data from DB2 tables, we code SQL statements in the source program. SQL statements are guest to the host Cobol program. The SQL statements are enclosed by EXEC SQL and END-EXEC delimiters. Between the delimiters, we also code the INCLUDE dclgen (which is similar to coding Cobol COPY). For each table referenced in the SQL query, we must code INCLUDE dclgen. The DCLGEN has the definition of the table, just how the table looks in DB2. The DCLGEN also has host Cobol variables, that are a warehouse for the rows delivered from SQL query.


Gurumukh Gupta

unread,
Oct 21, 2013, 6:31:39 AM10/21/13
to mainfr...@googlegroups.com
Hey Guys,

One of my vsam file giving error insuff space Sb37 but i have given maximum space in CYL.
what to do ?
Hint ?



--
You received this message because you are subscribed to the Google Groups "Mainframes 360" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mainframes36...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mainframes360/90e6ba6e815093c20704e929cc29%40google.com.

For more options, visit https://groups.google.com/groups/opt_out.

Sundarram Te

unread,
Oct 21, 2013, 11:17:12 AM10/21/13
to mainfr...@googlegroups.com
Hi Gurumukh

It shows that the volume does not have space. Try increasing the number of volumes. How big is the data?

Look at this:

===============================================================================================

SB37 Abend

The error was detected by the END OF ROUTINE. At end of volume, the volume must be demounted, but the system is unable to dismount the volume. Try increasing the volumes

-- possible cause --

    The data set on DASD - output - already had 16 extents, but there was no more room available to receive any more output on the output volume, and another volume could not be mounted. the volume table of contents was full

-- Resolution --

    Try increasing the volume, for example if the Volume is given as VOL=(,,,2), increase it to VOL=(,,,4) or some higher volume.

===============================================================================================

With best wishes

Sundaram T E             
M:+91-9840271788
Linkedin: http://www.linkedin.com/in/tesundarram
========================================================================
========================================================================


Gurumukh Gupta

unread,
Oct 21, 2013, 12:44:25 PM10/21/13
to mainfr...@googlegroups.com
 DEFINE -                                              
 CLUSTER(NAME(DRUG.A44540.VSAM.DA.ITM.MAINT.CLUSTER) - 
        KEYS(58,0) -                                   
        CYLINDERS(1500,1500) -                         
        FREESPACE(0 5) -                               
        REUSE -                                        
        SHAREOPTIONS(2,3) -                            
        SPEED -                                        
        VOLUMES(*)) -   



Ok can we make this change to        VOLUMES(*)) -     to         VOL=(,,,4) .

           


Sundarram Te

unread,
Oct 21, 2013, 12:53:47 PM10/21/13
to mainfr...@googlegroups.com
Hi Gurumukh

You may try that.

But the VSAM Dataset is limited to 4GB size across all volumes.

Please check. Also the maximum number of volumes that can be allocated can be maximum of 59 volumes.


Sundaram T E             
M:+91-9840271788
Linkedin: http://www.linkedin.com/in/tesundarram
========================================================================
========================================================================


Gurumukh Gupta

unread,
Oct 21, 2013, 12:58:24 PM10/21/13
to mainfr...@googlegroups.com

Hello,
 It gives error

when

.        VOLUMES(,,,4) -                                       
.                                                              
.IDC0206I IMPROPERLY PLACED COMMA HAS BEEN FOUND AND IGNORED 


        SPEED -                          
        VOLUMES=(,,,4) -                 
                                         
IDC3211I KEYWORD 'VOLUMES=' IS IMPROPER  


What to do ?



Volume


 


Gurumukh Gupta

unread,
Oct 21, 2013, 1:18:34 PM10/21/13
to mainfr...@googlegroups.com
Hi Sundaram,

My job have this command
CLUSTER(NAME(DRUG.A44540.VSAM.DA.CUST.MAINT.CLUSTER) -  
       KEYS(21,0) -                                     
       FREESPACE(0 5) -                                 
       REUSE -                                          
       SHAREOPTIONS(2,3) -                              
       SPEED -                                          
       VOLUMES(* * * * * * * * *)) -      

OR


CLUSTER(NAME(DRUG.A44540.VSAM.DA.CUST.MAINT.CLUSTER) -  
       KEYS(21,0) -                                     
       FREESPACE(0 5) -                                 
       REUSE -                                          
       SHAREOPTIONS(2,3) -                              
       SPEED -                                          
       VOLUMES(*)) -       

Error is same Error message...

AMS4106F  IDCAMS2R:  DEV=DISK VOL=PME031     DSN=DRUG.A44540.DA.CUST.EXT.SRT  
                     DCB=(130 27,950 0 FB EXCP)                               
AMS4104F  IDCAMS2W:  ORG=VSAM VOL=PVM051     DSN=DRUG.A44540.VSAM.DA.CUST.MAINT
                     ACB=(130 4,096 21 KSDS SEQ)                              
AMS4106F  IDCAMS2R:  DEV=DISK VOL=PME010     DSN=DRUG.A44540.DA.CUST.EXT.SRT  
                     DCB=(130 27,950 0 FB EXCP)                               
AMS4192A  INSUFFICIENT SPACE TO EXTEND DATA SET                               
AMS4283A  VSAM WRITE ERROR, RETURN CODE = 8, FDBK = 28                        
AMS4115F  IDCAMS2W:     27,565,200 RECORDS,        3,583,476,000 BYTES,   889,2


     





             


Gurumukh Gupta

unread,
Oct 22, 2013, 3:07:22 AM10/22/13
to mainfr...@googlegroups.com
Hey Guys any opening for mainframe 3.6 years of exp.
Cobol db2 vsam jcls cics ?
Not getting calls...

Reply all
Reply to author
Forward
0 new messages