f



Identity Column Question

I am relatively new to using embedded SQL in RPG so please forgive me
if this seems like an obvious question or problem. Listed below is
some background information as well as my question.

I have an RPGIV program written by someone else on an iSeries machine
running V5R2 that uses embedded SQL for most of it's processing to
declare a cursor, fetch the cursor and perform it's processing logic. 
The sole purpose of this program is to update a single table's values
as records are added, changed or deleted during the week in other
files.

Every Saturday there is a job that runs here to reset the identity
values of these same tables in a different library and then early
Monday morning these records are copied over to our production library
to replace what it there.  Again, during the week a job runs nightly
to perform updates.

My question is this, the program that I am referring to uses SQL for
most all of it's processing.  However, at the point that it needs to
do an INSERT it is instead doing a WRITE.  I do not know why this
decision was made, but we haven't had problems with this program until
now so it strikes me as odd that it is failing now.  Does anyone know
if a WRITE handles Identity Value Columns differently than an SQL
insert?

My assumption would have been that the assignment of an identity
column would be a DB2 function.  However, we are getting duplicate
record errors at the point of the WRITE even though the identity
column isn't referenced in this program.   So, I am wondering if
changing this write to an insert statement would fix our problem as I
have checked  the index that we are using over this table and the
record we are trying to add is truly not there.  That leads me to
believe our problem MUST BE related to the identity column as the ID
being used IS in the table.
 
Any input would be greatly appreciated.    

Thanks.  

-Tim
0
tmecheski (9)
8/24/2004 1:28:18 PM
comp.sys.ibm.as400.misc 9196 articles. 2 followers. Post Follow

13 Replies
1165 Views

Similar Articles

[PageSpeed] 22

Also, check all logicals built over the file, and make sure there are
no duplicates in the logicals if they are keyed UNIQUE.


> However, we are getting duplicate
> record errors at the point of the WRITE even though the identity
> column isn't referenced in this program.   So, I am wondering if
> changing this write to an insert statement would fix our problem as I
> have checked  the index that we are using over this table and the
> record we are trying to add is truly not there.  That leads me to
> believe our problem MUST BE related to the identity column as the ID
> being used IS in the table.
>  
> Any input would be greatly appreciated.    
> 
> Thanks.  
> 
> -Tim
0
8/24/2004 6:24:38 PM
Does anyone know
> if a WRITE handles Identity Value Columns differently than an SQL
> insert?

The identity column is directly connected to the database table.
Neither a SQL insert nor a RPG WRITE are setting the identity column.

It would be interesting to know how your identity column is defined. I
assume that the maximum value was reached and cycle was allowed. In
this case the identity column counting starts with the minimum value
and this causes certainly duplicate records.

Birgitta
0
8/25/2004 2:00:04 AM
Tim,

When you say it's doing a WRITE, you mean it's using native RPG I/O via 
the WRITE opcode?

Has the RPG program been recompiled recently?
What was the SQL used to create the table?  (You can retrieve this via 
iSeries Navigator & (maybe?) DSPFD)

Here's what I'm thinking, RPG I/O to a table with an identity column is 
a little surprising to see.  If the table was generated with GENERATED 
BY DEFAULT option instead of the GENERATED ALWAYS.  Then I think the 
only way for the RPG to make use of the identity column would be to 
WRITE the column with a NULL value.  Or write the record via a logical 
that didn't have the column.  I'm wondering if it the RPG program might 
have somehow been compiled without the ALWNUL(*USRCTL) option.  I would 
have thought it wouldn't compile successfully though.

Lastly, somebody else already mentioned the possibility of it cycling.  
Additionally, here's a quote from the SQL manual:

"For an identity column, the database manager inserts a specified value 
but does not verify that it is a unique value for the column unless the 
identity column has a unique constraint or a unique index that solely 
specifies the identity column."

The key phrase above is "that solely specifies".  Perhaps you have a 
unique composite key defined (ie. the identity column and some other 
column) expecting the identity column to always be unique, but without a 
specific unique constraint or index on it.

Did that make sense?

HTH,
Charles


In article <eedf536c.0408240528.3d96fa14@posting.google.com>, 
tmecheski@jjillgroup.com says...
> I am relatively new to using embedded SQL in RPG so please forgive me
> if this seems like an obvious question or problem. Listed below is
> some background information as well as my question.
> 
> I have an RPGIV program written by someone else on an iSeries machine
> running V5R2 that uses embedded SQL for most of it's processing to
> declare a cursor, fetch the cursor and perform it's processing logic. 
> The sole purpose of this program is to update a single table's values
> as records are added, changed or deleted during the week in other
> files.
> 
> Every Saturday there is a job that runs here to reset the identity
> values of these same tables in a different library and then early
> Monday morning these records are copied over to our production library
> to replace what it there.  Again, during the week a job runs nightly
> to perform updates.
> 
> My question is this, the program that I am referring to uses SQL for
> most all of it's processing.  However, at the point that it needs to
> do an INSERT it is instead doing a WRITE.  I do not know why this
> decision was made, but we haven't had problems with this program until
> now so it strikes me as odd that it is failing now.  Does anyone know
> if a WRITE handles Identity Value Columns differently than an SQL
> insert?
> 
> My assumption would have been that the assignment of an identity
> column would be a DB2 function.  However, we are getting duplicate
> record errors at the point of the WRITE even though the identity
> column isn't referenced in this program.   So, I am wondering if
> changing this write to an insert statement would fix our problem as I
> have checked  the index that we are using over this table and the
> record we are trying to add is truly not there.  That leads me to
> believe our problem MUST BE related to the identity column as the ID
> being used IS in the table.
>  
> Any input would be greatly appreciated.    
> 
> Thanks.  
> 
> -Tim
> 
0
cwilt1 (190)
8/25/2004 12:53:52 PM
Thanks for the feedback.

The program that I am referring to is using a logical file or view
that does not have a unique key and there is only 1 other logical file
over the PF that also does not have a unique key.  The only unique
requirement for this particular file is the Identity column on the PF.

Once again, at the time of the write, the record that we are trying to
write does not exist in any of these, but somehow it appears that the
database is trying to use an existing identity value in spite of the
fact that the program doesn't refer to this column at all.  That is
why I am confused.  How could it possibly be using an identity value
that already exists if it supposed to automatically generate a new one
on a write?  Initially, I thought that it might be related to the fact
that the file had the REUSEDLT set to (*YES), but that has since
changed and did not make a difference.

As it pertains to the identity value being assigned, I am aware that
the database assigns this automatically and that it will re-use the
values if the length is not defined large enough.  That is to say,
that, if the table had an identity column defined as SMALLINT, once it
reached 32767 I believe it would start over again by assigning an
identity value of 500 and so on.

However, the table that I am referring to has the following fields and
as you will see the ID_COLUMN is a very large field so it should NEVER
wrap.  We also reset these weekly beginning at 1 before we go to use
them during the week, but during the week the job now fails with a
duplicate record error.

ID_COLUMN  BINARY    18  0
      GENERATED ---             ALWAYS
      ORIGINAL STARTS WITH ---- 1
      CURRENT STARTS WITH ----  1
      INCREEENT BY ----         1
      MIN VALUE  ----           1
      MAX VALUE --              9223372036854775807 
      CYCLE                     NO
      NUMBER OF VALUES TO CACHE 10
   
FLD1       BINARY    18  0
FLD2       BINARY     4  0
FLD3       CHAR      10 

Based on the file above, the index that we are using within the
program in question is keyed by FLD1.  The other logical is keyed by
FLD2, but neither of these are unique.

