RE: [U2] I-Descriptor Help

2009-04-29 Thread Andy Baum
Bjorn,

Glad this worked a better way would probably be to use BSCAN :-

  BSCAN IND.ID, IND.REC FROM FIRST.TEST,REC.ID USING 'RECORD_ID' RESET ELSE
  FIRST.ID = IND.REC<1>
  END

If your key is exactly as you have described then you may also hit some 
problems with sorting as any time before 2:46:40am has less than 5 digits. Also 
when creating compound keys I like to use a separator such as '*' or '|' this 
has some advantages when using SQL to access the data. You may want to consider 
a key such as RECORD_ID:'*':SYSTEM(99). SYSTEM(99) gives GMT time in seconds 
since midnight 01-01-1970, this can avoid issues with clocks changing due to 
daylight saving time. The downside is it is only in whole seconds so if you are 
updating more than one record per second for a given RECORD_ID this won't work.

Cheers,

Andy


-Original Message-
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Bjorn Behr
Sent: 29 April 2009 10:56
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] I-Descriptor Help

Thanks all for your assistance.

I managed to get it to work using Andy's suggestion of a Unibasic
SELECTINDEX Statement
 -: SELECTINDEX "RECORD_ID", @ID FROM AUDIT.HIST :-

And then just looping through to find the earliest record.

Your assistance was much appreciated
Bjorn

PS: David. IF you know a better way, please feel free to advise.

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Bjorn Behr
Sent: 29 April 2009 11:28 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] I-Descriptor Help

David

You are correct with what I require.

I am trying to get it to work using an I-Type because
 - It is on the QUOTES File, referencing the AUDIT.HIST File which has a
relationship of one to many.
 - It is required to be on a field on the Quotes File as it is used to
extract data for the MIS system for reporting.

 - If you can suggest another way, I am more than open to suggestions.

Thanks
Bjorn

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Hona, David
Sent: 29 April 2009 11:00 AM
To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] I-Descriptor Help

Bjorn

Executing queries via an I-type simply doesn't work or if it does -
you'll get strange results.

Your requirements are a little unclear...but I am guessing here that
you're wanting to select the first timestamped record by the specified
unique RECORD_ID?

Do you have I-types for the Date and Time elements of the @ID - if so,
you could:

SELECT AUDIT_HIST WITH RECORD_ID = '1234' BY DATE BY TIME FIRST 1

Or something similar - any particular reason you need to have an I-type?

Regards
David


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Bjorn Behr
Sent: Wednesday, 29 April 2009 6:05 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] I-Descriptor Help

Kishor

Sorry, should not be BY RECORD_ID, should be BY @ID

The key is RECORD_ID:DATE:TIME, RECORD_ID is in Field <1> in the record
and refers the the @ID of another file There can be many RECORDS in the
AUDIT.HIST File with the same RECORD_ID, but there DATE and/or TIME will
differ.

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of
kis...@parmars.com
Sent: 29 April 2009 09:46 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] I-Descriptor Help

Hi Bjorn,
Why are you using the BY RECORD_ID clause when you are selecting on
RECORD_ID = '1537044' ?
Should this be @ID for the first record on the AUDIT_HIST file?

Regards,
Kishor


** IMPORTANT MESSAGE * This
e-mail message is intended only for the addressee(s) and contains
information which may be confidential.
If you are not the intended recipient please advise the sender by return
email, do not use or disclose the contents, and delete the message and
any attachments from your system. Unless specifically indicated, this
email does not constitute formal advice or commitment by the sender or
the Commonwealth Bank of Australia (ABN 48 123 123 124) or its
subsidiaries.
We can be contacted through our web site: commbank.com.au.
If you no longer wish to receive commercial electronic messages from us,
please reply to this e-mail by typing Unsubscribe in the subject line.
**
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

The information in or attached to this e-mail message is confidential
and may 

RE: [U2] I-Descriptor Help

2009-04-29 Thread Bjorn Behr
Thanks all for your assistance.

I managed to get it to work using Andy's suggestion of a Unibasic
SELECTINDEX Statement
 -: SELECTINDEX "RECORD_ID", @ID FROM AUDIT.HIST :-

And then just looping through to find the earliest record.

Your assistance was much appreciated
Bjorn

PS: David. IF you know a better way, please feel free to advise.

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Bjorn Behr
Sent: 29 April 2009 11:28 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] I-Descriptor Help

David

You are correct with what I require.

I am trying to get it to work using an I-Type because
 - It is on the QUOTES File, referencing the AUDIT.HIST File which has a
relationship of one to many.
 - It is required to be on a field on the Quotes File as it is used to
extract data for the MIS system for reporting.

 - If you can suggest another way, I am more than open to suggestions.

