The terms "flat file" and "externally-defined" don't usually go together in my mind, although they can. As Dan asked, what is the data type of the source? Is it a single character field? What is the formula you are using, if you are using a result field? If the source is character and needs to be substrung and then converted to numeric, this is hard in Query/400 but doable-you can use the MICROSECOND function - can tell you more if you need this ugliness. You'd be better off using an SQL query in a *QMQRY, using STRQMQRY with OUTPUT(*OUTFILE). What release of the OS are you at?


At 01:01 PM 10/28/2004, you wrote:
The source file is a flat-file, externally-defined. The target file has a packed field.
Dan Bale wrote:

When you said COMP, I thought you were talking COBOL, and comparing that to
P-type field.

Defining a packed field in query?  Let me ask, is this an externally-defined
file you are querying?  It sounds like you might be dealing with a
"flat-file" with no external definition and, so, you have packed data in a
long character field you need to extract.  Is that it?

Otherwise, I have no idea why you need to explicitly define a packed field.



Glenn Thompson
Senior Analyst
American Trouser, Inc.

-- 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: or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page