View previous topic :: View next topic
|
Author |
Message |
mukun264
New User
Joined: 01 Jan 2008 Posts: 32 Location: Bangalore
|
|
|
|
Hi Guys,
I am trying to read an index file using AIX key but getting status code 23 for all available alternate keys.
what I did.
1. declaration of file
SELECT indx-file
ASSIGN KSDSFILE
ORGANIZATION INDEX
ACCESS IS DYNAMIC
RECORD KEY IS MAIN-KEY
ALTERNATE KEY IS ALT-KEY
FILE STATUS IS FILE-STATUS
reading file using alx
READ INDX-FILE KEY ALT-KEY
Here i am getting file status 23 (record not found) . i have checked key . length and records. all are fine. i have given both files in jcl
successful getting data by reading path as main file.
1. declaration of file
SELECT indx-file
ASSIGN KSDSFILE1
ORGANIZATION INDEX
ACCESS IS DYNAMIC
RECORD KEY IS ALT-KEY
FILE STATUS IS FILE-STATUS
reading PATH DD
READ INDX-FILE
any one having idea why. I am unable to getting real background cause. please help |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
You really posted very little that can help us. For example, you said
Quote: |
i have given both files in jcl |
yet you did not bother to post the JCL so we can see if it is coded correctly.
Basically, you've done something wrong (I know this because I've written COBOL programs that use alternate indexes and they worked very well) -- it could be in the VSAM definition, it could be in the JCL, it could be in the COBOL program. With what you've posted, that is about all we can tell you. |
|
Back to top |
|
|
CaptBill
New User
Joined: 28 May 2009 Posts: 20 Location: Oklahoma City, OK USA
|
|
|
|
Also, how did you build the AIX? I've had a condition similar to this when a prior programmer used a non supported method to create the AIX and it lost an entry. |
|
Back to top |
|
|
mukun264
New User
Joined: 01 Jan 2008 Posts: 32 Location: Bangalore
|
|
|
|
The alternate defined on KSDS file
define AIX (NAME(AIX-FILE-NAME)
RELATE(KSDS-CLUSTER-NAME)
KEYS(22 52)
FSPC(10 10)
UPGRADE
SPEED)
DATA(AIX-DATA)
INDX(AIX-INDX)
define path(name(KSDS-PATH-NAME)
pathenry(AIX-FILE-NAME))
BLDINDEX INDATASET(KSDS-CLUSTER-NAME)
OUTDATSET(AIX-FILE-NAME)
just want to inform you that i am able to read path in cics with same keys. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
There are so many errors in what you posted for the AIX definition control statements that I am not surprised that it di not work.
Why could you not simply cut and paste the data? And use the code tags? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
just want to inform you that i am able to read path in cics with same keys. |
Well, yes -- you read an alternate index through the path (in batch or CICS).
You haven't told us if you are attempting to read the alternate index in CICS or batch.
You haven't told us the JCL you are using that you say isn't working (if batch).
You haven't told us the COBOL code you are using that you say isn't working.
You haven't really told us what your problem is for sure -- if you are thinking your JCL should point to the AIX data set name and then you read the records, then your thinking is WRONG and you must start using the PATH to point to the alternate index. |
|
Back to top |
|
|
mukun264
New User
Joined: 01 Jan 2008 Posts: 32 Location: Bangalore
|
|
|
|
There was error in JCL. The dd name of Aix was not coded as per standard rule.for example
If base cluster dd name is vsamfile then AIX dd name should be vsamfile1.
Other than this there was no error.
Its happened due the standard which suppose to be follow in the project. The biggest surprise is till now there was in the account Aix concept was not used. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
There was error in JCL. The dd name of Aix was not coded as per standard rule.for example
If base cluster dd name is vsamfile then AIX dd name should be vsamfile1. |
That's why we wanted to see the JCL.
And, by the way, if the DD name is VSAMFILE then the alternate index DD name will be VSAMFIL1 -- not the improper DD name VSAMFILE1. DD names are limited to 8 characters, not 9. |
|
Back to top |
|
|
|