× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Perhaps this will help explain my quandry...

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

So I've got
--Oracle
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
Data
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?

Charles


Charles






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.

Thoughts?

Charles


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.