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

Dataset Space Allocation Problem,


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Sep 23, 2008 10:48 am
Reply with quote

Hi,

Iam getting a problem in allocating a dataset. The record length of the dataset should be 500.
Code:
//***************************************************
//DELFIL  EXEC PGM=IEFBR14                         
//CASE     DD  DSN=HXSULL.QUERY,                     
//             DISP=(MOD,DELETE,DELETE),             
//             UNIT=TEST,                           
//             SPACE=(TRK,0)                         
//***************************************************
//CREATF  EXEC PGM=BZALLOC                         
//CASE     DD  DSN=HXSULL.QUERY,                     
//             DISP=(NEW,KEEP,KEEP),UNIT=SYSDA,     
//             DCB=(RECFM=FB,LRECL=500,BLKSIZE=15000),
//             SPACE=(TRK,(1,1))                     
//***************************************************
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 23, 2008 11:07 am
Reply with quote

Hello,

Quote:
Iam getting a problem in allocating a dataset.
What problem? You need to post the error message including any message id.

What is bzalloc? You specified (new,keep,keep) which is invalid in many systems. The rules of jcl would permit it, but it violates standards many places.

When you post the error(s) someone should be able to help.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Sep 23, 2008 11:23 am
Reply with quote

As asked by Dick, what is the problem, psycic abilities only work on Wednesday.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Sep 23, 2008 12:01 pm
Reply with quote

Hi,

The is the JCL program, which will be getting records from the table and write it to a dataset. This jcl program works just fine.

Code:
//HXSULLXX JOB (T,TEST),'HXSULL',MSGCLASS=X,CLASS=L,NOTIFY=&SYSUID,   
//         REGION=0M                                                   
//DSNTEP2  EXEC PGM=IKJEFT01,COND=(4,LT),DYNAMNBR=20                   
//SYSTSIN  DD  *                                                       
  DSN SYSTEM(DB2D)                                                     
  RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2) -                                 
  LIB('DB2.POPR.PROD.RUNLIB.LOAD')                                     
   END                                                                 
//SYSTSPRT DD  SYSOUT=*                                                 
//SYSOUT   DD  *                                                       
//SYSPRINT DD  DSN=HXSULL.QUERY,                                       
//             DISP=(NEW,KEEP,KEEP),                                   
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=2400),                   
//             UNIT=SYSDA,SPACE=(TRK,(1,1))                             
//SYSIN    DD  *                                                       
SELECT * FROM INEDATAT.INET_LSW_CONTRACT                               
FETCH FIRST 100 ROWS ONLY;                                             
END                                                                     
//GENER    EXEC PGM=IEBGENER                                           
//SYSUT1   DD DSN=HXSULL.QUERY,DISP=SHR                                 
//SYSUT2   DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=133)                       
//SYSPRINT DD SYSOUT=*                                                 
//SYSIN    DD DUMMY                                                     
//*********************************************************************


But, the thing is the table has lots of columns. So, maximum length has to be 500 for each line in the dataset(hxsull.query). And each time i have to delete the dataset to run this job. So, i made few modifications to the earlier program.

First part = House-Cleaning - Deleting & Creating the dataset.
Second part = DSNTEP2 which works properly writes to the dataset.
Third part = The records also has to be in the SPOOL(SYSUT2).

Code:
//HXSULLXX JOB (T,TEST),'JCL QUERY',MSGCLASS=X,CLASS=L,REGION=0M,     
//             NOTIFY=&SYSUID                                         
//*********************************************************************
//*                         JCL TO RUN QUERY                          *
//*********************************************************************
//DELETEF  EXEC PGM=IEFBR14                                           
//CASE     DD  DSN=HXSULL.QUERY,                                       
//             DISP=(MOD,DELETE,DELETE),                               
//             UNIT=TEST,                                             
//             SPACE=(TRK,0)                                           
//*
//CREATF   EXEC PGM=BZALLOC                                           
//CASE     DD  DSN=HXSULL.QUERY,                                       
//             DISP=(NEW,KEEP,KEEP),UNIT=SYSDA,                       
//             DCB=(RECFM=FB,LRECL=500,BLKSIZE=7500),                   
//             SPACE=(TRK,(1,1))                                       
//*********************************************************************
//DSNTEP2  EXEC PGM=IKJEFT01,COND=(4,LT),DYNAMNBR=20                   
//SYSTSIN  DD  *                                                       
  DSN SYSTEM(DB2D)                                               
  RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2) -                           
  LIB('DB2.POPR.PROD.RUNLIB.LOAD')                               
   END                                                           
