×
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.
Unfortunately we (NOT ME) were creating new program-described files for production until 2008 or so. That means there a lot out there. I generally replace them when I have to touch them for some reason, but some files are "hands-off".
-----Original Message-----
From: Rob Berendt [mailto:rob@xxxxxxxxx]
Sent: Monday, February 26, 2018 11:11 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: Query packed data?
I tend to go with the suggested SQL function. Then you could imbed that into a view.
Then again, I would repeatedly question why it must remain a program described file.
Order of preference:
- Try to figure out why someone says it must remain a program described file and determine if the reason is still valid.
- Create the suggested function to convert the packed to a string, and imbed that into a view. This will allow better editing and create reusable code than converting multiple packed fields with view logic itself.
- Use IDDU.
The one I would leave out of the realm of possibility is trying to use DDS in a logical file to create a view. The conversion and lack of error trapping is lacking. For example, what if the packed data is invalid?
After all it is a program described file and it's not out of the realm of possibility. With a function, if it fails the edit you can always return a null or a replacement value.
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
As an Amazon Associate we earn from qualifying purchases.