Any other thoughts?
0
tmecheski (9)
8/25/2004 12:59:52 PM
I did a quick test in the course of researching use of identiy column.  I
used an RPGIV program (with record I/O, not SQL) to insert records into a
table that contains an identiy column.  The value of the identity field
seems to be totally ignored, and the database handles the assignment of the
identity column.  The identity column was defined with generate always.  My
test was done on V5R2.


"Charles Wilt" <cwilt@meaa.mea.com> wrote in message
news:MPG.1b965582add166d7989707@news.easynews.com...
> Tim,
>
> When you say it's doing a WRITE, you mean it's using native RPG I/O via
> the WRITE opcode?
>
> Has the RPG program been recompiled recently?
> What was the SQL used to create the table?  (You can retrieve this via
> iSeries Navigator & (maybe?) DSPFD)
>
> Here's what I'm thinking, RPG I/O to a table with an identity column is
> a little surprising to see.  If the table was generated with GENERATED
> BY DEFAULT option instead of the GENERATED ALWAYS.  Then I think the
> only way for the RPG to make use of the identity column would be to
> WRITE the column with a NULL value.  Or write the record via a logical
> that didn't have the column.  I'm wondering if it the RPG program might
> have somehow been compiled without the ALWNUL(*USRCTL) option.  I would
> have thought it wouldn't compile successfully though.
>
> Lastly, somebody else already mentioned the possibility of it cycling.
> Additionally, here's a quote from the SQL manual:
>
> "For an identity column, the database manager inserts a specified value
> but does not verify that it is a unique value for the column unless the
> identity column has a unique constraint or a unique index that solely
> specifies the identity column."
>
> The key phrase above is "that solely specifies".  Perhaps you have a
> unique composite key defined (ie. the identity column and some other
> column) expecting the identity column to always be unique, but without a
> specific unique constraint or index on it.
>
> Did that make sense?
>
> HTH,
> Charles
>
>
> In article <eedf536c.0408240528.3d96fa14@posting.google.com>,
> tmecheski@jjillgroup.com says...
> > I am relatively new to using embedded SQL in RPG so please forgive me
> > if this seems like an obvious question or problem. Listed below is
> > some background information as well as my question.
> >
> > I have an RPGIV program written by someone else on an iSeries machine
> > running V5R2 that uses embedded SQL for most of it's processing to
> > declare a cursor, fetch the cursor and perform it's processing logic.
> > The sole purpose of this program is to update a single table's values
> > as records are added, changed or deleted during the week in other
> > files.
> >
> > Every Saturday there is a job that runs here to reset the identity
> > values of these same tables in a different library and then early
> > Monday morning these records are copied over to our production library
> > to replace what it there.  Again, during the week a job runs nightly
> > to perform updates.
> >
> > My question is this, the program that I am referring to uses SQL for
> > most all of it's processing.  However, at the point that it needs to
> > do an INSERT it is instead doing a WRITE.  I do not know why this
> > decision was made, but we haven't had problems with this program until
> > now so it strikes me as odd that it is failing now.  Does anyone know
> > if a WRITE handles Identity Value Columns differently than an SQL
> > insert?
> >
> > My assumption would have been that the assignment of an identity
> > column would be a DB2 function.  However, we are getting duplicate
> > record errors at the point of the WRITE even though the identity
> > column isn't referenced in this program.   So, I am wondering if
> > changing this write to an insert statement would fix our problem as I
> > have checked  the index that we are using over this table and the
> > record we are trying to add is truly not there.  That leads me to
> > believe our problem MUST BE related to the identity column as the ID
> > being used IS in the table.
> >
> > Any input would be greatly appreciated.
> >
> > Thanks.
> >
> > -Tim
> >


0
Brian
8/25/2004 4:09:31 PM
Tim,

Well that seems to pretty much cover everything I can thing of....except 
have you loaded any PTFs recently?  Perhaps one of them is causing a 
problem.

In any case, I'd say it's time to call IBM.

Charles


In article <eedf536c.0408250459.211a0ae4@posting.google.com>, 
tmecheski@jjillgroup.com says...
> Thanks for the feedback.
> 
> The program that I am referring to is using a logical file or view
> that does not have a unique key and there is only 1 other logical file
> over the PF that also does not have a unique key.  The only unique
> requirement for this particular file is the Identity column on the PF.
> 
> Once again, at the time of the write, the record that we are trying to
> write does not exist in any of these, but somehow it appears that the
> database is trying to use an existing identity value in spite of the
> fact that the program doesn't refer to this column at all.  That is
> why I am confused.  How could it possibly be using an identity value
> that already exists if it supposed to automatically generate a new one
> on a write?  Initially, I thought that it might be related to the fact
> that the file had the REUSEDLT set to (*YES), but that has since
> changed and did not make a difference.
> 
> As it pertains to the identity value being assigned, I am aware that
> the database assigns this automatically and that it will re-use the
> values if the length is not defined large enough.  That is to say,
> that, if the table had an identity column defined as SMALLINT, once it
> reached 32767 I believe it would start over again by assigning an
> identity value of 500 and so on.
> 
> However, the table that I am referring to has the following fields and
> as you will see the ID_COLUMN is a very large field so it should NEVER
> wrap.  We also reset these weekly beginning at 1 before we go to use
> them during the week, but during the week the job now fails with a
> duplicate record error.
> 
> ID_COLUMN  BINARY    18  0
>       GENERATED ---             ALWAYS
>       ORIGINAL STARTS WITH ---- 1
>       CURRENT STARTS WITH ----  1
>       INCREEENT BY ----         1
>       MIN VALUE  ----           1
>       MAX VALUE --              9223372036854775807 
>       CYCLE                     NO
>       NUMBER OF VALUES TO CACHE 10
>    
> FLD1       BINARY    18  0
> FLD2       BINARY     4  0
> FLD3       CHAR      10 
> 
> Based on the file above, the index that we are using within the
> program in question is keyed by FLD1.  The other logical is keyed by
> FLD2, but neither of these are unique.
> 
> Any other thoughts?
> 
0
cwilt1 (190)
8/26/2004 12:20:58 PM
Charles Wilt <cwilt@meaa.mea.com> wrote in message news:<MPG.1b965582add166d7989707@news.easynews.com>...

> Tim,
> 
> When you say it's doing a WRITE, you mean it's using native RPG I/O via 
> the WRITE opcode?

A.
Yes, this is exactly what I am saying.  It wouldn't have been my first
choice either given that the rest of the logic is using SQL, but
that's what I have to work with.


> 
> Has the RPG program been recompiled recently?

A.
It was recompiled back on 7/27 and has worked between then and the
problem.  However, the control entries right in the header
specifications of the source code have:

 H AlwNull(*UsrCtl)  
 H DatFmt(*ISO)      
 H DftActGrp(*NO)   

So, this should take care of that.  


> What was the SQL used to create the table?  (You can retrieve this via 
> iSeries Navigator & (maybe?) DSPFD)
> Here's what I'm thinking, RPG I/O to a table with an identity column is 
> a little surprising to see.  If the table was generated with GENERATED 
> BY DEFAULT option instead of the GENERATED ALWAYS.  Then I think the 
> only way for the RPG to make use of the identity column would be to 
> WRITE the column with a NULL value.  Or write the record via a logical 
> that didn't have the column. 


A.
As indicated in my previous post, the table was created with the
identity column being GENERATED ALWAYS.  We are also trying to write
to a logical over that table that doesn't have that (Identity) columm
and we are still receiving the error.



 I'm wondering if it the RPG program might 