Thanks
Bjorn

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Hona, David
Sent: 29 April 2009 11:00 AM
To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] I-Descriptor Help

Bjorn

Executing queries via an I-type simply doesn't work or if it does -
you'll get strange results.

Your requirements are a little unclear...but I am guessing here that
you're wanting to select the first timestamped record by the specified
unique RECORD_ID?

Do you have I-types for the Date and Time elements of the @ID - if so,
you could:

SELECT AUDIT_HIST WITH RECORD_ID = '1234' BY DATE BY TIME FIRST 1

Or something similar - any particular reason you need to have an I-type?

Regards
David


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Bjorn Behr
Sent: Wednesday, 29 April 2009 6:05 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] I-Descriptor Help

Kishor

Sorry, should not be BY RECORD_ID, should be BY @ID

The key is RECORD_ID:DATE:TIME, RECORD_ID is in Field <1> in the record
and refers the the @ID of another file There can be many RECORDS in the
AUDIT.HIST File with the same RECORD_ID, but there DATE and/or TIME will
differ.

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of
kis...@parmars.com
Sent: 29 April 2009 09:46 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] I-Descriptor Help

Hi Bjorn,
Why are you using the BY RECORD_ID clause when you are selecting on
RECORD_ID = '1537044' ?
Should this be @ID for the first record on the AUDIT_HIST file?

Regards,
Kishor


** IMPORTANT MESSAGE * This
e-mail message is intended only for the addressee(s) and contains
information which may be confidential.
If you are not the intended recipient please advise the sender by return
email, do not use or disclose the contents, and delete the message and
any attachments from your system. Unless specifically indicated, this
email does not constitute formal advice or commitment by the sender or
the Commonwealth Bank of Australia (ABN 48 123 123 124) or its
subsidiaries.
We can be contacted through our web site: commbank.com.au.
If you no longer wish to receive commercial electronic messages from us,
please reply to this e-mail by typing Unsubscribe in the subject line.
**
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

The information in or attached to this e-mail message is confidential
and may be subject to legal privilege and client confidentiality. If you
are not the intended recipient of this e-mail or the authorised
representative of the recipient then please notify the sender of this
e-mail immediately by return e-mail and delete this message from your
system. You may not print, store, forward or copy this message or any
part thereof or disclose or cause information in this message to be
disclosed to any other person.

FRSTIA cannot be held liable for any harm or loss resulting from
malicious software code or viruses in this message or attachments,
including data corruption resulting there from.

Employees or representatives of FRSTIA are not permitted to send
unsolicited messages ("spam") and FRSTIA cannot be held liable for their
sending of such mail. If you regard this message as spam, please inform
us immediately by sending an email to i...@frstia.co.za.

If this message contains offensive, derogatory or defamatory statements
or materials, it means the message has been sent outside the sender's
scope of employment with FRSTIA and only the sender can be held liable
in his/her

RE: [U2] I-Descriptor Help

2009-04-29 Thread Bjorn Behr
David

You are correct with what I require.

I am trying to get it to work using an I-Type because
 - It is on the QUOTES File, referencing the AUDIT.HIST File which has a
relationship of one to many.
 - It is required to be on a field on the Quotes File as it is used to
extract data for the MIS system for reporting.

 - If you can suggest another way, I am more than open to suggestions.

Thanks
Bjorn

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Hona, David
Sent: 29 April 2009 11:00 AM
To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] I-Descriptor Help

Bjorn

Executing queries via an I-type simply doesn't work or if it does -
you'll get strange results.

Your requirements are a little unclear...but I am guessing here that
you're wanting to select the first timestamped record by the specified
unique RECORD_ID?

Do you have I-types for the Date and Time elements of the @ID - if so,
you could:

SELECT AUDIT_HIST WITH RECORD_ID = '1234' BY DATE BY TIME FIRST 1

Or something similar - any particular reason you need to have an I-type?

Regards
David


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Bjorn Behr
Sent: Wednesday, 29 April 2009 6:05 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] I-Descriptor Help

Kishor

Sorry, should not be BY RECORD_ID, should be BY @ID

The key is RECORD_ID:DATE:TIME, RECORD_ID is in Field <1> in the record
and refers the the @ID of another file There can be many RECORDS in the
AUDIT.HIST File with the same RECORD_ID, but there DATE and/or TIME will
differ.

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of
kis...@parmars.com
Sent: 29 April 2009 09:46 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] I-Descriptor Help

Hi Bjorn,
Why are you using the BY RECORD_ID clause when you are selecting on
RECORD_ID = '1537044' ?
Should this be @ID for the first record on the AUDIT_HIST file?

Regards,
Kishor


