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



first thing i can say is ewww....why put the data in a source file?
anyway. you can define a DS and move the SRCDTA into the DS. in the DS
overlay the character field containing the numeric value with a numeric
field defined how you want it. then you can use the numeric field in your
program. another alternative would be to create an LF over the thing.
better yet create an externally described file (DDS or SQL) and CPYF
fmtopt(*nochk) into it. use SQL substring functions, or RPG substring
functions, etc , etc , etc...

Thanks,
Tommy Holden



From:
donna lester <donna_lester_ny@xxxxxxxxx>
To:
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Date:
05/14/2008 02:00 PM
Subject:
sql on flat file



I have a flat file as below :

SRCSEQ SRCDAT SRCDTA
54.00 0 USDAUD 0000009414499 05/13/08
55.00 0 USDEUR 0000015482499 05/13/08
56.00 0 USDGBP 0000019474000 05/13/08

------------------------------------------------------------------------------------

I want to extract from this file
USDGBP conversion rate 1.9474000 on date 05/13/08.

Can some one please help me with an SQL or any alternate solution. I
donot have any ideas how can I get period(.) after first digit example :
1.9474000 as flat file comes as 19474000...

Thank you for all the help!





Thanks,

Donna.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.