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



That's what I anticipated - but I was hoping there was an enhancement somewhere along the way where this could be done.

Thanks



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
Sent: Monday, August 13, 2012 1:31 PM
To: Midrange Systems Technical Discussion
Subject: Re: editing numeric fields in a physical file

Can't be done. To copy the fields, they must be type and size
compatible with a CPYF. Numeric and alpha are not compatible. You are
going to have to write code to do the transformation or use SQL to
edit the field and put into an output file.

On Mon, Aug 13, 2012 at 10:36 AM, Bob P. Roche <BRoche@xxxxxxxxxxxxxxxxx> wrote:
Edit codes don't apply to file fields when the data is stored in a numeric
format. They are for show like date formats. I've never tried to convert
type numeric to alpha in a copy command so I can't comment on that.
If you want to do convert numeric to alpha and build a new file a simple
RPGIV program to read one file and write another is how I would do it.
Then you could use the edit code to format the alpha version of the field.




From:
"Stone, Joel" <Joel.Stone@xxxxxxxxxx>
To:
"'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>,
Date:
08/13/2012 11:29 AM
Subject:
editing numeric fields in a physical file
Sent by:
midrange-l-bounces@xxxxxxxxxxxx



I am copying records from an input file to an output file.

Can I use edit codes in the DDS field definition of the output file such
that a CPYF *MAP will change a packed numeric field to an alpha or at
lease a zoned numeric field with zero suppression?

Is there a method to force the edit code to apply when writing to a PF?



Example:

Input physical file:


A..........T.Name++++++RLen++TDpB......Functions++++++++++
OrderAmt 7 2P



Output physical file:

A..........T.Name++++++RLen++TDpB......Functions++++++++++
OrderAmt 9 EDTCDE(N)




Data example:

input
x "0012345C"

output:

123.45



Thanks!




______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs
Skyscan service.
For more information please visit http://www.symanteccloud.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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



--
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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


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.