** IMPORTANT MESSAGE *
This e-mail message is intended only for the addressee(s) and contains
information which may be confidential.
If you are not the intended recipient please advise the sender by return
email, do not use or disclose the contents, and delete the message and
any attachments from your system. Unless specifically indicated, this
email does not constitute formal advice or commitment by the sender or
the Commonwealth Bank of Australia (ABN 48 123 123 124) or its
subsidiaries.
We can be contacted through our web site: commbank.com.au.
If you no longer wish to receive commercial electronic messages from us,
please reply to this e-mail by typing Unsubscribe in the subject line.
**
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

The information in or attached to this e-mail message is confidential and may 
be subject to legal privilege and client confidentiality. If you are not the 
intended recipient of this e-mail or the authorised representative of the 
recipient then please notify the sender of this e-mail immediately by return 
e-mail and delete this message from your system. You may not print, store, 
forward or copy this message or any part thereof or disclose or cause 
information in this message to be disclosed to any other person.

FRSTIA cannot be held liable for any harm or loss resulting from malicious 
software code or viruses in this message or attachments, including data 
corruption resulting there from.

Employees or representatives of FRSTIA are not permitted to send unsolicited 
messages ("spam") and FRSTIA cannot be held liable for their sending of such 
mail. If you regard this message as spam, please inform us immediately by 
sending an email to i...@frstia.co.za.

If this message contains offensive, derogatory or defamatory statements or 
materials, it means the message has been sent outside the sender's scope of 
employment with FRSTIA and only the sender can be held liable in his/her 
personal capacity.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] I-Descriptor Help

2009-04-29 Thread Bjorn Behr
Kishor

To answer your 2 questions:

Q1) I would split the select up into two statements. The first to do the
select and then the second to do the sort. Is that an option?
A1) Yes, I can split the select up into to parts, I can even exclude the
sort all together and I still get the same error

Q2) If the Key is RECORD_ID:DATE:TIME then can't you just do a SELECT
with key like '1537044...' BY Key ?
A2) With a FILE that has over 1 million records and growing, this is
just not an option, that is why I created the index field in the 1st
place. This is a physical field on the file and not a derived one, so I
can select on it. Selecting with like @ID Will just slow it down
tremendously.

The problem does not lie in the BP alone, the select etc.. Works, it
lies in getting it to run trhough a I-Descriptor.

Thanks for the help s far
Bjorn

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of
kis...@parmars.com
Sent: 29 April 2009 10:51 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] I-Descriptor Help

Bjorn,
If the Key is RECORD_ID:DATE:TIME then can't you just do a SELECT with
key like '1537044...' BY Key ?

Some people do index the key when they have compound keys.

Regards,
Kishor

Quoting Bjorn Behr :

> Kishor
>
> Sorry, should not be BY RECORD_ID, should be BY @ID
>
> The key is RECORD_ID:DATE:TIME, RECORD_ID is in Field <1> in the
> record and refers the the @ID of another file
> There can be many RECORDS in the AUDIT.HIST File with the same
> RECORD_ID, but there DATE and/or TIME will differ.
>
> Regards
> Bjvrn Behr
> SUMMIT CORE Developer
> Tel No: +27 12 673 3251
> Fax No: +27 12 673 4681
> E-Mail: be...@frstia.co.za
>
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of
> kis...@parmars.com
> Sent: 29 April 2009 09:46 AM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] I-Descriptor Help
>
> Hi Bjorn,
> Why are you using the BY RECORD_ID clause when you are selecting on
> RECORD_ID = '1537044' ?
> Should this be @ID for the first record on the AUDIT_HIST file?
>
> Regards,
> Kishor
>
> Quoting Bjorn Behr :
>
>> Morning All
>>
>> I wonder if somebody can please assist me here.
>>
>> What I need to do is SELECT the 1st Record saved from a file
>> (AUDIT.HIST) for a specific RECORD_ID.
>> The RECORD_ID Field is an indexed field on AUDIT_HIST.
>>
>> I am trying to do this via a I-Descriptor calling a BP and it is
>> returning an error
>>
>> Error:
>> Non-SQL re-entrant query calls are not allowed.
>>
>> Select Statement within BP:
>> "SELECT AUDIT.HIST WITH RECORD_ID = '1537044' BY RECORD_ID"
>>
>> Any idea how I go about doing this?
>>
>> System Info
>> Universe 10.1.24 (PICK)
>> System Builder 5.3
>>
>> Regards
>> Bjvrn Behr
>> SUMMIT CORE Developer
>> Tel No: +27 12 673 3251
>> Fax No: +27 12 673 4681
>> E-Mail: be...@frstia.co.za<mailto:be...@frstia.co.za>
>>
>>
>> 
>> The information in or attached to this e-mail message is confidential

