Perhaps this will help explain my quandry...

The data source provided DDL for Oracle and MS SQL Server...

So I've got
create table mytbl
(myfld1 number(5) not null
, myfld2 number(2) not null
, myfld3 number(10) not null
, myDate varchar2(10) null

--MS SQL Server
create table mytbl
(myfld1 integer not null
, myfld2 integer not null
, myfld3 integer not null
, mydate varchar(10) null

The hard copy documentation has
Element Record Type/
Name Position Length Picture
Myfld1 1-5 N/5 9(5)
Myfld2 6-7 N/2 9(2)
Myfld3 8-17 N/10 9(10)
Mydate 18-26 N/8 9(8)

Note: The data is coming as a pipe delimited text file, so the "Record
Position" above really doesn't apply.

Now, I've already decided to define mydate as an actual date :) Now I'm
trying to decide how to define myfld1, myfld2, myfld3.

My personal preference for new internal stuff is always integer if I'm
dealing with whole numbers. I've never really dealt with a "legacy" data
feed. Now I can certainly do legacy to match...but should I?



On Wed, Jan 22, 2014 at 1:51 PM, Charles Wilt <charles.wilt@xxxxxxxxx>wrote:

Philosophical question for you all...

I'm creating a new table to hold data received from an external source.

The specs given include

Name, Type/Length, Picture
MyFld, N/5, 9(5)

So MyField is a 5 digit number...

I could defined this as Packed/Zoned 5,0
Or I could use integer (or even small integer since the current number of
values is less than 1000)

Since I know DB2 and RPG for that matter perform best with integer, I'm
leaning that direction. But I can't help but think that Packed (5,0) is
more correct.



This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page