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



I agree. Anyone know how to suppress the sign?

-----Original Message-----
From: Mail List [mailto:maillist@xxxxxxxxxxxxxxx] 
Sent: Thursday, June 05, 2003 5:27 PM
To: Midrange Systems Technical Discussion
Subject: Re: CPYTOIMPF problem


Hi Patrick,

Looks like it's the sign.  Blank is plus, hyphen is minus.  I hadn't used
*FIXED before, but a quick test shows that when I copy a packed decimal 3.0
field to a flat file, a value of 1 in that field was put in the flat file as
"1    " -- that's a 1 with 4 trailing spaces.

hth,
Peter Dow
Dow Software Services, Inc.
909 793-9050 voice
909 793-4480 fax
909 522-3214 cell

----- Original Message -----
From: "Shrader, Patrick" <pshrader@xxxxxxxx>
To: "Midrange Mail List" <MIDRANGE-L@xxxxxxxxxxxx>
Sent: Thursday, June 05, 2003 1:30 PM
Subject: CPYTOIMPF problem


> List,
>
> I'm trying to create flat file to transfer information out of the 400. 
> I
am
> moving the original file into a 1024 field in a file:
>  A          R FEXPORT
>  A            DATA        1024
>
> My source file is (WITH MY EXPECTED FIXED FILE POSITIONS)
>  A            WOPER          6  (POS 1-6)
>  A            WOUOM          3  (POS 7-9)
>  A            WOBCDE         4  (POS 10-13)
>  A            WOCSR         12  (POS 14-25)
>  A            WOCRCY         5  (POS 26-30)
>  A            WOFILL        10  (POS 31-40)
>  A            WOSOLD        10  (POS 41-50)
>  A            WOAMT1        14  4 (POS 51-65 WITH 1 DECIMAL)
>  A            WOAMT2        14  4 (POS 66-80 WITH 1 DECIMAL)
> ...
>
> My CPYTOSTMF is as follows:
> CPYTOIMPF  FROMFILE(ORD) TOFILE(EXPORT) MBROPT(*REPLACE) 
> DTAFMT(*FIXED)
>
> The first 7 fields start and stop where I would expect them to in the 
> flat file. However, the decimal data adds two trailing spaces in the 
> data (I
have
> allocated 15 spaces -- one for the decimal). But the trailing spaces 
> cause major problems as they compound across the fields. Example 
> below:
>
>  
> ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
>  DATA
>  200312EA RABTKSTEVE      USA              071230005064.0000        .0000
>                                                    ^-CORRECT     ^^----
WHY?
>
>
>
> How can I get rid of these trailing spaces?
>
> Thanks!
> Pat
> _______________________________________________
> 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 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.