View previous topic :: View next topic
|
Author |
Message |
mahendrakariya
New User
Joined: 21 Jun 2011 Posts: 7 Location: India
|
|
|
|
Hi,
I am trying to open a KSDS in COBOL. I am getting error code 37.
JCL the created KSDS is as follows. Please ignore the number of X's in the DSN names. I assure they are correct in the actual JCL.
Code: |
//XXXXXXR JOB (ACCT#,&SYSUID),,
// MSGCLASS=A,CLASS=A,MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*** STEP1 DELETES PREVIOUSLY DEFINED CLUSTER ****
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD * 00030200
DELETE XXXXXX.XXXX.TXN.V CLUSTER
/*
//*** STEP2 CREATES FRESH CLUSTER ****
//STEP2 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER -
(NAME(XXXXXX.XXXX.TXN.V) -
TRACKS(10 5) -
CISZ(4096) -
FREESPACE(10 20)-
KEYS(7 0) -
RECORDSIZE(36 36)) -
DATA (NAME(XXXXXX.XXXX.TXN.V.D)) -
INDEX (NAME(XXXXXX.XXXX.TXN.V.I))
/*
//*** STEP3 REPROES CLUSTER FROM XXXXXX.XXXX.DUMMY
//*** XXXXXX.XXXX.DUMMY TO HAVE A SINGLE RECORD WHICH IS ALL ZEROS
//*** THIS IS NEEDED TO AVOID PROBLEMS OPENING AN EMPTY VSAM FILE
//STEP3 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=XXXXXX.XXXX.DUMMY,DISP=SHR
//OUTPUT DD DSN=XXXXXX.XXXX.TXN.V,DISP=OLD
//SYSIN DD *
REPRO -
INFILE (INPUT) -
OUTFILE (OUTPUT) -
REPLACE
/*
//*** STEP4 CREATES FRESH CLUSTER FOR THE ALTERNATE INDEX ***
//STEP4 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE AIX(NAME(XXXXXX.XXXX.TXN.V.ALT) -
RELATE(XXXXXX.XXXX.TXN.V) -
TRACKS(10 5) -
CISZ(4096) -
FREESPACE(10 20) -
KEYS(5 7) -
NONUNIQUEKEY -
UPGRADE -
RECORDSIZE(80 80)) -
DATA (NAME(XXXXXX.LOAN.TXN.V.ALT.D)) -
INDEX (NAME(XXXXXX.LOAN.TXN.V.ALT.I))
/*
//*STEP5 BUILDS THE INDEX
//STEP5 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
BLDINDEX -
INDATASET(XXXXXX.LOAN.TXN.V) -
OUTDATASET(XXXXXX.LOAN.TXN.V.ALT) -
INTERNALSORT
/*
//*STEP6 CREATES THE PATH
//STEP6 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE PATH (NAME(XXXXXX.LOAN.TXN.V.PATH) -
PATHENTRY (XXXXXX.LOAN.TXN.V.ALT) -
UPDATE)
/*
|
|
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Is that in step99 ? |
|
Back to top |
|
|
mahendrakariya
New User
Joined: 21 Jun 2011 Posts: 7 Location: India
|
|
|
|
step 99...?
This JCL is running with MAXCC=0.
When I do
Code: |
OPEN OUTPUT KSDSFILE
|
in cobol, I am getting error code 37. |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Please use REUSE parameter in the Define cluster |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Read dbzTHEdinosauer's link in your previous KSDS error post.
And next time dont give us this jcl/idcams crap if it concerns
a cobol error. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
gylbharat wrote: |
Please use REUSE parameter in the Define cluster |
A VSAM data set must be marked nonreusable before you can build an alternate index over it. This VSAM requirement applies whether or not DFM is used to build the index |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Thanks Peter for the information... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
And next time dont give us this jcl/idcams crap if it concerns
a cobol error. |
Helpful when the cobol error is caused by the definition. . . At least for me
Quote: |
A VSAM data set must be marked nonreusable before you can build an alternate index over it. This VSAM requirement applies whether or not DFM is used to build the index |
Does anyone know when this became "the rule"?
Some people of my acquaintance got bitten big time a couple of weeks ago when all of the Production jobs that have vsam with an alternate index did not follow this rule. These processes had been running for many years. Something worthy of note is that they upgraded from z/OS 1.7 to 1.9 to 1.11 in less than 2 years (wanted to use new hardware and software features that would not run on the older z/OS, or so i'm told).
When they called, i recalled the "rule" but not when it went "fail" rather than some kind of "warn". This happened to them literally overnight (happened to be a weekend when lots of vsam is mucked with) and many many jobs came crashing down.
Thanks for any input
d |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
That's is typical IBM.
a warning should be translated as: tomorrow this may fall over. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
looks like their problem determination was a bit inaccurate, at least
from the zos 1.7 manual
z/OS V1R7.0 DFSMS Access Method Services for Catalogs
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt2i240/EDITION?SHELF=DGT2BK51.bks&DT=20050629061743
Quote: |
REUSE|NOREUSE
Specifies whether or not the cluster can be opened again and again as a reusable cluster.
If REUSE or NOREUSE is specified in the SMS data class, the value defined is used as the data set definition, unless it has been previously defined with an explicitly specified or modeled DEFINE attribute.
REUSE
Specifies that the cluster can be opened again and again as a reusable cluster. When a reusable cluster is opened, its high-used RBA is set to zero if you open it with an access control block that specifies the RESET attribute.
REUSE lets you create an entry-sequenced, key-sequenced, or relative record work file.
When you create a reusable cluster, you cannot build an alternate index to support it. Also, you cannot create a reusable cluster with key ranges (see the KEYRANGE parameter). Reusable data sets can be multivolume and can have up to 123 physical extents.
Restriction: If you select REUSE and your command also contains the keyword UNIQUE, you must remove the UNIQUE keyword or the DEFINE command will be unsuccessful.
Abbreviation: RUS
NOREUSE
Indicates that the cluster cannot be opened again as a new cluster.
Abbreviation: NRUS
|
and from the same for os/390 2.10
OS/390 V2R10.0 DFSMS Access Method Services for Catalogs
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT1I211/CCONTENTS?SHELF=DGT1BK33&DN=SC26-7326-01&DT=20001016161533
Quote: |
REUSE|NOREUSE
specifies whether the cluster can be opened again and again as a reusable cluster.
If REUSE or NOREUSE is specified in the SMS data class, the value defined is used as the data set definition, unless it has been previously defined with an explicitly specified or modeled DEFINE attribute.
REUSE
specifies that the cluster can be opened again and again as a reusable cluster. When a reusable cluster is opened, its high-used RBA is set to zero if you open it with an access control block that specifies the RESET attribute.
REUSE lets you create an entry-sequenced, key-sequenced, or relative record work file.
When you create a reusable cluster, you cannot build an alternate index to support it. Also, you cannot create a reusable cluster with key ranges (see the KEYRANGE parameter). Reusable data sets can be multivolume and can have up to 123 physical extents.
Note: If you select REUSE and your command also contains the keyword UNIQUE, you must remove the UNIQUE keyword or the DEFINE command will be unsuccessful.
Abbreviation: RUS
NOREUSE
indicates that the cluster cannot be opened again as a new cluster.
Abbreviation: NRUS
|
in a while i' ll fire up an MVS 3.8 and will try to check if the restriction was there from the seventies |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I am trying to open a KSDS in COBOL. I am getting error code 37.
|
With this problem statement, we need to see three things:
1. the SELECT statement in the COBOL program
2. the JCL you are executing the COBOL program with -- and in particular, the DD names for the VSAM file
3. the OPEN statement in the COBOL program.
While other things like the file defintion JCL are fine, they're not going to help resolve your issue. And if you are not using the extended file status codes for a VSAM file, you should add them to your code since the function and feedback codes can be vey helpful in resolving problems. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Enrico,
Quote: |
looks like their problem determination was a bit inaccurate, at least |
Well, maybe. All i have is their assurance that these more than 100 jobs that run on the weekend have all run successfully "forever" and then thud - all the same weekend.
In the past when something was going to "die", i've seen messages that tell the date the failure will happen, but they swear they had no such messages.
So far i've not found any material that explains a "warn" mode.
d |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
dick scherrer wrote: |
Hello,
Quote: |
And next time dont give us this jcl/idcams crap if it concerns
a cobol error. |
Helpful when the cobol error is caused by the definition. . . At least for me
|
Dick, a listcat should have been enough. I just wanted to say that if you have a cobol error, give the cobol source, jes output and a listcat. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Peter,
Quote: |
I just wanted to say that if you have a cobol error, give the cobol source, jes output and a listcat. |
Yup, i agree for the first time thru
d |
|
Back to top |
|
|
|