//SYSTSPRT DD  SYSOUT=*                                         
//SYSOUT   DD  *                                                 
//SYSPRINT DD  DSN=HXSULL.QUERY,DISP=OLD                         
//SYSIN    DD  *                                                 
SELECT * FROM INEDATAT.INET_CASE                                 
FETCH FIRST 100 ROWS ONLY;                                       
END                                                             
//*********************************************************************
//GENER    EXEC PGM=IEBGENER                                     
//SYSUT1   DD DSN=HXSULL.QUERY,DISP=SHR                         
//SYSUT2   DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=500)                 
//SYSPRINT DD SYSOUT=*                                           
//SYSIN    DD DUMMY                                             
//*********************************************************************

I must be making mistakes in the allocation of dataset(HXSULL.QUERY).


IEFBR14 - We use to DELETE Datasets
BZALLOC - Creation of datasets

ERRORS In spool -

SYSTSPRT

Code:
READY                                                                   
  DSN SYSTEM(DB2D)                                                       
DSN                                                                     
  RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2)   LIB('DB2.POPR.PROD.RUNLIB.LOAD') 
DSN      ENDED DUE TO ERROR+                                             
SYSTEM ABEND CODE 001   REASON CODE 00000000                             
SYSPRINT

Code:
DATA SET UTILITY - GENERATE       
IEB311I CONFLICTING DCB PARAMETERS
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Sep 23, 2008 12:08 pm
Reply with quote

Hi,

try not specifying the LRECL on the SYSUT2 statement.


Gerry
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Sep 23, 2008 12:09 pm
Reply with quote

Hi,

or check what the LRECL of the file is after it has been written to,

it's possible it's been overwritten by the program.


Gerry
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Sep 23, 2008 12:23 pm
Reply with quote

Hi,

Code:
DELETEF - STEP WAS EXECUTED - COND CODE 0000   
HXSULLXX CREATF - STEP WAS EXECUTED - COND CODE 0000                   
HXSULL.QUERY                                 RETAINED,  DDNAME=CASE   
STEP/CREATF  /START 2008267.0244                                       
STEP/CREATF  /STOP  2008267.0244 CPU    0MIN 00.01SEC SRB    0MIN 00.00
ALLOC. FOR HXSULLXX DSNTEP2                                           
JES2 ALLOCATED TO SYSTSIN                                             
JES2 ALLOCATED TO SYSTSPRT                                             
JES2 ALLOCATED TO SYSOUT                                               
SMS ALLOCATED TO DDNAME SYSPRINT                                       
JES2 ALLOCATED TO SYSIN                                               
B709 ALLOCATED TO SYS00001                                             
  SYS1.UADS                                    KEPT                   
  VOL SER NOS= CATA10.                                                 
SMS ALLOCATED TO DDNAME SYS00002                                       
001-4,HXSULLXX,DSNTEP2 ,SYSOUT  ,JES                                   
EROPT IS 'ABE' OR NOT SPECIFIED                                       
SMS ALLOCATED TO DDNAME (SYS00004)                                     
DSN (SYS08267.T024441.RA000.HXSULLXX.T3298736.H01)                     
STORCLAS (SC02) MGMTCLAS (        ) DATACLAS (        )               
.
.lots of dump is here.
.
.
DSNTEP2 - STEP WAS EXECUTED - COND CODE 0012

GENER - STEP WAS EXECUTED - COND CODE 0000


In DSNTEP2 lot of dump is there.

SYSPRINT
Code:
DATA SET UTILITY - GENERATE                                                     
IEB352I WARNING: ONE OR MORE OF THE OUTPUT DCB PARMS COPIED FROM INPUT         