>> and may be subject to legal privilege and client confidentiality. If
>> you are not the intended recipient of this e-mail or the authorised
>> representative of the recipient then please notify the sender of this

>> e-mail immediately by return e-mail and delete this message from your

>> system. You may not print, store, forward or copy this message or any

>> part thereof or disclose or cause information in this message to be
>> disclosed to any other person.
>>
>> FRSTIA cannot be held liable for any harm or loss resulting from
>> malicious software code or viruses in this message or attachments,
>> including data corruption resulting there from.
>>
>> Employees or representatives of FRSTIA are not permitted to send
>> unsolicited messages ("spam") and FRSTIA cannot be held liable for
>> their sending of such mail. If you regard this message as spam,
>> please inform us immediately by sending an email to
i...@frstia.co.za.
>>
>> If this message contains offensive, derogatory or defamatory
>> statements or materials, it means the message has been sent outside
>> the sender's scope of employment with FRSTIA and only the sender can
>> be held liable in his/her personal capacity.
>> ---
>> u2-users mailing list
>> u2-users@listserver.u2ug.org
>> To unsubscribe please visit http://listserver.u2ug.org/
> ---
> u2-users maili

RE: [U2] I-Descriptor Help

2009-04-29 Thread Bjorn Behr
Thanks Andy

I will look @ the SELECTINDEX then and see what I can work out.

Bjorn

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Andy Baum
Sent: 29 April 2009 10:57 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] I-Descriptor Help

Bjorn,

This is the error you get when the I-Descriptor calls a subroutine that
does a SELECT. See this reply from Glenn Herbert to the same problem in
March 2004.

"Yeah. It's actually a bug in the program/itype unloading code that
won't allow you to do this. I ran upon this in May 2003 and,
subsequently, put in a fix within the DataStage engine so that it works.
Should be an easy fix once its understood."

Guess they've not got around to fixing it yet. Dependant on the select
in the subroutine it can usually be worked around by using UniBasic
commands like SELECTINDEX.

Cheers,

Andy

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Bjorn Behr
Sent: 29 April 2009 08:05
To: u2-users@listserver.u2ug.org
Subject: [U2] I-Descriptor Help

Morning All

I wonder if somebody can please assist me here.

What I need to do is SELECT the 1st Record saved from a file
(AUDIT.HIST) for a specific RECORD_ID.
The RECORD_ID Field is an indexed field on AUDIT_HIST.

I am trying to do this via a I-Descriptor calling a BP and it is
returning an error

Error:
Non-SQL re-entrant query calls are not allowed.

Select Statement within BP:
"SELECT AUDIT.HIST WITH RECORD_ID = '1537044' BY RECORD_ID"

Any idea how I go about doing this?

System Info
Universe 10.1.24 (PICK)
System Builder 5.3

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za<mailto:be...@frstia.co.za>



The information in or attached to this e-mail message is confidential
and may be subject to legal privilege and client confidentiality. If you
are not the intended recipient of this e-mail or the authorised
representative of the recipient then please notify the sender of this
e-mail immediately by return e-mail and delete this message from your
system. You may not print, store, forward or copy this message or any
part thereof or disclose or cause information in this message to be
disclosed to any other person.

FRSTIA cannot be held liable for any harm or loss resulting from
malicious software code or viruses in this message or attachments,
including data corruption resulting there from.

Employees or representatives of FRSTIA are not permitted to send
unsolicited messages ("spam") and FRSTIA cannot be held liable for their
sending of such mail. If you regard this message as spam, please inform
us immediately by sending an email to i...@frstia.co.za.

If this message contains offensive, derogatory or defamatory statements
or materials, it means the message has been sent outside the sender's
scope of employment with FRSTIA and only the sender can be held liable
in his/her personal capacity.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


-
**
The contents of this e-mail and any attachments transmitted with it are
intended to be confidential to the intended recipient; and may be
privileged or otherwise protected from disclosure. If you are not an
intended recipient of this e-mail, do not duplicate or redistribute it
by any means. Please delete it and any attachments and notify the sender
that you have received it in error.

This e-mail is sent by a William Hill PLC group company. The William
Hill group companies include, among others, William Hill PLC (registered
number 4212563), William Hill Organization Limited (registered number
278208), William Hill Credit Limited (registered number 413846), WHG
(International) Limited (registered number
99191) and WHG Trading Limited (registered number 101439).  Each of
William Hill PLC, William Hill Organization Limited and William Hill
Credit Limited is registered in England and Wales and has its registered
office at Greenside House, 50 Station Road, Wood Green, London N22 7TP.
Each of WHG (International) Limited and WHG Trading Limited is
registered in Gibraltar and has its registered office at 57/63 Line Wall
Road, Gibraltar.

