Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Record Not found in AlX but record record present

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Record Not found in AlX but record record present
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Fri Mar 24, 2017 4:19 pm    Post subject: Reply to: Record Not found in AlX but record record present
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    Post subject:
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    Post subject: Reply to: Record Not found in AlX but record record present
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: 1788
Location: UK

PostPosted: Sat Mar 25, 2017 4:05 pm    Post subject:
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Sat Mar 25, 2017 8:57 pm    Post subject:
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    Post subject:
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue Mar 28, 2017 12:58 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us