Hello All,
We are working on an overall modernization strategy in our shop and part
of that is considering SQL naming standards. I've been looking through
books and online for ideas, including midrange.com, but not finding a
whole lot. Does anyone have references to good books or online articles
that would lend some assistance? Anyone want to share the standards being
used in their shop? To get an idea of what I am talking about, here is an
article:
https://launchbylunch.com/posts/2014/Feb/16/sql-naming-conventions/
With DB2 for i, we traditionally have been limited to 10 character system
names for tables and columns, but we are using DDL more and with the newer
features in RPG IV it isn't a big deal to use the longer names now, though
we are not opposed to working within the 10 character limit. I am just
trying to survey different ideas to develop a sensible standard that works
for our group.
Thanks,
Blake
From: rpg400-l-request@xxxxxxxxxxxx
To: rpg400-l@xxxxxxxxxxxx
Date: 02/26/2016 12:00 PM
Subject: RPG400-L Digest, Vol 15, Issue 85
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>
Send RPG400-L mailing list submissions to
rpg400-l@xxxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/rpg400-l
or, via email, send a message with subject or body 'help' to
rpg400-l-request@xxxxxxxxxxxx
You can reach the person managing the list at
rpg400-l-owner@xxxxxxxxxxxx
When replying, please edit your Subject line so it is more specific
than "Re: Contents of RPG400-L digest..."
*** NOTE: When replying to this digest message, PLEASE remove all text
unrelated to your reply and change the subject line so it is meaningful.
Today's Topics:
1. Is a Read by Partial Key on a Keyed Data Queue allowed ?
(Voris, John)
2. RE: Is a Read by Partial Key on a Keyed Data Queue allowed ?
(Roger Harman)
3. SQL Indexes and native I/O (Brian Parkins)
----------------------------------------------------------------------
message: 1
date: Thu, 25 Feb 2016 23:37:01 +0000
from: "Voris, John" <john.voris@xxxxxxxxxxxxx>
subject: Is a Read by Partial Key on a Keyed Data Queue allowed ?
Is reading from a Keyed Data Queue with a Partial Key allowed ?
If a Keyed Data-Queue has 2 keys, can we read from it with 1 key ?
(In Keyed Data Queues, keys are contiguous, like the old F-spec area
for key-field-length. )
Scenario: We are using a keyed data queue holding pending activity
where MAC-ID of our new timeclocks is the key.
After the pending activity is done and we re-read the data queue
- this time with REMOVE(*YES) - it turns out, we are removing a different
entry
than the one we first read and processed. Another process could have
inserted
this other entry we removed or it could be that entries are not always
guaranteed
to always be presented in the same order, just like SQL which does not
guarantee order-sequence unless you specified it explicitly.
A solutino is have MAC-ID and Timestamp as keys to our data queue,
on the first read, read by MAC-ID.
on the final read with REMOVE(*YES), read by MAC-ID and Timestamp.
- John Voris
------------------------------
message: 2
date: Fri, 26 Feb 2016 04:19:55 +0000
from: Roger Harman <roger.harman@xxxxxxxxxxx>
subject: RE: Is a Read by Partial Key on a Keyed Data Queue allowed ?
Not really as they key length specified has to match what the data queue
was created with.
But, since a keyed read allows GT, LT, NE, EQ, GE, and LE, operations, you
might be able to accomplish what you're doing.
Just use the MAC-ID segment and zero out the timestamp segment. Do your
read (GE) and the timestamp piece will be returned to you. Then, you can
read (EQ) with the full key to do the remove.
Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Voris,
John
Sent: Thursday, February 25, 2016 3:37 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Is a Read by Partial Key on a Keyed Data Queue allowed ?
Is reading from a Keyed Data Queue with a Partial Key allowed ?
If a Keyed Data-Queue has 2 keys, can we read from it with 1 key ?
(In Keyed Data Queues, keys are contiguous, like the old F-spec area for
key-field-length. )
Scenario: We are using a keyed data queue holding pending activity
where MAC-ID of our new timeclocks is the key.
After the pending activity is done and we re-read the data queue
- this time with REMOVE(*YES) - it turns out, we are removing a different
entry
than the one we first read and processed. Another process could have
inserted
this other entry we removed or it could be that entries are not always
guaranteed
to always be presented in the same order, just like SQL which does not
guarantee order-sequence unless you specified it explicitly.
A solutino is have MAC-ID and Timestamp as keys to our data queue,
on the first read, read by MAC-ID.
on the final read with REMOVE(*YES), read by MAC-ID and Timestamp.
- John Voris
As an Amazon Associate we earn from qualifying purchases.