Unless specifically indicated otherwise, the contents of this e-mail are
subject to contract; and are not an official statement, and do not
necessarily represent the views, of William Hill PLC, its subsidiaries
or affiliated companies.
Please note that neither William Hill PLC, nor its subsidiaries and
affiliated companies can accept any responsibility for any viruses
contained within this e-mail and it is your responsibility to scan any
emails and their attachments.  William Hill PLC, its subsidiaries

RE: [U2] I-Descriptor Help

2009-04-29 Thread Hona, David
Bjorn

Executing queries via an I-type simply doesn't work or if it does - you'll get 
strange results.

Your requirements are a little unclear...but I am guessing here that you're 
wanting to select the first timestamped record by the specified unique 
RECORD_ID?

Do you have I-types for the Date and Time elements of the @ID - if so, you 
could:

SELECT AUDIT_HIST WITH RECORD_ID = '1234' BY DATE BY TIME FIRST 1

Or something similar - any particular reason you need to have an I-type?

Regards
David


-Original Message-
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Bjorn Behr
Sent: Wednesday, 29 April 2009 6:05 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] I-Descriptor Help

Kishor

Sorry, should not be BY RECORD_ID, should be BY @ID

The key is RECORD_ID:DATE:TIME, RECORD_ID is in Field <1> in the record and 
refers the the @ID of another file
There can be many RECORDS in the AUDIT.HIST File with the same RECORD_ID, but 
there DATE and/or TIME will differ.

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za


-Original Message-
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of kis...@parmars.com
Sent: 29 April 2009 09:46 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] I-Descriptor Help

Hi Bjorn,
Why are you using the BY RECORD_ID clause when you are selecting on RECORD_ID = 
'1537044' ?
Should this be @ID for the first record on the AUDIT_HIST file?

Regards,
Kishor


** IMPORTANT MESSAGE *   
This e-mail message is intended only for the addressee(s) and contains 
information which may be
confidential. 
If you are not the intended recipient please advise the sender by return email, 
do not use or
disclose the contents, and delete the message and any attachments from your 
system. Unless
specifically indicated, this email does not constitute formal advice or 
commitment by the sender
or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. 
We can be contacted through our web site: commbank.com.au. 
If you no longer wish to receive commercial electronic messages from us, please 
reply to this
e-mail by typing Unsubscribe in the subject line. 
**
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] I-Descriptor Help

2009-04-29 Thread Andy Baum
Bjorn,

This is the error you get when the I-Descriptor calls a subroutine that does a 
SELECT. See this reply from Glenn Herbert to the same problem in March 2004.

"Yeah. It's actually a bug in the program/itype unloading code that won't allow 
you to do this. I ran upon this in May 2003 and, subsequently, put in a fix 
within the DataStage engine so that it works. Should be an easy fix once its 
understood."

Guess they've not got around to fixing it yet. Dependant on the select in the 
subroutine it can usually be worked around by using UniBasic commands like 
SELECTINDEX.

Cheers,

Andy

-Original Message-
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Bjorn Behr
Sent: 29 April 2009 08:05
To: u2-users@listserver.u2ug.org
Subject: [U2] I-Descriptor Help

Morning All

I wonder if somebody can please assist me here.

What I need to do is SELECT the 1st Record saved from a file (AUDIT.HIST) for
a specific RECORD_ID.
The RECORD_ID Field is an indexed field on AUDIT_HIST.

I am trying to do this via a I-Descriptor calling a BP and it is returning an
error

Error:
Non-SQL re-entrant query calls are not allowed.

Select Statement within BP:
"SELECT AUDIT.HIST WITH RECORD_ID = '1537044' BY RECORD_ID"

Any idea how I go about doing this?

System Info
Universe 10.1.24 (PICK)
System Builder 5.3

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za



The information in or attached to this e-mail message is confidential and may
be subject to legal privilege and client confidentiality. If you are not the
intended recipient of this e-mail or the authorised representative of the
recipient then please notify the sender of this e-mail immediately by return
e-mail and delete this message from your system. You may not print, store,
forward or copy this message or any part thereof or disclose or cause
information in this message to be disclosed to any other person.

FRSTIA cannot be held liable for any harm or loss resulting from malicious
software code or viruses in this message or attachments, including data
corruption resulting there from.

Employees or representatives of FRSTIA are not permitted to send unsolicited
messages ("spam") and FRSTIA cannot be held liable for their sending of such
mail. If you regard this message as spam, please inform us immediately by
sending an email to i...@frstia.co.za.

If this message contains offensive, derogatory or defamatory statements or
materials, it means the message has been sent outside the sender's scope of
employment with FRSTIA and only the sender can be held liable in his/her
personal capacity.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


