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

Record Not found in AlX but record record present


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mukun264

New User


Joined: 01 Jan 2008
Posts: 32
Location: Bangalore

PostPosted: Fri Mar 24, 2017 9:28 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Fri Mar 24, 2017 4:19 pm
Reply with quote

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
View user's profile Send private message
CaptBill

New User


Joined: 28 May 2009
Posts: 20
Location: Oklahoma City, OK USA

PostPosted: Fri Mar 24, 2017 4:35 pm
Reply with quote

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
View user's profile Send private message
mukun264

New User


Joined: 01 Jan 2008
Posts: 32
Location: Bangalore

PostPosted: Sat Mar 25, 2017 3:20 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Sat Mar 25, 2017 4:05 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Sat Mar 25, 2017 8:57 pm
Reply with quote

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
View user's profile Send private message
mukun264

New User


Joined: 01 Jan 2008
Posts: 32
Location: Bangalore

PostPosted: Mon Mar 27, 2017 11:45 pm
Reply with 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.

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Mar 28, 2017 12:58 am
Reply with quote

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
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Copy only TEXT or String from a record SYNCSORT 4
No new posts combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
No new posts how to complete the end of a record w... DFSORT/ICETOOL 2
No new posts Mark Previous & next lines when a... DFSORT/ICETOOL 9
Search our Forums:

Back to Top