View previous topic :: View next topic
|
Author |
Message |
quanzhong
New User
Joined: 12 Aug 2008 Posts: 46 Location: china
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
It is usually program logic - something silly like an offset error that causes these problems. |
|
Back to top |
|
|
quanzhong
New User
Joined: 12 Aug 2008 Posts: 46 Location: china
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
quanzhong
New User
Joined: 12 Aug 2008 Posts: 46 Location: china
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
|