Re: [U2] Reading Dictionary Items

2011-09-30 Thread Bill Brutzman
As there is only one geek here... and none of the application programs touch 
the dictionaries,

It would be like putting a lock on the bathroom door in the honeymoon suite.

--B

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charlie Noah
Sent: Thursday, September 29, 2011 9:34 PM
To: U2 Users List
Subject: Re: [U2] Reading Dictionary Items

I guess I sound sort of old school here (well, I /am /old), but has anyone 
considered record locking in this scenario?

Regards,
Charlie Noah

On 09-29-2011 8:19 PM, Womack, Adrian wrote:
 I realise you already have an answer - but here's a one liner that would do 
 the same thing, without writing any code:

 UPDATE.RECORD DICT filename F4,@ID ALL



 -
 DISCLAIMER:
 Disclaimer. This e-mail is private and confidential. If you are not the 
 intended recipient, please advise us by return e-mail immediately, and delete 
 the e-mail and any attachments without using or disclosing the contents in 
 any way. The views expressed in this e-mail are those of the author, and do 
 not represent those of this company unless this is clearly indicated. You 
 should scan this e-mail and any attachments for viruses. This company accepts 
 no liability for any direct or indirect damage or loss resulting from the use 
 of any attachments to this e-mail.
 -

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org 
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill 
 Brutzman
 Sent: Friday, 30 September 2011 2:44 AM
 To: U2 Users List
 Subject: [U2] Reading Dictionary Items

 I would like read open a (large) dictionary, read the line items, and write 
 back the @ID field to Attribute4  (the column heading) of each.

 Syntax help would be appreciated.

 --Bill
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Reading Dictionary Items

2011-09-30 Thread Bill Brutzman
Adrian:

Thanks UPDATE.RECORD is a useful thing to know about.

It happens that on top of this task, for JDBC reasons, I had to do something 
similar with creating a large @SELECT statement.

--Bill

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Womack, Adrian
Sent: Thursday, September 29, 2011 9:20 PM
Subject: Re: [U2] Reading Dictionary Items

I realise you already have an answer - but here's a one liner that would do the 
same thing, without writing any code:

UPDATE.RECORD DICT filename F4,@ID ALL


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Reading Dictionary Items

2011-09-29 Thread u2ug
The same as you would with any other file - off the top :

open 'DICT','filename' to dfp else abortm 'Cant open dict filename'

execute 'SELECT DICT filename WITH TYPE=D'
loop while readnext id
writev id on dfp,id,4
repeat



Gerry


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: Thursday, September 29, 2011 2:44 PM
To: U2 Users List
Subject: [U2] Reading Dictionary Items

I would like read open a (large) dictionary, read the line items, and
write back the @ID field to Attribute 4 (the column heading) of each.

Syntax help would be appreciated.

--Bill 
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Reading Dictionary Items

2011-09-29 Thread Bill Brutzman
Gerry:

Thanks very much indeed.

It works... and not a scrap of fat on it.

--Bill

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of u2ug
Sent: Thursday, September 29, 2011 2:51 PM
To: U2 Users List
Subject: Re: [U2] Reading Dictionary Items

The same as you would with any other file - off the top :

open 'DICT','filename' to dfp else abortm 'Cant open dict filename'

execute 'SELECT DICT filename WITH TYPE=D'
loop while readnext id
writev id on dfp,id,4
repeat



Gerry


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: Thursday, September 29, 2011 2:44 PM
To: U2 Users List
Subject: [U2] Reading Dictionary Items

I would like read open a (large) dictionary, read the line items, and write 
back the @ID field to Attribute 4 (the column heading) of each.

Syntax help would be appreciated.

--Bill
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Reading Dictionary Items

2011-09-29 Thread Wols Lists
On 29/09/11 19:43, Bill Brutzman wrote:
 I would like read open a (large) dictionary, read the line items, and write 
 back the @ID field to Attribute 4 (the column heading) of each.
 
 Syntax help would be appreciated.

I'm guessing SQL might be your best bet - that should be a simple update
query.

But if you want to use BASIC, just

OPEN DICT, FILE TO BLAH
SELECT BLAH
LOOP
   READNEXT ID SETTING MER
   WRITEV ID TO BLAH, ID, 4
WHILE MER REPEAT

You'll need to clean that up, but there's your basic program.
 
 --Bill 

Cheers,
Wol
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Reading Dictionary Items

2011-09-29 Thread Bill Brutzman
Thanks Wol...

It looks good and closely resembles Gerry's answer.

--Bill

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists
Sent: Thursday, September 29, 2011 6:41 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Reading Dictionary Items

On 29/09/11 19:43, Bill Brutzman wrote:
 I would like read open a (large) dictionary, read the line items, and write 
 back the @ID field to Attribute 4 (the column heading) of each.
 
 Syntax help would be appreciated.

I'm guessing SQL might be your best bet - that should be a simple update query.

But if you want to use BASIC, just

OPEN DICT, FILE TO BLAH
SELECT BLAH
LOOP
   READNEXT ID SETTING MER
   WRITEV ID TO BLAH, ID, 4
WHILE MER REPEAT

You'll need to clean that up, but there's your basic program.
 
 --Bill

Cheers,
Wol
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Reading Dictionary Items

2011-09-29 Thread Womack, Adrian
I realise you already have an answer - but here's a one liner that would do the 
same thing, without writing any code:

UPDATE.RECORD DICT filename F4,@ID ALL



-
DISCLAIMER:
Disclaimer. This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
-

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: Friday, 30 September 2011 2:44 AM
To: U2 Users List
Subject: [U2] Reading Dictionary Items

I would like read open a (large) dictionary, read the line items, and write 
back the @ID field to Attribute 4 (the column heading) of each.

Syntax help would be appreciated.

--Bill
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Reading Dictionary Items

2011-09-29 Thread Charlie Noah
I guess I sound sort of old school here (well, I /am /old), but has 
anyone considered record locking in this scenario?


Regards,
Charlie Noah

On 09-29-2011 8:19 PM, Womack, Adrian wrote:

I realise you already have an answer - but here's a one liner that would do the 
same thing, without writing any code:

UPDATE.RECORD DICT filename F4,@ID ALL



-
DISCLAIMER:
Disclaimer. This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
-

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: Friday, 30 September 2011 2:44 AM
To: U2 Users List
Subject: [U2] Reading Dictionary Items

I would like read open a (large) dictionary, read the line items, and write back the 
@ID field to Attribute4  (the column heading) of each.

Syntax help would be appreciated.

--Bill
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users