Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
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.
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).
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
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"
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
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.
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.
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,
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
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.