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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
quanzhong

New User


Joined: 12 Aug 2008
Posts: 46
Location: china

PostPosted: Tue Dec 16, 2008 12:10 pm    Post subject: record not found
Reply with quote

hi, all

at present, i met a difficult situation.

there's a VSAM KSDS file, used both by online and batch.

during batch processing, when we try inquire a record online, get 'record not found', then we use file-aid to browse, we found that record exist in it.

so what caused that, a record can't be located online even if it is physically exists.


addition information of this file.

Code:

KEYLEN----------------22     AVGLRECL------------6549     BUFSPACE-----------17920     CISIZE--------------8192
RKP--------------------0     MAXLRECL------------6549     EXCPEXIT----------(NULL)     CI/CA-----------------90
STRIPE-COUNT-----------1                                                                                       
SHROPTNS(2,3)      SPEED     UNIQUE           NOERASE     INDEXED       NOWRITECHK     NOIMBED       NOREPLICAT
UNORDERED          REUSE     NONSPANNED      EXTENDED     EXT-ADDR   


when used by batch, the job read record from this file, update some fields, then write to another file.

Code:

amp=(amorg, 'bufnd=17', 'bufni=5')
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Dec 16, 2008 12:13 pm    Post subject:
Reply with quote

It is usually program logic - something silly like an offset error that causes these problems.
Back to top
View user's profile Send private message
quanzhong

New User


Joined: 12 Aug 2008
Posts: 46
Location: china

PostPosted: Tue Dec 16, 2008 1:42 pm    Post subject:
Reply with quote

hi, expat.

when the batch job completes. we close/open that file through DADS, then we can locate that record online.

can logic problem explain this. we trace this problem for almost a month, but only twice can we make this problem recurred.


by the way, this is a production problem. thanks.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Tue Dec 16, 2008 2:16 pm    Post subject: Reply to: record not found
Reply with quote

who reads ONLY
who updates
what are the share options

why such a poor approach when zillions of IBM publcation advice
against VSAM sharing between batch and cics
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7999
Location: Bellevue, IA

PostPosted: Tue Dec 16, 2008 6:04 pm    Post subject:
Reply with quote

Oh, lord. You do not want to do this. Basically what happens is the records written by the batch job aren't going to be seen by the CICS application without flushing the buffers and forcing a re-read of the file -- such as closing and opening them via DADS. Your CICS application may do things such as attempt to read the VSAM file based on indexes that were updated by the batch job (due to a CI or CA split, for example). There's a simple term for this situation: corrupted file. It is quite easy for the file to be so corrupted that delete / define becomes the only way to recover it.

If you really have to do it this way, you need a batch enqueue / dequeue routine and use the CICS ENQ and DEQ commands to ensure the file is processed correctly. You probably are going to need to review the SHAREOPTIONS and carefully think about which values you need. This will have performance implications for both batch and online, but it's a trade-off: if you gotta do it this way, you're gonna take a performance hit.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Tue Dec 16, 2008 6:09 pm    Post subject: Reply to: record not found
Reply with quote

and even with proper enqueuing the cics recovery will be messed up
unless the vsam is closed,
the journals are switched and properly archived ( for forward recovery )
and and and .....
even a simple restart might fail, IIRC for update requests the restart recovery program would use RBA processing, not keyed access
and with batch inserts there could be RBA shifts
Back to top
View user's profile Send private message
quanzhong

New User


Joined: 12 Aug 2008
Posts: 46
Location: china

PostPosted: Tue Dec 16, 2008 8:28 pm    Post subject:
Reply with quote

Hi, Robert

actually, the batch program is just to use that file as input, the output is another file(during batch processing, that file is read-only for both CICS application and batch), which cause the index be updated? and i think CA/CI splits yet will not occurred.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Tue Dec 16, 2008 8:33 pm    Post subject: Reply to: record not found
Reply with quote

if a file is read only for everybody and there is evidence that the record is there
then for "a not record found" there are only two alternative ...

(1) a program error
(2) a PBCAK (*)

(*) PBCAK Problem Between Chair And Keyboard
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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