> have somehow been compiled without the ALWNUL(*USRCTL) option.  I would 
> have thought it wouldn't compile successfully though.
> 
> Lastly, somebody else already mentioned the possibility of it cycling.  
> Additionally, here's a quote from the SQL manual:
> 
> "For an identity column, the database manager inserts a specified value 
> but does not verify that it is a unique value for the column unless the 
> identity column has a unique constraint or a unique index that solely 
> specifies the identity column."


A.
Agreed.  However, I have proven in the table that nothing has been
added or changed since it was repopulated.


> 
> The key phrase above is "that solely specifies".  Perhaps you have a 
> unique composite key defined (ie. the identity column and some other 
> column) expecting the identity column to always be unique, but without a 
> specific unique constraint or index on it.


A.
There are only 2 logical over this table of which neither has a unique
key.  The only unique key is found on the physical file and the unique
key only contains the identity column.


> 
> Did that make sense?

A.
Thanks Charles for the input.  This all makes perfect sense and I am
sure now you can see my confusion.


> 
> HTH,
> Charles
>
0
tmecheski (9)
8/26/2004 1:02:10 PM
Tim Mecheski wrote:

> I am relatively new to using embedded SQL in RPG so please forgive me
> if this seems like an obvious question or problem. Listed below is
> some background information as well as my question.
> 
> I have an RPGIV program written by someone else on an iSeries machine
> running V5R2 that uses embedded SQL for most of it's processing to
> declare a cursor, fetch the cursor and perform it's processing logic. 
> The sole purpose of this program is to update a single table's values
> as records are added, changed or deleted during the week in other
> files.

The last sentence in the preceding paragraph leads me 
to think the program in question is a trigger program. 
  I don't know if that has any importance or not.

Are you sure the duplicate key problem is happening 
when the program is writing to its target file, or 
could it be happening on one of the other files in the 
course of the copy?

If none of the above is pertinent, I suggest you need 
to identify whatever it was that changed in the system 
at the point the program began failing.

> 
> Every Saturday there is a job that runs here to reset the identity
> values of these same tables in a different library and then early
> Monday morning these records are copied over to our production library
> to replace what it there.  Again, during the week a job runs nightly
> to perform updates.
> 
> My question is this, the program that I am referring to uses SQL for
> most all of it's processing.  However, at the point that it needs to
> do an INSERT it is instead doing a WRITE.  I do not know why this
> decision was made, but we haven't had problems with this program until
> now so it strikes me as odd that it is failing now.  Does anyone know
> if a WRITE handles Identity Value Columns differently than an SQL
> insert?
> 
> My assumption would have been that the assignment of an identity
> column would be a DB2 function.  However, we are getting duplicate
> record errors at the point of the WRITE even though the identity
> column isn't referenced in this program.   So, I am wondering if
> changing this write to an insert statement would fix our problem as I
> have checked  the index that we are using over this table and the
> record we are trying to add is truly not there.  That leads me to
> believe our problem MUST BE related to the identity column as the ID
> being used IS in the table.
>  
> Any input would be greatly appreciated.    
> 
> Thanks.  
> 
> -Tim

0
jonball (677)
8/26/2004 1:12:02 PM
Hi Brian,

Thanks for the feedback and for performing the test using an RPGIV
program with a write.  This is the exact same scenario.

I have since gotten IBM Rochester involved with this as I have now
found that I also can no longer do even so much as an insert into this
table using SQL.

Here is what we think is happening and are now in the process of
proving or disproving.  You may recall that I said the identities are
reset in a different library on Saturday and copied to production
using a CPYF (*replace) on Monday.
The problem "could potentially be" due to the fact that we are not
resetting the identity column is the production library.   We are only
replacing the records.

Therefore, consider the following test...

1.) You have Library A with a table that has an identity column
defined as generated always and there are 5 records in that table.

2.) You have library B with an identical table that has an identity
column defined as generated always and there are 5 identical records
in that table also.

3.) Clear this file using CLRPFM and rebuild the data in the table
however you choose.  In our case, we are using RPGIV.

4.) Then, reset the identity columns in this table starting at 1. 

There can be no further activity on either of these tables before the
next step.

4.) Do a CPYF from Library B to Library A.

If you were now to add a record to the table in Library A, what would
YOU expect to see for an identity value on that record if you did a
IDENTITY_VAL_LOCAL() on that table?

I can personally see where people might answer 1, 6 or even 11 but I
don't know the correct answer.

  

"Brian" <no.spam.for@me> wrote in message news:<412cba0f$0$8081$a1866201@newsreader.visi.com>...
> I did a quick test in the course of researching use of identiy column.  I
> used an RPGIV program (with record I/O, not SQL) to insert records into a
> table that contains an identiy column.  The value of the identity field
> seems to be totally ignored, and the database handles the assignment of the
> identity column.  The identity column was defined with generate always.  My
> test was done on V5R2.
> 
>
0
tmecheski (9)
8/26/2004 1:21:23 PM
Tim Mecheski wrote:
> Hi Brian,
> 
> Thanks for the feedback and for performing the test using an RPGIV
> program with a write.  This is the exact same scenario.
> 
> I have since gotten IBM Rochester involved with this as I have now
> found that I also can no longer do even so much as an insert into this
> table using SQL.
> 
> Here is what we think is happening and are now in the process of
> proving or disproving.  You may recall that I said the identities are
> reset in a different library on Saturday and copied to production
> using a CPYF (*replace) on Monday.
> The problem "could potentially be" due to the fact that we are not
> resetting the identity column is the production library.   We are only
> replacing the records.
> 
> Therefore, consider the following test...
> 
> 1.) You have Library A with a table that has an identity column
> defined as generated always and there are 5 records in that table.
> 
> 2.) You have library B with an identical table that has an identity
> column defined as generated always and there are 5 identical records
> in that table also.
> 
> 3.) Clear this file using CLRPFM and rebuild the data in the table
> however you choose.  In our case, we are using RPGIV.
> 
> 4.) Then, reset the identity columns in this table starting at 1. 

How is this being done?

> 
> There can be no further activity on either of these tables before the
> next step.
> 
> 4.) Do a CPYF from Library B to Library A.

You have two steps '4.)'; THERE'S your problem.  Just 
kidding; sorry.

WHAT is being copied from library B to library A, and 
how does this involve the target file (with the 
identity column) and the RPG IV program that writes to it?

It sounds to me as if the CPYF step IS, in fact, going 
to generate duplicate records, if not duplicate keys, 
in this target file, if the program in question is a 
trigger program.  That is (simplifying, and assuming 
this is a trigger issue):

- libraries A and B each contain to business application
   tables (X & Y), and some kind of audit table (Z);
   Z is the target table of the trigger program

- assume X contains 5 rows, Y contains 10 rows, and so
   Z contains 15 audit rows

- based on what you wrote above, you copy (*replace)
   B/Z to A/Z, and somehow reset the identify column values
   in A/Z; this table now contains 15 rows

- now you copy B/X to A/X, and B/Y to A/Y; for each row
   written to the target tables in the CPYF steps, the
   RPG IV trigger program fires, and (in the absence of
   true duplicate key problems) writes/inserts a row to
   A/Z; at the conclusion of the CPYF steps, A/Z will 
contain
   30 rows - 15 based on the copy of B/Z to A/Z, and 
another
   15 based on the action of the trigger program

I recognize I have made a lot of assumptions that might 
be wrong.

> 
> If you were now to add a record to the table in Library A, what would
> YOU expect to see for an identity value on that record if you did a
> IDENTITY_VAL_LOCAL() on that table?

