|
On Feb 26, 2018, at 12:22 PM, Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:
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
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
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.