SEL-ONLY & DELETE
Posted 12 April 2006 - 08:04 AM
The environment is : Kernel 4.6 on Unix, connecting to Oracle 9i.
Question is, has anyone else come across a similar situation?
Problem is in a Screen Function.
An LS has been defined with the primary file in Delete mode.
The primary file has 4 key fields.
Values in 3 fields are supplied/populated in the Default logic of this LS.
Then a SEL-ONLY done on the 3rd key field.
Eg: key fields are CLNO, ACT, CSEQ & ASSNO.
Values in CLNO, ACT & CSEQ are specified and a SEL-ONLY done on CSEQ.
Problem is, I am getting a read on a different CSEQ value in ARNE of 2nd file in the LS,
after going through all the records for the specified CSEQ.
For the solution, I can replace SEL-ONLY with SQL, but I would like to know if this a known concern experienced by other people as well.
If yes, then I am looking at a system wise scan of SEL-ONLY with primary file in Delete mode and replacing with SQL.
Posted 12 April 2006 - 06:30 PM
Does the LS actully Delete the "next xtra" record or it it just reading it.
try-other searches on the forum for sel-only
I have recollection of sometimes putting the primary file in Lookup and then again in delete/update mode as way of working around something funny that occurs when selecting the primary file for update ... brain is a bit frazzled at the moment and recollection not that good - roll on the long week-end
Posted 12 April 2006 - 10:54 PM
Without seeing the file structure of INSTRTYP, my first inclination would be to suspect that you have a field somewhere in INSTRTYP that is called CSEQ, too. This field does not have to be in the KEYS of INSTRTYP, and without seeing the structure of INSTRTYP, I would look there first. Have you tried putting a UMSG in the BR of INSTRTYP to see what is actually being fed to the file?
The other thing you might try is to check the ProIV/Oracle field name mapping.
Posted 13 April 2006 - 12:26 AM
INSTRTYP does not have a field called CSEQ.
Oracle Field mapping is correct and field CSEQ exists only in the Primary File.
I have put messages in After Read No Error of Primary File and the value gets changed from there.
The LS has been specified as Paging.
I get a 'Record Not Found' error if I removing paging from it.
There is a DSEL in the second file, which is deselecting the record.
I am going to write a test function to check it out further.
Posted 13 April 2006 - 08:57 AM
I cant remeber if the file def CLINVINS was a 'Auto Seq' file or not...
If it is Auto Seq, then there are problems with ProIV and Oracle, and using SEL-ONLY.
You should removed the SEL-ONLY if it is AutoSeq.... I think,
Posted 13 April 2006 - 03:26 PM
We make the primary file in updates run in lookup mode (usually on an alternate filename with just key fields)
when we do dsel/dself logic.
If you dont do this, pro-iv will obtain an oracle lock on all records that match your SEL-ONLY criteria, and anything you DSEL on will stay locked until the transaction commits.
Auto-sequenced files are a particular pain in the neck.
For some reason, even with a full-function sql select, when pro-iv sees that one of the key fields preceding the auto-sequence changes, it stops reading records.
As an example we have a customer notes file, key is cust_no, seq_no, auto-sequenced.
SELECT CUST_NO, SEQ_NO FROM CUSTNOTE
should return everything in pro-iv, but pro-iv stops fetching back data when the customer number changes.
The first time this happened, it took many minutes and many unkind words directed at pro-iv before we found the cause.
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users