I am not sufficiently familiar with identity columns in 
iSeries DB2 to know about that function, or where it's 
used, but a quick search revealed an IBM PTF that is 
intended to solve a problem of the function returning a 
null value.  The PTF is SI13616, it's for V5R2, and the 
APAR it fixes is SE15362.  The abstract states: 
'OSP-DB-INCORROUT IDENTITY_VAL_LOCAL function returning 
null'

See 
http://www-912.ibm.com/a_dir/as4ptf.nsf/0/ad0161ad3013be2186256e9f0047835e?OpenDocument

or http://tinyurl.com/55fp6 (if the above link breaks).

> 
> I can personally see where people might answer 1, 6 or even 11 but I
> don't know the correct answer.
> 
>   
> 
> "Brian" <no.spam.for@me> wrote in message news:<412cba0f$0$8081$a1866201@newsreader.visi.com>...
> 
>>I did a quick test in the course of researching use of identiy column.  I
>>used an RPGIV program (with record I/O, not SQL) to insert records into a
>>table that contains an identiy column.  The value of the identity field
>>seems to be totally ignored, and the database handles the assignment of the
>>identity column.  The identity column was defined with generate always.  My
>>test was done on V5R2.
>>
>>

0
jonball (677)
8/26/2004 1:55:54 PM
Jonathan Ball wrote:

> Tim Mecheski wrote:
> 
>> Hi Brian,
>>
>> Thanks for the feedback and for performing the test using an RPGIV
>> program with a write.  This is the exact same scenario.
>>
>> I have since gotten IBM Rochester involved with this as I have now
>> found that I also can no longer do even so much as an insert into this
>> table using SQL.
>>
>> Here is what we think is happening and are now in the process of
>> proving or disproving.  You may recall that I said the identities are
>> reset in a different library on Saturday and copied to production
>> using a CPYF (*replace) on Monday.
>> The problem "could potentially be" due to the fact that we are not
>> resetting the identity column is the production library.   We are only
>> replacing the records.
>>
>> Therefore, consider the following test...
>>
>> 1.) You have Library A with a table that has an identity column
>> defined as generated always and there are 5 records in that table.
>>
>> 2.) You have library B with an identical table that has an identity
>> column defined as generated always and there are 5 identical records
>> in that table also.
>>
>> 3.) Clear this file using CLRPFM and rebuild the data in the table
>> however you choose.  In our case, we are using RPGIV.
>>
>> 4.) Then, reset the identity columns in this table starting at 1. 
> 
> 
> How is this being done?
> 
>>
>> There can be no further activity on either of these tables before the
>> next step.
>>
>> 4.) Do a CPYF from Library B to Library A.
> 
> 
> You have two steps '4.)'; THERE'S your problem.  Just kidding; sorry.
> 
> WHAT is being copied from library B to library A, and how does this 
> involve the target file (with the identity column) and the RPG IV 
> program that writes to it?
> 
> It sounds to me as if the CPYF step IS, in fact, going to generate 
> duplicate records, if not duplicate keys, in this target file, if the 
> program in question is a trigger program.  That is (simplifying, and 
> assuming this is a trigger issue):
> 
> - libraries A and B each contain to business application

TWO business application tables (damn, I hate this 
keyboard...)


>   tables (X & Y), and some kind of audit table (Z);
>   Z is the target table of the trigger program
> 
> - assume X contains 5 rows, Y contains 10 rows, and so
>   Z contains 15 audit rows
> 
> - based on what you wrote above, you copy (*replace)
>   B/Z to A/Z, and somehow reset the identify column values
>   in A/Z; this table now contains 15 rows
> 
> - now you copy B/X to A/X, and B/Y to A/Y; for each row
>   written to the target tables in the CPYF steps, the
>   RPG IV trigger program fires, and (in the absence of
>   true duplicate key problems) writes/inserts a row to
>   A/Z; at the conclusion of the CPYF steps, A/Z will contain
>   30 rows - 15 based on the copy of B/Z to A/Z, and another
>   15 based on the action of the trigger program
> 
> I recognize I have made a lot of assumptions that might be wrong.
> 
>>
>> If you were now to add a record to the table in Library A, what would
>> YOU expect to see for an identity value on that record if you did a
>> IDENTITY_VAL_LOCAL() on that table?
> 
> 
> I am not sufficiently familiar with identity columns in iSeries DB2 to 
> know about that function, or where it's used, but a quick search 
> revealed an IBM PTF that is intended to solve a problem of the function 
> returning a null value.  The PTF is SI13616, it's for V5R2, and the APAR 
> it fixes is SE15362.  The abstract states: 'OSP-DB-INCORROUT 
> IDENTITY_VAL_LOCAL function returning null'
> 
> See 
> http://www-912.ibm.com/a_dir/as4ptf.nsf/0/ad0161ad3013be2186256e9f0047835e?OpenDocument 
> 
> 
> or http://tinyurl.com/55fp6 (if the above link breaks).
> 
>>
>> I can personally see where people might answer 1, 6 or even 11 but I
>> don't know the correct answer.
>>
>>  
>> "Brian" <no.spam.for@me> wrote in message 
>> news:<412cba0f$0$8081$a1866201@newsreader.visi.com>...
>>
>>> I did a quick test in the course of researching use of identiy 
>>> column.  I
>>> used an RPGIV program (with record I/O, not SQL) to insert records 
>>> into a
>>> table that contains an identiy column.  The value of the identity field
>>> seems to be totally ignored, and the database handles the assignment 
>>> of the
>>> identity column.  The identity column was defined with generate 
>>> always.  My
>>> test was done on V5R2.
>>>
>>>
> 

0
jonball (677)
8/26/2004 1:58:38 PM
Tim Mecheski wrote:
> Hi Brian,
> 
> Thanks for the feedback and for performing the test using an RPGIV
> program with a write.  This is the exact same scenario.
> 
> I have since gotten IBM Rochester involved with this as I have now
> found that I also can no longer do even so much as an insert into this
> table using SQL.
> 
> Here is what we think is happening and are now in the process of
> proving or disproving.  You may recall that I said the identities are
> reset in a different library on Saturday and copied to production
> using a CPYF (*replace) on Monday.

I still find this curious.  If the table of interest in 
library B also has the column specified as an identity 
column, I'm not clear as to how you can "reset" the 
values.  I tried doing both a SQL UPDATE to an identity 
column, and modifying it programmatically.  The UPDATE 
failed explicitly; the programmatic update of the 
column didn't give me any error, but it also didn't 
work:  when I examined the rows after the program ran, 
the values were unchanged.

> The problem "could potentially be" due to the fact that we are not
> resetting the identity column is the production library.   We are only
> replacing the records.

I think, rather, that the problem is that you ARE 
resetting the identity column in the production 
library, and that there also is a unique constraint on 
the column; possibly the column is the primary key of 
the table.  However it is you achieve the resetting of 
the values in the column in library B, when you copy 
the file to library A, you now have an identity column 
value of 1, AND you have reset the identity attributes 
of it to begin with 1 for the next insert.  Because of 
the (probable) unique constraint on the column, which 
will *not* show up as a separate index on the table, 
you're going to get a duplicate key error when the 
program attempts to write a new row.

What is the point in "resetting" the actual identity 
column values for the table in library B before copying 
the table to library A?

> 
> Therefore, consider the following test...
> 
> 1.) You have Library A with a table that has an identity column
> defined as generated always and there are 5 records in that table.
> 
> 2.) You have library B with an identical table that has an identity
> column defined as generated always and there are 5 identical records
> in that table also.
> 
> 3.) Clear this file using CLRPFM and rebuild the data in the table
> however you choose.  In our case, we are using RPGIV.