PROCESSING ENDED AT EOD

SYSTSPRT
R
Code:
EADY                                                                     
  DSN SYSTEM(DB2D)                                                       
DSN                                                                       
  RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2)   LIB('DB2.POPR.PROD.RUNLIB.LOAD')   
DSN      ENDED DUE TO ERROR+                                             
SYSTEM ABEND CODE 001   REASON CODE 00000000           


Is dump because of in DISP=(NEW,KEEP,KEEP)
a lot of allocations are being made. it is said as "KEPT"
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Sep 23, 2008 12:28 pm
Reply with quote

I think that you may find there is a limitation on the output length of data that is written to the spool, SYSOUT=

It also appears that there is a problem in the query to start with.
Quote:
DSN ENDED DUE TO ERROR+


First suggestion is to allocate the dataset HXSULL.QUERY in the query itself but do not specify any DCB info.

So my priority would be to resolve the errors in which they occur rather than start from the end and work backwards. Once the query is working you can then play with the printing part.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 23, 2008 12:29 pm
Reply with quote

Hello,

You have specified sysout as a dd * - which by definition is input. . .
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Sep 23, 2008 12:41 pm
Reply with quote

Hi,

Quote:
So my priority would be to resolve the errors in which they occur rather than start from the end and work backwards. Once the query is working you can then play with the printing part.


I removed the last IEBGENER and DCB in creating DS. And i executed the job.

ABEND S013 is coming.....
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Sep 23, 2008 1:15 pm
Reply with quote

I can vaguely recall this same problem a few months back, unfortunately at a previous shop, but can not for the life of me recall the solution.

It some how rings a bell that we used VB 2004 as the output from the query - so my original idea of dropping the DCB may well have been wrong icon_smile.gif .

It may even have been VBA - but try both.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Sep 23, 2008 2:08 pm
Reply with quote

Hi,

Can you tell me the JCL which you use to create lengthy datasets
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Sep 23, 2008 2:41 pm
Reply with quote

sushanth bobby wrote:
Hi,
Can you tell me the JCL which you use to create lengthy datasets


Huh ??? The same as creating any dataset of course.

Code:

//SYSPRINT DD DSN=HXSULL.QUERY,DISP=(,CATLG,KEEP),
//            RECFM=VBA,LRECL=2004,
//            SPACE=(CYL,(50,50),RLSE)
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Sep 23, 2008 2:42 pm
Reply with quote

Hi,

I have come to a conclusion that datasets(JESMSGLG,JESJCL,JESYSMSG,SYSTSPRT,SYSUT2,SYSPRINT) in the spool have the same properties or attributes(
i.e.,space units=BLKS, priqty=500, secqty=500, record format=VBA,Record Length=240, block size=3120), so spool datasets have some limitations.

All i wanted is to have a result dataset looking like,

Col1 col2 Col3 col4 Col5 col6 Col7 col8 Col9 col10
.
.
.
.
.
.

.
.
in this order

But now the result is like

Page 1
Col1 col2 col3 col4 col5
.
.
.
.

.
.
..

.
.

Page 2
Col 6 col7 col8 col9 col10
.
.
.

.
.

Do you guyz understand what iam trying to say here.

I want to create a dataset capable of holding a particular column length.

Is it possible ?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Sep 23, 2008 3:20 pm
Reply with quote

Yes, I think that you are correct in what you say about the spooling limitations of the job that you are running.

I have had a quick search through my notes and have found that the solution at the previous site was to execute the SQL code using REXX and then write the required data out to a dataset using REXX, in the correct format.

I may (or may not) have some REXX code to do this, and will post it if I can find it.

It may even be worth putting a post in the DB2 forum explaining that your output is OK, but not in the format that you want as the columns are spread over multiple pages and ask if there is a way that the output can be routed to a dataset without having to use the SYSPRINT DD name.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Sep 23, 2008 3:32 pm
Reply with quote

Thank You EXPAT & Thank You ALL,
For giving me a possible solution.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top