× 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.



Consider the future use of the data,
do you want to be locked into decimal subtr options
for the life of this data...
If you may need to access this data easily from
crystal, excel, iseries nav, or other reporting services...
I VOTE for redesign in this case.. A couple of days
rebuilding a database could save you days and headaches
down the road...
can't say much on the RPG solution, been too many years now,
but I do use the sql substr/decimal options a lot for data imported
from outside organizations, and it does work just fine.
ALA


Alan Shore <AlanShore@xxxxxxxx> 5/7/2010 12:02 PM >>>

Sorry about the subject description - but I couldn't think of what to put
in there that would convey the predicament that I face

I need to create a view over a physical that contains the following fields
(believe me - NOT my design)

NameTypeLength
FIELD01 A 63
FIELD02 A 63
FIELD03 A 63
FIELD04 A 63
FIELD05 A 63

Now - within the programs, each of these fields are moved to a separate
datastructure that is defined like this

D FIELDNBR DS OCCURS(5)
D CFREE 1 63
D LLMT 1 3P 2
D LLMTX 1 3
D WFR 4 63
D DIM(5)
D QTY1 4 5P 0
D ITM#1 6 15
D CPNAMT 16 20 2
D PCTAMT 16 17 0
D QTY2 16 17P 0
D ITM#2 18 27
D QTY3 28 29P 0
D ITM#3 30 39
D QTY4 40 41P 0
D ITM#4 42 51
D QTY5 52 53P 0
D ITM#5 54 63
D TYPE 63 63

If TYPE is a 'C' then CPNAMT is the field to use
If TYPE is a 'P' then PCTAMT is the field to use

I also need to figure out how, when and where QTY2 is used
I also need to analyze if there is anything else

At the moment all I am doing is staring at my screen, thinking whether or
not to re-design this whole file to be more meaningful, BUT what is
required is a view
As always any and all responses GRATEFULLY accepted

Thanks in advance



Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill

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.