LOTS of questions:

1.  Why are you clearing this table if the records are
     identical to those in the file version in library A?

2.  What is the source of the data for rebuilding this 
table?

3.  Does the RPG program attempt to populate the identity
     column?

4.  What do the contents of the identity column look like
     after the rebuild?

> 
> 4.) Then, reset the identity columns in this table starting at 1. 

Huh?  Why are you going to reset the identity column 
(singular - a table may only have one such column) of 
this table AFTER rebuilding it?  I suppose I should 
ask, WHICH table:  in B, or in A?  "This" table, above, 
is ambiguous.

> 
> There can be no further activity on either of these tables before the
> next step.
> 
> 4.) Do a CPYF from Library B to Library A.
> 
> If you were now to add a record to the table in Library A, what would
> YOU expect to see for an identity value on that record if you did a
> IDENTITY_VAL_LOCAL() on that table?

If you altered the table in A to reset the identity 
column to begin with 1, and then inserted a row, I 
would expect to see the function return a value of 2. 
However, I still strongly suspect you have some kind of 
unique constraint on the identity column, either UNIQUE 
or PRIMARY KEY, and you won't be able to add a record 
to the table in A, because the WRITE will fail on a 
duplicate key.

> 
> I can personally see where people might answer 1, 6 or even 11 but I
> don't know the correct answer.
> 
>   
> 
> "Brian" <no.spam.for@me> wrote in message news:<412cba0f$0$8081$a1866201@newsreader.visi.com>...
> 
>>I did a quick test in the course of researching use of identiy column.  I
>>used an RPGIV program (with record I/O, not SQL) to insert records into a
>>table that contains an identiy column.  The value of the identity field
>>seems to be totally ignored, and the database handles the assignment of the
>>identity column.  The identity column was defined with generate always.  My
>>test was done on V5R2.
>>
>>

0
jonball (677)
8/26/2004 6:13:20 PM
Jonathan Ball <jonball@whitehouse.not> wrote in message news:<CklXc.866$W_5.767@newsread1.news.pas.earthlink.net>...
> Tim Mecheski wrote:

> The last sentence in the preceding paragraph leads me 
> to think the program in question is a trigger program. 
>   I don't know if that has any importance or not.

I can see where it may appear that way based on the way that I worded
it.  Sorry about that.  However, this is not the case.  These are two
completely different libraries each with the same file.   The file is
rebuilt fresh in one library and then copied to the other.  Again, I
don't know why the decision was made to do things this way in the
past, I am simply supporting it now.


> 
> Are you sure the duplicate key problem is happening 
> when the program is writing to its target file, or 
> could it be happening on one of the other files in the 
> course of the copy?

It is definitely happening when the program is writing to the target
file in the production library.


> 
> If none of the above is pertinent, I suggest you need 
> to identify whatever it was that changed in the system 
> at the point the program began failing.
> 

Thats a really good question that neither I nor 3 or 4 other
developers here can seem to answer just yet.  It is my belief that we
hitting a section of code that hasn't been executed since this program
was written a year ago and quite simply no one has ever known.

Ultimlately, we are coming down to a solution that appears that it
will work.  We may simply need to do an ALTER TABLE to reset the
identitiy values on the target file as well (just like we do in source
table).  That way database should never get confused as to where it
needs to start inserting records again.  I will update everyone once I
hear back from IBM on this.
0
tmecheski (9)
8/26/2004 7:06:55 PM
Reply:

Similar Artilces:

Identity Column Question #2
Jonathan Ball <jonball@whitehouse.not> wrote in message news:<4LpXc.1049$W_5.925@newsread1.news.pas.earthlink.net>... > > I still find this curious. If the table of interest in > library B also has the column specified as an identity > column, I'm not clear as to how you can "reset" the > values. I tried doing both a SQL UPDATE to an identity > column, and modifying it programmatically. The UPDATE > failed explicitly; the programmatic update of the > column didn't give me any error, but it also didn't > work: when I examined the rows after the program ran, > the values were unchanged. > When I stated the word "reset", I should have clarified by stating that we need to do an ALTER TABLE to reset the identity columns beginning at a value greater than anything currently used. We actually did do this today and reran the job and everything worked fine, but it still does not explain why clearing the file or replacing the records should make a difference. > > I think, rather, that the problem is that you ARE > resetting the identity column in the production > library, and that there also is a unique constraint on > the column; possibly the column is the primary key of > the table. However it is you achieve the resetting of > the values in the column in library B, when you copy > the file to library A, you now have an identity column > value of 1, AND you ...

Identity Column in INFORMATION_SCHEMA or the sys tables
Hello, Where can one find the identity column for a table in the INFORMATION_SCHEMA or the sys tables? Or is there a function that can return the name or id of the identity column for a particular table? Thanks. > Where can one find the identity column for a table in the > INFORMATION_SCHEMA or the sys tables? Or is there a function that can > return the name or id of the identity column for a particular table? SELECT name FROM sys.columns WHERE object_id=OBJECT_ID('dbo.YourTableHere','U') AND is_identity=1 -- Tom http://kbupdate.info/ | http://suppline.com/ >> Where can one find the identity column for a table in the >> INFORMATION_SCHEMA or the sys tables? Or is there a function that can >> return the name or id of the identity column for a particular table? > > SELECT name > FROM sys.columns > WHERE object_id=OBJECT_ID('dbo.YourTableHere','U') AND is_identity=1 SQL 7.0 / 2000 version: SELECT name FROM dbo.syscolumns WHERE id=OBJECT_ID('dbo.YourTableHere','U') AND COLUMNPROPERTY(id,name,'IsIdentity')=1 -- Tom http://kbupdate.info/ | http://suppline.com/ ...

