Jump to content


Photo
- - - - -

SEL-ONLY & DELETE


10 replies to this topic

#1 Explorer78

Explorer78

    Newbie

  • Members
  • Pip
  • 3 posts
  • Gender:Male

Posted 12 April 2006 - 08:04 AM

I have come across something, that seems pretty odd to me.
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.

Attached Thumbnails

  • function.JPG


#2 George Macken

George Macken

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 248 posts
  • Gender:Male
  • Location:Co. Wicklow, Ireland

Posted 12 April 2006 - 06:30 PM

Hi

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

rgds

George

#3 Shaun Rudland

Shaun Rudland

    Expert

  • Members
  • PipPipPipPip
  • 165 posts
  • Location:Queensland, Australia

Posted 12 April 2006 - 10:52 PM

Quick question: Is the primary file a paging file ?
PRO-IV free for 385 Days B)

#4 andykay

andykay

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 204 posts
  • Gender:Male
  • Location:Cyberspace...looking for work

Posted 12 April 2006 - 10:54 PM

Hi Explorer,

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.

Good Luck,

AK
THE LIGHT AT THE END OF THE TUNNEL IS THE HEADLAMP OF THE TRAIN THAT'S ABOUT TO HIT YOU!!!

#5 Explorer78

Explorer78

    Newbie

  • Members
  • Pip
  • 3 posts
  • Gender:Male

Posted 13 April 2006 - 12:26 AM

Thanks all of you for your replies

Adnykay,
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.

Shaun,
The LS has been specified as Paging.
I get a 'Record Not Found' error if I removing paging from it.

George,
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.

#6 Guest_Non_VIP_User_*

Guest_Non_VIP_User_*
  • Guests

Posted 13 April 2006 - 01:42 AM

Not being a VIP user, please excuse my lack of knowledge about the display of your VIP screen you posted. :-"

I assume that you've already verified that FLD37 is not nested somehow.

#7 Shaun Rudland

Shaun Rudland

    Expert

  • Members
  • PipPipPipPip
  • 165 posts
  • Location:Queensland, Australia

Posted 13 April 2006 - 02:44 AM

The LS has been specified as Paging.


Sorry Explorer78, my question was regarding the primary file (CLINVINS), not the LS.

Edited by Shaun Rudland, 13 April 2006 - 02:46 AM.

PRO-IV free for 385 Days B)

#8 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 13 April 2006 - 08:48 AM

Not being a VIP user, please excuse my lack of knowledge about the display of your VIP screen you posted. :D

Hi,

Thats not a VIP screen shot, thats a screen shot of ProIV IDE...... :)

Rob.

#9 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 13 April 2006 - 08:57 AM

Hi,

Explorer78....

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,

Rob.

#10 Mike Schoen

Mike Schoen

    Expert

  • Members
  • PipPipPipPip
  • 198 posts
  • Gender:Male
  • Location:Guelph, Canada

Posted 13 April 2006 - 03:26 PM

A couple of things we have found with oracle and delete mode that have tripped us up.

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.
SQL
SELECT CUST_NO, SEQ_NO FROM CUSTNOTE
ENDSQL
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.

#11 George Macken

George Macken

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 248 posts
  • Gender:Male
  • Location:Co. Wicklow, Ireland

Posted 13 April 2006 - 05:19 PM

Hi

When using SQL we always put in an ORDER BY otherwise the records are not always returned in Key Order Sequence.

rgds

George



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users