-
**
The contents of this e-mail and any attachments transmitted with it
are intended to be confidential to the intended recipient; and may
be privileged or otherwise protected from disclosure. If you are
not an intended recipient of this e-mail, do not duplicate or
redistribute it by any means. Please delete it and any attachments
and notify the sender that you have received it in error. 

This e-mail is sent by a William Hill PLC group company. The
William Hill group companies include, among others, William Hill
PLC (registered number 4212563), William Hill Organization Limited
(registered number 278208), William Hill Credit Limited (registered
number 413846), WHG (International) Limited (registered number
99191) and WHG Trading Limited (registered number 101439).  Each of
William Hill PLC, William Hill Organization Limited and William
Hill Credit Limited is registered in England and Wales and has its
registered office at Greenside House, 50 Station Road, Wood Green,
London N22 7TP.  Each of WHG (International) Limited and WHG
Trading Limited is registered in Gibraltar and has its registered
office at 57/63 Line Wall Road, Gibraltar.

Unless specifically indicated otherwise, the contents of this
e-mail are subject to contract; and are not an official statement,
and do not necessarily represent the views, of William Hill PLC,
its subsidiaries or affiliated companies.
Please note that neither William Hill PLC, nor its subsidiaries and
affiliated companies can accept any responsibility for any viruses
contained within this e-mail and it is your responsibility to scan
any emails and their attachments.  William Hill PLC, its
subsidiaries and affiliated companies may monitor e-mail traffic
data and also the content of e-mails for effective operation of the
e-mail system, or for security, purposes.
*
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] I-Descriptor Help

2009-04-29 Thread kishor

Bjorn,
If the Key is RECORD_ID:DATE:TIME then can't you just do a SELECT with  
key like '1537044...' BY Key ?


Some people do index the key when they have compound keys.

Regards,
Kishor

Quoting Bjorn Behr :


Kishor

Sorry, should not be BY RECORD_ID, should be BY @ID

The key is RECORD_ID:DATE:TIME, RECORD_ID is in Field <1> in the   
record and refers the the @ID of another file
There can be many RECORDS in the AUDIT.HIST File with the same   
RECORD_ID, but there DATE and/or TIME will differ.


Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za


-Original Message-
From: owner-u2-us...@listserver.u2ug.org   
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of   
kis...@parmars.com

Sent: 29 April 2009 09:46 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] I-Descriptor Help

Hi Bjorn,
Why are you using the BY RECORD_ID clause when you are selecting on   
RECORD_ID = '1537044' ?

Should this be @ID for the first record on the AUDIT_HIST file?

Regards,
Kishor

Quoting Bjorn Behr :


Morning All

I wonder if somebody can please assist me here.

What I need to do is SELECT the 1st Record saved from a file
(AUDIT.HIST) for a specific RECORD_ID.
The RECORD_ID Field is an indexed field on AUDIT_HIST.

I am trying to do this via a I-Descriptor calling a BP and it is
returning an error

Error:
Non-SQL re-entrant query calls are not allowed.

Select Statement within BP:
"SELECT AUDIT.HIST WITH RECORD_ID = '1537044' BY RECORD_ID"

Any idea how I go about doing this?

System Info
Universe 10.1.24 (PICK)
System Builder 5.3

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za<mailto:be...@frstia.co.za>



The information in or attached to this e-mail message is confidential
and may be subject to legal privilege and client confidentiality. If
you are not the intended recipient of this e-mail or the authorised
representative of the recipient then please notify the sender of this
e-mail immediately by return e-mail and delete this message from your
system. You may not print, store, forward or copy this message or any
part thereof or disclose or cause information in this message to be  
 disclosed to any other person.


FRSTIA cannot be held liable for any harm or loss resulting from
malicious software code or viruses in this message or attachments,
including data corruption resulting there from.

Employees or representatives of FRSTIA are not permitted to send
unsolicited messages ("spam") and FRSTIA cannot be held liable for
their sending of such mail. If you regard this message as spam, please
inform us immediately by sending an email to i...@frstia.co.za.

If this message contains offensive, derogatory or defamatory
statements or materials, it means the message has been sent outside
the sender's scope of employment with FRSTIA and only the sender can
be held liable in his/her personal capacity.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

The information in or attached to this e-mail message is   
confidential and may be subject to legal privilege and client   
confidentiality. If you are not the intended recipient of this   
e-mail or the authorised representative of the recipient then please  
 notify the sender of this e-mail immediately by return e-mail and   
delete this message from your system. You may not print, store,   
forward or copy this message or any part thereof or disclose or   
cause information in this message to be disclosed to any other person.


FRSTIA cannot be held liable for any harm or loss resulting from   
malicious software code or viruses in this message or attachments,   
including data corruption resulting there from.