ibm as400 scsi drives in PC ? -newbie question-
i have aquired 5 ibm scsi drives and cages pulled from a retired AS400 server. i was hoping i could use them in a raid configuration connected to a generic PC with an adaptec 2940u2w . they are all recognized but throw up errors when writing to drive ( ie. formatting) are these compatable with regular PC scsi ? is it the drive microcode ? am i out of luck on these drives ? drive cage = type 6713 ibm FRU = 59H6611 drive model number = DGHS-09U date code 01APR99 (all 5 same date) The low leve format of the drives is different (520 vs. 512 for PCs as I recall) You should be able to find a utility to reformat them. HTH, Charles In article <3fr4h0hqcq8dpeibqkmac7cv9ilm85oupt@4ax.com>, reply@here.org says... > i have aquired 5 ibm scsi drives and cages pulled from a retired AS400 > server. > > i was hoping i could use them in a raid configuration connected to a > generic PC with an adaptec 2940u2w . > > they are all recognized but throw up errors when writing to drive > ( ie. formatting) > > are these compatable with regular PC scsi ? > > is it the drive microcode ? > > am i out of luck on these drives ? > > drive cage = type 6713 > ibm FRU = 59H6611 > drive model number = DGHS-09U date code 01APR99 (all 5 same date) > thank you , i`ll look into that - drives seem to stop responding after adaptec bios format utility is attempted - led activity indicator goes off - no writing noise ibm/hitachi ...

question on inserting a record on sql server with identity column as key
Hi, All: Please help. I use sql server as back end and Access 2003 as front end (everything is DAO). A table on SQL server has an identity column as the key. We have trouble on adding records to this table using the following SQL. strSQL = "INSERT INTO myTableOnSQLServer (A, B, C, D, E) SELECT A, B, C, D, E FROM myTableonAccessLocal" db.execute strSQL The schema of the table "myTableOnSQLServer" and the schema of the table "myTableonAccessLocal" are all the same except that the "myTableOnSQLServer" has an identity column (ID). The key of the "myTableOnSQLServer" is "ID" and the table "myTableonAccessLocal" does not have a key. When we try to run the query, it gives errors indicating the key is violated or missing. Should I figure out the autonumber for it first and then add to the SQL server table? Many thanks, HS Hongyu Sun (sun@cae.wisc.edu) writes: > Please help. I use sql server as back end and Access 2003 as front end > (everything is DAO). > > A table on SQL server has an identity column as the key. > > We have trouble on adding records to this table using the following SQL. > > strSQL = "INSERT INTO myTableOnSQLServer (A, B, C, D, E) SELECT A, B, C, D, > E FROM myTableonAccessLocal" > db.execute strSQL > > The schema of the table "myTableOnSQLServer" and the schema of the table > "myTableonAccessLocal" are all the s...

A Basic question on Connecting non-IBM FC Disk Subsystem to AS400
Hi, I'm exploring connecting a non-IBM AS400 disk subsystem to AS400, for example connecting an IBM FAStT Storage Subsystem to the AS400. Can this be done? If so what do I need to get this working? Is the config certified by IBM? Thank you. ...

com.sys and usbser.sys question
I got a question, for those knowing more about that matter than myself, which shouldn't be hard ;-) Temporarily having 2 phone lines at my disposal, I wanted to put my old modem back to use as a phone number dialer, using the BonusPack PIM Phonebook application. But I had quite some trouble to get my COM1 port to work at all with any comm application. It finally turned out, that COM.SYS has to be loaded before USBSER.SYS, since otherwise USBSER.SYS is hijacking COM1 unnoticed. Now, in the order shown below, it assigns itself to COM6 (if not remed out), but COM1 still d...

Clustered index on the identity column or a datetime column
Hello all, We have a table with about 2 million rows that is used to store log events. The table has an identity column and also a datetime column to record the event time. It is expected to at least double in size over its lifetime. Because the datetime records the current time, the value of that column goes up as the value in the identity column goes up. When doing searches on the table it is normal to have a date range as part of the search. This would lead me to think that the clustered index of the main table should be on the datetime column, letting SQL Server know that a date range is sequential in the table as opposed to the database server hopping all over the place to retrieve rows. However is there any argument for putting the clustered index on the identity column of the main table? The datetimes may not be unique (highly unlikely in the given application, but logically possible I guess) - would that lessen the advantage of the clustered index on the datetime? How about putting the clustered index on the identity column, and if given two dates to form a range then look up the two corresponding identities and turn the query into an indentity range query, thus allowing the identity column clustered index to be used for the date range query as well? Or is there some way to let SQL Server know that two columns are 'linked' so that it knows to alter the query itself? (i.e. a range on column A is equivalent to a range on column B, and column B is the cluste...

Existing columns vs. Null columns question
I have a get function that looks like this: /** * Magic function that gets properties * @param mixed $var The property that should be retrieved * @return mixed The value of the property. Returns null if property doesn't exist */ function __get($var) { $special_properties = array('name'); if (!isset($this->data[$var]) && !in_array($var,$special_properties)) { echo "Warning: $var is not a property for ".get_class($this)."!\n"; return null; } else{ switch ($var){ case 'name': return $this->data['first_name'].' '.$this->data['last_name']; break; case 'office_phone': case 'mobile_phone': case 'other_phone': return $this->to_phone_string($this->data[$var]); break; default: return $this->data[$var]; } } } Here's the question. Say I have a row in my database that has a null value in the column other_phone. When it gets to the first if statement !isset($this->data[$var]) it is going to evaluate to true (in other words $this->data['office_phone'] is not set because it is null). How do I evaluate if the column is merely not there instead of not there or null? On 16 Oct, 14:46, GameboyHippo <jasonwthomp...@gmail.com> wrote: > I have a get function that looks like this: > > /** > * Magic function that gets properties > * @para...

To make an existing column become an identity column
Hi (SQL Server 2000) I have an existing table (t) with a column that is NOT an identity column (t.ID), but it has manually inserted "row numbers". I want to make this column become an identity column. This column is a key field to other tables, so I want to keep the row numbers that are allready inserted. From the Query Analyzer, how do I do this? Thanks in advance! Regards, Gunnar V�yenli EDB-konsulent as NORWAY Try this. Copy the table by using Export Data. Then using the copied table set your column to identity and see if any of the numbers change. Dave "Gunnar V�yenli" <gv@edbkonsulent.no> wrote in message news:3f72d7e8$1@news.broadpark.no... > Hi > (SQL Server 2000) > > I have an existing table (t) with a column that is NOT an identity column > (t.ID), but it has manually inserted "row numbers". I want to make this > column become an identity column. This column is a key field to other > tables, so I want to keep the row numbers that are allready inserted. > > From the Query Analyzer, how do I do this? > > Thanks in advance! > > Regards, > Gunnar V�yenli > EDB-konsulent as > NORWAY > > Check SET IDENTITY_INSERT in Books Online(BOL). It will allow you to insert explicit values into an identity field. CJ "Gunnar V�yenli" <gv@edbkonsulent.no> wrote in message news:3f72d7e8$1@news.broadpark.no... > Hi > (SQL Server 2000) > > I have an existi...

Printing on AS400 via IBM AS400 Java Toolkit
Hello all, I'm working on a program that needs to send a print job to a printer connected to an AS/400. I've tried using the SpooledFileOutputStream and I've also tried using one of the SCS Writer classes. Neither solution is working. With the SpooledFileOutputStream I am at least able to create my print file, but when my program ends, the file is still not being printed. This program does not run on the AS400, it runs on a PC and connects to the AS400 via the toolkit classes. I know this part works as I am able to use the toolkit to access Data Queues, Files and Data Areas without a problem. Is there anyplace anyone can point me to see some examples of how to print a file using the AS400 Java Toolkit? Thanks in advance, Chuck Chuck, What printer data stream is used? or how was the printer data generated? I am wondering if the data stream being generated matches the data stream of the printer connected to the iSeries? What printer is attached to the iSeries and how is it configured? The iSeries info center has some Toolbox examples: Programming>Java>IBM Toolbox for Java>IBM Toolbox for Java Classes> Access Classes>Print>Creating... Dave Chuck wrote: > Hello all, > > I'm working on a program that needs to send a print job to a printer > connected to an AS/400. I've tried using the SpooledFileOutputStream > and I've also tried using one of the SCS Writer classes. Neither > solution is working. With the Sp...

Columns, columns, too many columns
To all: Here's an interesting one: I have a query that produces 56 (!!) columns of data. The first three columns are "to repeat at left", as can be selected in Excel at File --> Page Setup --> Sheet tab. That is, the first page prints (say) 10 columns. The second page prints the first three columns, and the next seven columns, and so on. Each page would do this until all columns are printed. Access gives a limit to the amount of width available on any given page, so I don't know how to print this as an Access report. (I could dump it into Excel, and pick it up from there; I kind of want to use Access, at least for the moment.) Any other ideas? Thanks a lot, and Happy Friday!! Sean strauss.sean@gmail.com wrote: > To all: > > Here's an interesting one: I have a query that produces 56 (!!) columns > of data. The first three columns are "to repeat at left", as can be > selected in Excel at File --> Page Setup --> Sheet tab. That is, the > first page prints (say) 10 columns. The second page prints the first > three columns, and the next seven columns, and so on. Each page would > do this until all columns are printed. > > Access gives a limit to the amount of width available on any given > page, so I don't know how to print this as an Access report. (I could > dump it into Excel, and pick it up from there; I kind of want to use > Access, at least for the moment.) Any other ide...

Shifting data from columns and removing question mark characters from columns
I moved data from a MS-Word Table into a MS-Access table using VBA code. Almost all of the word documents had five rows for first table in the document, but few Word documents had six rows for their first table which I did not know earlier. I created the Access table with five columns to hold data from each corresponding row of the first table of the Word document. Now, the documents which had six rows in their first table have their data flowing into sixth column of the Access table which was for storing data of table 2 from the Word document. I had something like Word Document A which has table 1 having five rows Table 1 Row 1 Row 1 Data Row 2 Row 2 Data .. .. Row 5 Row 5 Data But, Word Document B has a table 1 having six rows Table 1 Row 1 Row 1 Data Row 2 Row 2 Data .. .. Row 5 Row 5 Data Row 6 Row 6 Data Access Table "mytable" has a structure like Column for Row 1 of Table 1, Column for Row 2 of Table 1, Column for Row 3 of Table 1, Column for Row 4 of Table 1, Column for Row 5 of Table 1, Column for Row 1 of Table 2, Column for Row 2 of Table 2, .. .. .. Column for Row N of Table N, Access Table "myTable" has some rows like Column for Row 1 of Table 1 contains Row 1 Data of Table 1 Column for Row 2 of Table 1,contains Row 2 Data of Table 1 Column for Row 3 of Table 1,contains Row 3 Data of Table 1 Column for Row 4 of Table 1,contains Row 4 Data of Table 1 Column for Row 5 of Table 1,contains Row 5 Data of Table 1 Colum...

Identity question
Fairly often, when I click a different identity in the dropdown box, then do a selective download, the POP server for the 'old' identity is used. I can't see why this happens unpredictably. Thanks. -- Sheldon Isaac lose all .control when replying Shel wrote: > Fairly often, when I click a different identity in the dropdown box, then > do a selective download, the POP server for the 'old' identity is used. This might be an un-expected side-effect of "When checking for mail, performs checks for other identities" on the new identity....

identity column
Hi, I would like a piece of advice. I have 3 foreign keys in a table used as primary keys for this table. Is it useful in that case to have just one identity column that would be used as the unique primary key, thus no need to have 3 primary keys ? Advantages vs Drabacks ? Regards Sam (samuel.berthelot@voila.fr) writes: > I would like a piece of advice. > I have 3 foreign keys in a table used as primary keys for this table. > Is it useful in that case to have just one identity column that would > be used as the unique primary key, thus no need to have 3 primary keys > ? > Advantages vs Drabacks ? Sometimes this makes things easier. Sometimes it makes things more difficult. The advantage with the IDENTITY column are more directly apparent with less typing and all that. The disadvantages are more subtle but once you run into them, you often find that they are more serious. Thus, unless there is a special reason for it, do not use a surrogate key. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp Sam, many developers seem to follow the dogma that every table must have a unique numeric primary key (PK). I do not. The question comes down to this: will the application or end users ever use the generated PK? If no, then why add it? In this case there is no point. On the other hand you need to consider if this table will have child rows and h...

Identity...I need to get the last (or highest number in Identity column)...
Ok, I just need to know how to get the last record inserted by the highest IDENTITY number. Even if the computer was rebooted and it was two weeks ago. (Does not have to do with the session). Any help is appreciated. Thanks, Trint SELECT IDENT_CURRENT('table_name') ; -- David Portas SQL Server MVP -- "trint" <trinity.smith@gmail.com> wrote in message news:1127164340.720014.70160@g14g2000cwa.googlegroups.com... > Ok, > I just need to know how to get the last record inserted by the highest > IDENTITY number. Even if the computer was rebooted and it was two > weeks ago. (Does not have to do with the session). > Any help is appreciated. > Thanks, > Trint > ...

Identity columns
I have been using the following query to identify the IDENTITY columns in a given table. (The query is inside an application.) select column_name from information_schema.columns where table_schema = 'user_a' and table_name = 'tab_a' and columnproperty(object_id(table_name), column_name, 'IsIdentity') = 1 This works. When "user_a" performs the query, everything is OK. Now, another user wanted to use the same application. So, "user_b" clicks on a button, and the exact same query as above is run. (No substitutions are made; user_b is trying to see the identity column in [user_a].[tab_a]). However, the query returns null, instead of the identity column name. User_b can read the table and select from it just fine. Why am I getting two different results against the same query? Do I need to rewrite the query to go against different information schema views? You might try specifying the table schema in the OBJECT_ID function to avoid ambiguity. Also, consider quoting the identifiers: SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'user_a' AND TABLE_NAME = 'tab_a' AND COLUMNPROPERTY( OBJECT_ID( QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)), COLUMN_NAME, 'IsIdentity') = 1 -- Hope this helps. Dan Guzman SQL Server MVP <newtophp2000@yahoo.com> wrote in message news:1103334367.788877.229370@f14g2000cwb.googlegroups.com......

Questions over questions
Hello people, I have a problem with my ISP! He kills my php script, if they were executed over 30 seconds. Can I use some trick to fake a little bit? That I can execute the script longer!? Greeting! Sven Dzepina wrote: > Hello people, > > I have a problem with my ISP! He kills my php script, if they were executed > over 30 seconds. > Can I use some trick to fake a little bit? That I can execute the script > longer!? > > Greeting! > > If your ISP doesn't run your script in safe mode, which it most likely does, then you can set_time_limit(0); for unlimited execution time. Otherwise there is probably no way to let it run longer. "John Downey" <blah@doesntexist.com> wrote in message news:8pdib.121103$xx4.20419112@twister.neo.rr.com... > Sven Dzepina wrote: > > > Hello people, > > > > I have a problem with my ISP! He kills my php script, if they were executed > > over 30 seconds. > > Can I use some trick to fake a little bit? That I can execute the script > > longer!? > > > > Greeting! > > > > > If your ISP doesn't run your script in safe mode, which it most likely > does, then you can set_time_limit(0); for unlimited execution time. > Otherwise there is probably no way to let it run longer. > I heard a rumour that the sleep() function resets the script execution time each time it's called. So if you use it in conjunction with a lo...

IBM AS400
Does anyone have some notes, documentation or helful pointers about navigating, command language and DB2 on an AS400 for a guy who has done HP3000, Windows 2k/2k3, MS SQL, HP9000, IBM ES9000/UNIX, SCO UNIX? Ideally a commands cross reference qaulivalent would be terrific - I.E. HP3000 to AS400. Thanks much. P.S. I'm taking a role in a shop that runs its ERP system on this platform. Jim. ____________________________________________________________________________________ Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://www.y...

Questions, Questions...
Hi! I took the routine from Gastronor.mdb: In the frmOrderDetails -> ITemID_AfterUpdate: Dim strFilter as String strFilter = "ItemID = " & Me!ItemID but it didn't work on win 2000 with access 2000. However, after playing around for a while, I found: Me!UnitPrice = ItemID.Column(2) to work just fine, even after updating prices in the tblItems. Anybody knows why? The routine in win 98/win nt in the footer of frmOrderDetails: =Sum((Price*Amount*(1-[Discount])/100)*100)) didn't either work. After testing and trying I finally discovered that =Sum(Price*Amount*Discount) does the job on win 2000. ???? What is happening? Anybody know if there is a major difference in this thing from win98/win nt to win 2000? (I should maybe say that I'm working only with DAO 3.6) Questions: 1.I have my own four buttons on frmOrders (btnGoToFirst,btnGoToPRevious,btnGoToNext,btnGoToLast). How can I disable them: when user click GoToLast and comes to last order and I wish that btnGoToNext and btnGoToLast should be disabled, and similarly with the first record? Anybody know an article on this? 2.I have two invisible fields on the form. I=chkWritten and II=chkCreditMemo In the cmdWriteCreditMemo I want to check whether I and/or II is checked. Because the user should not be able to print a CreditMemo if either he forgot to print an invoice first, or if he already sendt both invoice and creditmemo to printer. I have been trying: if (Me.chkPrinted.Value=False) AND ...

Misc questions
For the IBM compilers, can XN and XU constants contain a period (Hex/Decimal Point) to indicate a scaling factor? I don't have a PL/I compiler to test this and the documentation is unclear to me. Also, the manuals refer to "?" as a macro trigger character, but I can find no other information about this. Is there any real use of the "?" character in PL/I, other than in a character string constant? Finally, the PL1 list at Dartmouth appears to be dead. Does anyone have any information about this? Are there any other active lists? Thanks. zzq wrote: > For the IBM compilers, can XN and XU constants contain a period (Hex/Decimal > Point) to indicate a scaling factor? I don't have a PL/I compiler to test > this and the documentation is unclear to me. A strict reading of the documentation says no. > Also, the manuals refer to "?" as a macro trigger character, but I can find > no other information about this. Is there any real use of the "?" character > in PL/I, other than in a character string constant? It is a mystery. -- John W. Kennedy "The bright critics assembled in this volume will doubtless show, in their sophisticated and ingenious new ways, that, just as /Pooh/ is suffused with humanism, our humanism itself, at this late date, has become full of /Pooh./" -- Frederick Crews. "Postmodern Pooh", Preface Although xn and xu are "binary fixed point constants&quo...

questions for column vector
well, i have to create 255 column vectors of 255x1 size which should be like these, 0;0;0;0;...;0 (255 times of zeros) 1;1;1;1;...;1 (255 times of ones) ... 255;255;255;...;255 (255 times of 255) what i think leaves unexploited the computational skills of matlab. So, what do you think can i improve the following ? alex0 = zeros(255,1) alex1 = ones(255,1) alex2 = 2*alex1 ... alex255 = 255*alex1 thanks a lot Dim Howbout: vec = (0:255)'; result = repmat(vec,1,255); grandfather <dimpallas@gmail.com> wrote in message <31025107.1202831320079.JavaMail.jakarta@nitrogen.mathfor...

Matrix where all columns are identical
I want to make a matrix with all of the columns identical to each other. Is there a quick way to do this? On Sep 4, 4:25=A0pm, "Jonas " <jonas...@gmail.com> wrote: > I want to make a matrix with all of the columns identical to each other. = Is there a quick way to do this? %construct constant column m =3D 5; x =3D ceil(rand(m,1)*5); % generated randomly for example % produce the matrix. n =3D 5; % desired columns of the matrix y =3D repmat(x, 1,n); % y is m*n "Jonas " <jonasmyo@gmail.com> wrote in message <h7r800$hcs$1@fred.mathworks.com>... > I w...

Question on Idenity Columns
Is there a way to query any system tables, like sysobjects, for User tables with Identity columns? We have a SQL2000 server that we want to replicate. One of my tasks is to identify all tables with Identity columns that are missing the 'not for replication' clause. Thanks, JoeyD JoeyD (joeydba@yahoo.com) writes: > Is there a way to query any system tables, like sysobjects, for User > tables with Identity columns? We have a SQL2000 server that we want to > replicate. One of my tasks is to identify all tables with Identity > columns that are missing the 'not for replication' clause. SELECT object_name(id), name FROM syscolumns WHERE columnproperty(id, name, 'IsIdentity') = 1 AND columnproperty(id, name, 'IsIdNotForRepl') = 1 -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp Erland - Thank you for your reply. JoeyD "Erland Sommarskog" <esquel@sommarskog.se> wrote in message news:Xns961D3C9067A9Yazorman@127.0.0.1... > JoeyD (joeydba@yahoo.com) writes: > > Is there a way to query any system tables, like sysobjects, for User > > tables with Identity columns? We have a SQL2000 server that we want to > > replicate. One of my tasks is to identify all tables with Identity > > columns that are missing the 'not for replication' clause. > > SELECT object_nam...

KNode Identity question
I subscribe to several of the "Microsoft" Newsgroups (yes I know....) which use a different Identity to others i subscribe to. Is there a way of once having set up an Identity in Group properties for one group, to copy that Identity to the other groups, rather than having to set it up on each group? thanks -- Registered Linux User no 240308 Kubuntu 6.06, Open Office 2 gordonDOTburgessparkerATgbpcomputingDOTcoDOTuk to email me remove the obvious! Gordon wrote: > I subscribe to several of the "Microsoft" Newsgroups (yes I know....) > which use a different Identity to others i subscribe to. Is there a way of > once having set up an Identity in Group properties for one group, to copy > that Identity to the other groups, rather than having to set it up on each > group? > > thanks > Hey, Gordon. Fancy meeting you here! ;-) Sure, set your Identity in Account Properties. You don't need to go group-by-group. In the newsgroup list on the left, right-click on the Account Name. That's where you can assign your identity, your signature, etc. So on the groups I get from Comcast I'm malke with a cunning plan, and on Those Other Groups I'm malke with the Official sig. Best regards, Malke -- "I have a cunning plan..." Malke wrote: > Gordon wrote: > >> I subscribe to several of the "Microsoft" Newsgroups (yes I know....) >> which use a different Identity to others i subscribe to. Is ...

Web resources about - Identity Column Question - comp.sys.ibm.as400.misc

Sexual orientation and gender identity at the United Nations - Wikipedia, the free encyclopedia
... its founding in 1945, the United Nations had not discussed LGBT rights (regarding equality regardless of sexual orientation or gender identity ...

'Life outside of blackness': Montreal family reflects on race, identity
Race, ethnicity and religion are all intertwined for the Eyobs, a Montreal Ethiopian-Jewish family. But the experience of being black differs ...

IRS shuts down identity security tool for taxpayers due to security problems
The Internal Revenue Service has temporarily suspended use of its Identity Protection PIN tool "as part of its ongoing security review," according ...

UK government launches a fast online identity verification service
A new service has launched in the UK, which will allow the country’s citizens to easily verify their identity online. Called CitizenSafe, it ...

NC's new identity hurdle blocks the vote by @BloggersRUs
NC's new identity hurdle blocks the vote by Tom Sullivan Students arrived in a steady stream at the Board of Elections office in Asheville, ...

Singer Trixie Whitley on crafting her own music identity - Videos - CBS News
Singer and multi-instrumentalist Trixie Whitley was born in Belgium and raised in the arts. She’s daughter of the late Chris Whitley, a highly ...

Identity Theft Victim Confronts Alleged Scammer
There’s an episode of Friends in which Monica’s identity is stolen and she goes on to become best friends with the woman posing as Monica Geller, ...

Dear Paul Ryan: America Was Actually Founded On An Identity
The unique culture of our nation's colonial settlers gave us the country we have today

'The Family' Episode 4 Spoilers: Adam Warren's Real Identity Revealed In 'Feathers Of Steel'
Here are some spoilers from the upcoming episode of "The Family" season 1. " The Family " season 1, episode 4 will finally reveal the true identity ...

'Tully Monster' Mystery Solved: True Identity Revealed
The Tully monster's classification has perplexed researchers since 1958.

Resources last updated: 3/24/2016 3:02:05 PM