Employees or representatives of FRSTIA are not permitted to send   
unsolicited messages ("spam") and FRSTIA cannot be held liable for   
their sending of such mail. If you regard this message as spam,   
please inform us immediately by sending an email to i...@frstia.co.za.


If this message contains offensive, derogatory or defamatory   
statements or materials, it means the message has been sent outside   
the sender's scope of employment with FRSTIA and only the sender can  
 be held liable in his/her personal capacity.

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] I-Descriptor Help

2009-04-29 Thread kishor

Bjorn,
I would split the select up into two statements. The first to do the  
select and then the second to do the sort.

Is that an option?

Kishor

Quoting Bjorn Behr :


Kishor

Sorry, should not be BY RECORD_ID, should be BY @ID

The key is RECORD_ID:DATE:TIME, RECORD_ID is in Field <1> in the   
record and refers the the @ID of another file
There can be many RECORDS in the AUDIT.HIST File with the same   
RECORD_ID, but there DATE and/or TIME will differ.


Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za


-Original Message-
From: owner-u2-us...@listserver.u2ug.org   
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of   
kis...@parmars.com

Sent: 29 April 2009 09:46 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] I-Descriptor Help

Hi Bjorn,
Why are you using the BY RECORD_ID clause when you are selecting on   
RECORD_ID = '1537044' ?

Should this be @ID for the first record on the AUDIT_HIST file?

Regards,
Kishor

Quoting Bjorn Behr :


Morning All

I wonder if somebody can please assist me here.

What I need to do is SELECT the 1st Record saved from a file
(AUDIT.HIST) for a specific RECORD_ID.
The RECORD_ID Field is an indexed field on AUDIT_HIST.

I am trying to do this via a I-Descriptor calling a BP and it is
returning an error

Error:
Non-SQL re-entrant query calls are not allowed.

Select Statement within BP:
"SELECT AUDIT.HIST WITH RECORD_ID = '1537044' BY RECORD_ID"

Any idea how I go about doing this?

System Info
Universe 10.1.24 (PICK)
System Builder 5.3

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za<mailto:be...@frstia.co.za>



The information in or attached to this e-mail message is confidential
and may be subject to legal privilege and client confidentiality. If
you are not the intended recipient of this e-mail or the authorised
representative of the recipient then please notify the sender of this
e-mail immediately by return e-mail and delete this message from your
system. You may not print, store, forward or copy this message or any
part thereof or disclose or cause information in this message to be  
 disclosed to any other person.


FRSTIA cannot be held liable for any harm or loss resulting from
malicious software code or viruses in this message or attachments,
including data corruption resulting there from.

Employees or representatives of FRSTIA are not permitted to send
unsolicited messages ("spam") and FRSTIA cannot be held liable for
their sending of such mail. If you regard this message as spam, please
inform us immediately by sending an email to i...@frstia.co.za.

If this message contains offensive, derogatory or defamatory
statements or materials, it means the message has been sent outside
the sender's scope of employment with FRSTIA and only the sender can
be held liable in his/her personal capacity.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

The information in or attached to this e-mail message is   
confidential and may be subject to legal privilege and client   
confidentiality. If you are not the intended recipient of this   
e-mail or the authorised representative of the recipient then please  
 notify the sender of this e-mail immediately by return e-mail and   
delete this message from your system. You may not print, store,   
forward or copy this message or any part thereof or disclose or   
cause information in this message to be disclosed to any other person.


FRSTIA cannot be held liable for any harm or loss resulting from   
malicious software code or viruses in this message or attachments,   
including data corruption resulting there from.


Employees or representatives of FRSTIA are not permitted to send   
unsolicited messages ("spam") and FRSTIA cannot be held liable for   
their sending of such mail. If you regard this message as spam,   
please inform us immediately by sending an email to i...@frstia.co.za.


If this message contains offensive, derogatory or defamatory   
statements or materials, it means the message has been sent outside   
the sender's scope of employment with FRSTIA and only the sender can  
 be held liable in his/her personal capacity.

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] I-Descriptor Help

2009-04-29 Thread Bjorn Behr
Kishor

Sorry, should not be BY RECORD_ID, should be BY @ID

The key is RECORD_ID:DATE:TIME, RECORD_ID is in Field <1> in the record and 
refers the the @ID of another file
There can be many RECORDS in the AUDIT.HIST File with the same RECORD_ID, but 
there DATE and/or TIME will differ.

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za


-Original Message-
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of kis...@parmars.com
Sent: 29 April 2009 09:46 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] I-Descriptor Help

Hi Bjorn,
Why are you using the BY RECORD_ID clause when you are selecting on RECORD_ID = 
'1537044' ?
Should this be @ID for the first record on the AUDIT_HIST file?

Regards,
Kishor

Quoting Bjorn Behr :

> Morning All
>
> I wonder if somebody can please assist me here.
>
> What I need to do is SELECT the 1st Record saved from a file
> (AUDIT.HIST) for a specific RECORD_ID.
> The RECORD_ID Field is an indexed field on AUDIT_HIST.
>
> I am trying to do this via a I-Descriptor calling a BP and it is
> returning an error
>
> Error:
> Non-SQL re-entrant query calls are not allowed.
>
> Select Statement within BP:
> "SELECT AUDIT.HIST WITH RECORD_ID = '1537044' BY RECORD_ID"
>
> Any idea how I go about doing this?
>
> System Info
> Universe 10.1.24 (PICK)
> System Builder 5.3
>
> Regards
> Bjvrn Behr
> SUMMIT CORE Developer
> Tel No: +27 12 673 3251
> Fax No: +27 12 673 4681
> E-Mail: be...@frstia.co.za<mailto:be...@frstia.co.za>
>
>
> 
> The information in or attached to this e-mail message is confidential
> and may be subject to legal privilege and client confidentiality. If
> you are not the intended recipient of this e-mail or the authorised
> representative of the recipient then please notify the sender of this
> e-mail immediately by return e-mail and delete this message from your
> system. You may not print, store, forward or copy this message or any
> part thereof or disclose or cause information in this message to be disclosed 
> to any other person.
>
> FRSTIA cannot be held liable for any harm or loss resulting from
> malicious software code or viruses in this message or attachments,
> including data corruption resulting there from.
>
> Employees or representatives of FRSTIA are not permitted to send
> unsolicited messages ("spam") and FRSTIA cannot be held liable for
> their sending of such mail. If you regard this message as spam, please
> inform us immediately by sending an email to i...@frstia.co.za.
>
> If this message contains offensive, derogatory or defamatory
> statements or materials, it means the message has been sent outside
> the sender's scope of employment with FRSTIA and only the sender can
> be held liable in his/her personal capacity.
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

The information in or attached to this e-mail message is confidential and may 
be subject to legal privilege and client confidentiality. If you are not the 
intended recipient of this e-mail or the authorised representative of the 
recipient then please notify the sender of this e-mail immediately by return 
e-mail and delete this message from your system. You may not print, store, 
forward or copy this message or any part thereof or disclose or cause 
information in this message to be disclosed to any other person.

FRSTIA cannot be held liable for any harm or loss resulting from malicious 
software code or viruses in this message or attachments, including data 
corruption resulting there from.

Employees or representatives of FRSTIA are not permitted to send unsolicited 
messages ("spam") and FRSTIA cannot be held liable for their sending of such 
mail. If you regard this message as spam, please inform us immediately by 
sending an email to i...@frstia.co.za.

If this message contains offensive, derogatory or defamatory statements or 
materials, it means the message has been sent outside the sender's scope of 
employment with FRSTIA and only the sender can be held liable in his/her 
personal capacity.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] I-Descriptor Help

2009-04-29 Thread kishor

Hi Bjorn,
Why are you using the BY RECORD_ID clause when you are selecting on  
RECORD_ID = '1537044' ?

Should this be @ID for the first record on the AUDIT_HIST file?

Regards,
Kishor

Quoting Bjorn Behr :


Morning All

I wonder if somebody can please assist me here.

What I need to do is SELECT the 1st Record saved from a file (AUDIT.HIST) for
a specific RECORD_ID.
The RECORD_ID Field is an indexed field on AUDIT_HIST.

I am trying to do this via a I-Descriptor calling a BP and it is returning an
error

Error:
Non-SQL re-entrant query calls are not allowed.

Select Statement within BP:
"SELECT AUDIT.HIST WITH RECORD_ID = '1537044' BY RECORD_ID"

Any idea how I go about doing this?

System Info
Universe 10.1.24 (PICK)
System Builder 5.3

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: be...@frstia.co.za



The information in or attached to this e-mail message is confidential and may
be subject to legal privilege and client confidentiality. If you are not the
intended recipient of this e-mail or the authorised representative of the
recipient then please notify the sender of this e-mail immediately by return
e-mail and delete this message from your system. You may not print, store,
forward or copy this message or any part thereof or disclose or cause
information in this message to be disclosed to any other person.

FRSTIA cannot be held liable for any harm or loss resulting from malicious
software code or viruses in this message or attachments, including data
corruption resulting there from.

Employees or representatives of FRSTIA are not permitted to send unsolicited
messages ("spam") and FRSTIA cannot be held liable for their sending of such
mail. If you regard this message as spam, please inform us immediately by
sending an email to i...@frstia.co.za.

If this message contains offensive, derogatory or defamatory statements or
materials, it means the message has been sent outside the sender's scope of
employment with FRSTIA and only the sender can be held liable in his/her
personal capacity.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/